@kizmann/pico-js 0.5.5 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,148 +0,0 @@
1
- // types/utility/now.d.ts
2
-
3
- import { Num } from "./number";
4
- import { Arr } from "./array";
5
- import { Any } from "./any";
6
-
7
- declare class Now {
8
- initialDate : string | null;
9
- moment : any;
10
-
11
- constructor(date? : any, format? : string);
12
-
13
- static make(date? : any, format? : string) : Now;
14
-
15
- get() : any;
16
-
17
- valid() : boolean;
18
-
19
- clone() : Now;
20
-
21
- code(format? : string) : number;
22
-
23
- format(format? : string, force? : boolean) : string;
24
-
25
- before(before? : any) : boolean;
26
-
27
- beforeDate(before? : any) : boolean;
28
-
29
- beforeTime(before? : any) : boolean;
30
-
31
- after(after? : any) : boolean;
32
-
33
- afterDate(after? : any) : boolean;
34
-
35
- afterTime(after? : any) : boolean;
36
-
37
- equal(equal? : any, format? : string) : boolean;
38
-
39
- equalDate(equal? : any, format? : string) : boolean;
40
-
41
- equalTime(equal? : any, format? : string) : boolean;
42
-
43
- between(fromDate? : any, toDate? : any, format? : string) : boolean;
44
-
45
- decade() : number;
46
-
47
- prevDecade() : Now;
48
-
49
- nextDecade() : Now;
50
-
51
- addDecades(count? : number) : Now;
52
-
53
- subDecades(count? : number) : Now;
54
-
55
- year(year? : number | null) : number | Now;
56
-
57
- prevYear() : Now;
58
-
59
- nextYear() : Now;
60
-
61
- addYears(count? : number) : Now;
62
-
63
- subYears(count? : number) : Now;
64
-
65
- month(month? : number | null) : number | Now;
66
-
67
- addMonths(count? : number) : Now;
68
-
69
- subMonths(count? : number) : Now;
70
-
71
- prevMonth() : Now;
72
-
73
- nextMonth() : Now;
74
-
75
- date(date? : number | null) : number | Now;
76
-
77
- addDates(count? : number) : Now;
78
-
79
- subDates(count? : number) : Now;
80
-
81
- prevDate() : Now;
82
-
83
- nextDate() : Now;
84
-
85
- lastDate() : number;
86
-
87
- day(day? : number | null) : number | Now;
88
-
89
- hour(hour? : number | null) : number | Now;
90
-
91
- addHour(count? : number) : Now;
92
-
93
- subHour(count? : number) : Now;
94
-
95
- prevHour() : Now;
96
-
97
- nextHour() : Now;
98
-
99
- minute(minute? : number | null) : number | Now;
100
-
101
- addMinute(count? : number) : Now;
102
-
103
- subMinute(count? : number) : Now;
104
-
105
- prevMinute() : Now;
106
-
107
- nextMinute() : Now;
108
-
109
- second(second? : number | null) : number | Now;
110
-
111
- addSecond(count? : number) : Now;
112
-
113
- subSecond(count? : number) : Now;
114
-
115
- prevSecond() : Now;
116
-
117
- nextSecond() : Now;
118
-
119
- humanDay() : number;
120
-
121
- humanMonth() : number;
122
-
123
- getMonths() : Now[];
124
-
125
- getYears() : Now[];
126
-
127
- getYearsGrid(size? : number) : Now[];
128
-
129
- getDates() : Now[];
130
-
131
- getDatesRange(target? : any) : Now[];
132
-
133
- getDatesGrid(start? : number, end? : number) : Now[];
134
-
135
- getHours(interval? : number) : Now[];
136
-
137
- getMinutes(interval? : number) : Now[];
138
-
139
- getSeconds(interval? : number) : Now[];
140
-
141
- resetTime() : Now;
142
-
143
- applyDate(now : any, format? : string) : void;
144
-
145
- applyTime(now : any, format? : string) : void;
146
- }
147
-
148
- export default Now;
@@ -1,31 +0,0 @@
1
- // types/utility/number.d.ts
2
-
3
- import { Any } from "./any";
4
- import { Arr } from "./array";
5
- import { Obj } from "./object";
6
-
7
- declare class Num {
8
- static int(num : any) : number;
9
-
10
- static float(num : any) : number;
11
-
12
- static ceil(num : number) : number;
13
-
14
- static round(num : number) : number;
15
-
16
- static floor(num : number) : number;
17
-
18
- static fixed(num : number, fixed? : number) : string;
19
-
20
- static random(start? : number, end? : number) : number;
21
-
22
- static matrix(num : number, limit? : number, base? : number[]) : number[];
23
-
24
- static combine(arr : number[]) : number;
25
-
26
- static distance(cord1 : { lat : number; lng : number }, cord2 : { lat : number; lng : number }, miles? : boolean) : number;
27
-
28
- static format(num : number | null, decimal? : string, thousand? : string, fixed? : number | null) : string | null;
29
- }
30
-
31
- export default Num;
@@ -1,54 +0,0 @@
1
- // types/utility/object.d.ts
2
-
3
- import { Arr } from "./array";
4
- import { Any } from "./any";
5
-
6
- declare class Obj {
7
- static has(obj : any, keys : string | string[]) : boolean;
8
-
9
- static empty(obj : any, key : string) : boolean;
10
-
11
- static get(obj : any, keys : string | string[], fallback? : any) : any;
12
-
13
- static set(obj : any, keys : string | string[], val : any) : any;
14
-
15
- static unset(obj : any, keys : string | string[]) : any;
16
-
17
- static pluck(obj : any, keys : string | string[], fallback? : any) : any;
18
-
19
- static only(obj : any, keys : string[], assign? : any) : any;
20
-
21
- static except(obj : any, keys : string[], assign? : any) : any;
22
-
23
- static includes(obj : any, val : any) : boolean;
24
-
25
- static matches(obj : any, val : any) : boolean;
26
-
27
- static sort(obj : any, key : string | ((a : any, b : any) => number)) : any[];
28
-
29
- static sortString(obj : any, key : string) : any[];
30
-
31
- static filter(obj : any, filter : any) : any[];
32
-
33
- static filterIndex(obj : any, filter : any) : string[];
34
-
35
- static find(arr : any[], obj : any, fallback? : any) : any;
36
-
37
- static findIndex(arr : any[], obj : any, fallback? : number) : number;
38
-
39
- static clone(obj : any) : any;
40
-
41
- static assign(...args : any[]) : any;
42
-
43
- static remove(obj : any, keys : string[]) : any;
44
-
45
- static each(obj : any, callback : (value : any, key : string) => void) : any;
46
-
47
- static map(obj : any, callback : (value : any, key : string) => any) : any;
48
-
49
- static values(obj : any) : any[];
50
-
51
- static flatten(obj : any) : any;
52
- }
53
-
54
- export default Obj;
@@ -1,33 +0,0 @@
1
- // types/utility/string.d.ts
2
-
3
- declare module "@kizmann/pico-js/src/utility/string" {
4
- import { Arr } from "@kizmann/pico-js/src/utility/array";
5
- import { Obj } from "@kizmann/pico-js/src/utility/object";
6
- import { Num } from "@kizmann/pico-js/src/utility/number";
7
- import { Any } from "@kizmann/pico-js/src/utility/any";
8
-
9
- export class Str {
10
- static regexEscape(val: string): string;
11
- static upper(val: string): string;
12
- static lower(val: string): string;
13
- static camelcase(val: string): string;
14
- static humancase(val: string): string;
15
- static slugify(val: string): string;
16
- static ucfirst(val: string): string;
17
- static lcfirst(val: string): string;
18
- static has(val: string, search: string): boolean;
19
- static filesize(val: number, decimals?: number): string | null;
20
- static array(value: string, fallback?: any[]): any[];
21
- static real(value: string): any;
22
- static objectify(value: any, mode?: 'options' | 'params', isArray?: boolean): any;
23
- static stringify(value: any, mode?: 'options' | 'params'): string;
24
- static options(params: any, quota?: string | null): string;
25
- static fromOptions(value: string, isArray?: boolean): any;
26
- private static convertFromOptions(result: any, match: string): any;
27
- static params(params: any, quota?: string | null): string;
28
- static fromParams(value: string, isArray?: boolean): any;
29
- private static convertFromParams(result: any, match: string): any;
30
- }
31
-
32
- export default Str;
33
- }
@@ -1,83 +0,0 @@
1
- const path = require("path");
2
- const webpack = require("webpack");
3
- const TerserPlugin = require("terser-webpack-plugin");
4
-
5
- let config = {
6
- entry: ["./src/index.js"],
7
- module: {
8
- rules: [
9
- {
10
- test: /.js$/,
11
- include: [
12
- path.resolve(__dirname, './src')
13
- ],
14
- loader: 'babel-loader',
15
- options: {
16
- configFile: path.resolve('./babel.config.cjs')
17
- },
18
- }
19
- ]
20
- },
21
- // externals: {
22
- // 'moment': {
23
- // root: 'moment', commonjs2: 'moment', commonjs: 'moment', amd: 'moment'
24
- // },
25
- // },
26
- plugins: []
27
- };
28
-
29
- module.exports = function (env, argv) {
30
-
31
- config.mode = argv.mode;
32
-
33
- if ( argv.mode === 'development' ) {
34
- config.devtool = 'eval-source-map';
35
- }
36
-
37
- if ( argv.mode === 'production' ) {
38
- config.devtool = 'source-map';
39
- }
40
-
41
- /**
42
- * @const __dirname
43
- */
44
-
45
- let bundlerPackage = Object.assign({
46
-
47
- output:{
48
- filename: "pico-js.js",
49
- path: path.resolve(__dirname, "dist"),
50
- library: 'Pico',
51
- libraryTarget: "umd",
52
- },
53
-
54
- }, config);
55
-
56
- if ( argv.mode === 'development' ) {
57
- return [bundlerPackage];
58
- }
59
-
60
- let loaderOptions = new webpack.LoaderOptionsPlugin({
61
- minimize: true
62
- });
63
-
64
- bundlerPackage.plugins.push(loaderOptions);
65
-
66
- let terserOptions = {
67
- mangle: true
68
- }
69
-
70
- let terser = new TerserPlugin({
71
- terserOptions, extractComments: false,
72
- });
73
-
74
- let optimization = {
75
- minimize: true, minimizer: []
76
- };
77
-
78
- optimization.minimizer.push(terser);
79
-
80
- bundlerPackage.optimization = optimization;
81
-
82
- return [bundlerPackage];
83
- }
package/webservy.json DELETED
@@ -1,8 +0,0 @@
1
- {
2
- "hostname": "pico-js.local",
3
- "webroot": "",
4
- "engine": "httpd",
5
- "type": "default",
6
- "proxy": "",
7
- "version": "php-8.2.8"
8
- }
File without changes