@kizmann/pico-js 2.0.2 → 2.0.4
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.
- package/dist/pico-js.browser.js +1 -1
- package/dist/pico-js.browser.js.map +1 -1
- package/dist/pico-js.esm.js +1 -1
- package/dist/pico-js.esm.js.map +1 -1
- package/package.json +4 -10
- package/src/index.esm.js +31 -77
- package/src/now/NowDefault.js +16 -16
- package/src/utils/Hash.js +5 -5
- package/src/utils/Mixed.js +1 -1
- package/types/index.esm.d.ts +17 -56
- package/types/now/NowDefault.d.ts +64 -0
- package/types/utils/Event.d.ts +1 -1
- package/types/utils/Locale.d.ts +1 -1
- package/types/utils/Mixed.d.ts +20 -18
- package/types/utils/Number.d.ts +1 -1
- package/types/utils/String.d.ts +8 -7
package/package.json
CHANGED
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kizmann/pico-js",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
7
7
|
"author": "Eduard Kizmann <kizmann@protonmail.ch>",
|
|
8
8
|
"repository": "https://github.com/vankizmann/pico-js",
|
|
9
|
-
"main": "src/index.esm.js",
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"exports": {
|
|
13
|
-
".": {
|
|
14
|
-
"types": "./types/index.d.ts",
|
|
15
|
-
"import": "./src/index.esm.js"
|
|
16
|
-
}
|
|
17
|
-
},
|
|
9
|
+
"main": "./src/index.esm.js",
|
|
10
|
+
"jsnext:main": "./src/index.esm.js",
|
|
11
|
+
"typings": "./types/index.esm.d.ts",
|
|
18
12
|
"imports": {
|
|
19
13
|
"#src/*": "./src/*"
|
|
20
14
|
},
|
package/src/index.esm.js
CHANGED
|
@@ -1,13 +1,33 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import { default as
|
|
3
|
-
import { default as
|
|
4
|
-
import { default as
|
|
5
|
-
import { default as
|
|
6
|
-
import { default as
|
|
7
|
-
import { default as
|
|
8
|
-
import { default as
|
|
9
|
-
import { default as
|
|
10
|
-
import { default as
|
|
1
|
+
import { PicoRunner, default as Run } from "./utils/Runner.js";
|
|
2
|
+
import { PicoString, default as Str } from "./utils/String.js";
|
|
3
|
+
import { PicoNumber, default as Num } from "./utils/Number.js";
|
|
4
|
+
import { PicoArray, default as Arr } from "./utils/Array.js";
|
|
5
|
+
import { PicoObject, default as Obj } from "./utils/Object.js";
|
|
6
|
+
import { PicoMixed, default as Mix } from "./utils/Mixed.js";
|
|
7
|
+
import { PicoHash, default as Hash } from "./utils/Hash.js";
|
|
8
|
+
import { PicoEvent, default as Event } from "./utils/Event.js";
|
|
9
|
+
import { PicoLocale, default as Locale } from "./utils/Locale.js";
|
|
10
|
+
import { PicoCookie, default as Cookie } from "./utils/Cookie.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @type {typeof PicoDom}
|
|
14
|
+
*/
|
|
15
|
+
const Dom = DomBuilder();
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @type {typeof PicoNow}
|
|
19
|
+
*/
|
|
20
|
+
const Now = NowBuilder();
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @type {typeof PicoFormat}
|
|
24
|
+
*/
|
|
25
|
+
const For = ForBuilder();
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
Dom, Now, For, Run, Str, Num, Arr, Obj, Mix, Hash, Event, Locale, Cookie
|
|
29
|
+
}
|
|
30
|
+
|
|
11
31
|
import { PicoDom, default as DomBuilder } from "./utils/Dom.js";
|
|
12
32
|
import { PicoNow, default as NowBuilder } from "./utils/Now.js";
|
|
13
33
|
import { PicoFormat, default as ForBuilder } from "./utils/Format.js";
|
|
@@ -31,72 +51,6 @@ export {
|
|
|
31
51
|
Route, Element
|
|
32
52
|
}
|
|
33
53
|
|
|
34
|
-
/**
|
|
35
|
-
* @type {typeof PicoDom}
|
|
36
|
-
*/
|
|
37
|
-
export const Dom = DomBuilder();
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* @type {typeof PicoNow}
|
|
41
|
-
*/
|
|
42
|
-
export const Now = NowBuilder();
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* @type {typeof PicoFormat}
|
|
46
|
-
*/
|
|
47
|
-
export const For = ForBuilder();
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* @type {typeof PicoRunner}
|
|
51
|
-
*/
|
|
52
|
-
export const Run = PicoRunner;
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* @type {typeof PicoString}
|
|
56
|
-
*/
|
|
57
|
-
export const Str = PicoString;
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* @type {typeof PicoNumber}
|
|
61
|
-
*/
|
|
62
|
-
export const Num = PicoNumber;
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* @type {typeof PicoArray}
|
|
66
|
-
*/
|
|
67
|
-
export const Arr = PicoArray;
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* @type {typeof PicoObject}
|
|
71
|
-
*/
|
|
72
|
-
export const Obj = PicoObject;
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* @type {typeof PicoMixed}
|
|
76
|
-
*/
|
|
77
|
-
export const Mix = PicoMixed;
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* @type {typeof PicoHash}
|
|
81
|
-
*/
|
|
82
|
-
export const Hash = PicoHash;
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* @type {typeof PicoEvent}
|
|
86
|
-
*/
|
|
87
|
-
export const Event = PicoEvent;
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* @type {typeof PicoLocale}
|
|
91
|
-
*/
|
|
92
|
-
export const Locale = PicoLocale;
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* @type {typeof PicoCookie}
|
|
96
|
-
*/
|
|
97
|
-
export const Cookie = PicoCookie;
|
|
98
|
-
|
|
99
|
-
|
|
100
54
|
/**
|
|
101
55
|
* @type {typeof PicoMixed}
|
|
102
56
|
*/
|
|
@@ -112,5 +66,5 @@ export const Any = new Proxy({}, {
|
|
|
112
66
|
*/
|
|
113
67
|
export const UUID = function () {
|
|
114
68
|
console.warn('UUID() is deprecated, use Hash.make() instead.');
|
|
115
|
-
return
|
|
69
|
+
return Hash.make();
|
|
116
70
|
};
|
package/src/now/NowDefault.js
CHANGED
|
@@ -396,7 +396,7 @@ export class PicoNowDefaultInstance
|
|
|
396
396
|
/**
|
|
397
397
|
* @see PicoNow.add
|
|
398
398
|
*/
|
|
399
|
-
|
|
399
|
+
PicoNowDefaultInstance.prototype.addSecond = function (value) {
|
|
400
400
|
console.warn('Now.addSecond() is deprecated, use Now.add(value, \'second\') instead.');
|
|
401
401
|
return this.add(value, 'second');
|
|
402
402
|
}
|
|
@@ -404,7 +404,7 @@ PicoNowGridInstance.prototype.addSecond = function (value) {
|
|
|
404
404
|
/**
|
|
405
405
|
* @see PicoNow.sub
|
|
406
406
|
*/
|
|
407
|
-
|
|
407
|
+
PicoNowDefaultInstance.prototype.subSecond = function (value) {
|
|
408
408
|
console.warn('Now.subSecond() is deprecated, use Now.sub(value, \'second\') instead.');
|
|
409
409
|
return this.sub(value, 'second');
|
|
410
410
|
}
|
|
@@ -412,7 +412,7 @@ PicoNowGridInstance.prototype.subSecond = function (value) {
|
|
|
412
412
|
/**
|
|
413
413
|
* @see PicoNow.add
|
|
414
414
|
*/
|
|
415
|
-
|
|
415
|
+
PicoNowDefaultInstance.prototype.addMinute = function (value) {
|
|
416
416
|
console.warn('Now.addMinute() is deprecated, use Now.add(value, \'minute\') instead.');
|
|
417
417
|
return this.add(value, 'minute');
|
|
418
418
|
}
|
|
@@ -420,7 +420,7 @@ PicoNowGridInstance.prototype.addMinute = function (value) {
|
|
|
420
420
|
/**
|
|
421
421
|
* @see PicoNow.sub
|
|
422
422
|
*/
|
|
423
|
-
|
|
423
|
+
PicoNowDefaultInstance.prototype.subMinute = function (value) {
|
|
424
424
|
console.warn('Now.subMinute() is deprecated, use Now.sub(value, \'minute\') instead.');
|
|
425
425
|
return this.sub(value, 'minute');
|
|
426
426
|
}
|
|
@@ -428,7 +428,7 @@ PicoNowGridInstance.prototype.subMinute = function (value) {
|
|
|
428
428
|
/**
|
|
429
429
|
* @see PicoNow.add
|
|
430
430
|
*/
|
|
431
|
-
|
|
431
|
+
PicoNowDefaultInstance.prototype.addHour = function (value) {
|
|
432
432
|
console.warn('Now.addHour() is deprecated, use Now.add(value, \'hour\') instead.');
|
|
433
433
|
return this.add(value, 'hour');
|
|
434
434
|
}
|
|
@@ -436,7 +436,7 @@ PicoNowGridInstance.prototype.addHour = function (value) {
|
|
|
436
436
|
/**
|
|
437
437
|
* @see PicoNow.sub
|
|
438
438
|
*/
|
|
439
|
-
|
|
439
|
+
PicoNowDefaultInstance.prototype.subHour = function (value) {
|
|
440
440
|
console.warn('Now.subHour() is deprecated, use Now.sub(value, \'hour\') instead.');
|
|
441
441
|
return this.sub(value, 'hour');
|
|
442
442
|
}
|
|
@@ -444,7 +444,7 @@ PicoNowGridInstance.prototype.subHour = function (value) {
|
|
|
444
444
|
/**
|
|
445
445
|
* @see PicoNow.add
|
|
446
446
|
*/
|
|
447
|
-
|
|
447
|
+
PicoNowDefaultInstance.prototype.addDates = function (value) {
|
|
448
448
|
console.warn('Now.addDates() is deprecated, use Now.add(value, \'date\') instead.');
|
|
449
449
|
return this.add(value, 'date');
|
|
450
450
|
}
|
|
@@ -452,7 +452,7 @@ PicoNowGridInstance.prototype.addDates = function (value) {
|
|
|
452
452
|
/**
|
|
453
453
|
* @see PicoNow.sub
|
|
454
454
|
*/
|
|
455
|
-
|
|
455
|
+
PicoNowDefaultInstance.prototype.subDates = function (value) {
|
|
456
456
|
console.warn('Now.subDates() is deprecated, use Now.sub(value, \'date\') instead.');
|
|
457
457
|
return this.sub(value, 'date');
|
|
458
458
|
}
|
|
@@ -460,7 +460,7 @@ PicoNowGridInstance.prototype.subDates = function (value) {
|
|
|
460
460
|
/**
|
|
461
461
|
* @see PicoNow.add
|
|
462
462
|
*/
|
|
463
|
-
|
|
463
|
+
PicoNowDefaultInstance.prototype.addMonths = function (value) {
|
|
464
464
|
console.warn('Now.addMonths() is deprecated, use Now.add(value, \'month\') instead.');
|
|
465
465
|
return this.add(value, 'month');
|
|
466
466
|
}
|
|
@@ -468,7 +468,7 @@ PicoNowGridInstance.prototype.addMonths = function (value) {
|
|
|
468
468
|
/**
|
|
469
469
|
* @see PicoNow.sub
|
|
470
470
|
*/
|
|
471
|
-
|
|
471
|
+
PicoNowDefaultInstance.prototype.subMonths = function (value) {
|
|
472
472
|
console.warn('Now.subMonths() is deprecated, use Now.sub(value, \'month\') instead.');
|
|
473
473
|
return this.sub(value, 'month');
|
|
474
474
|
}
|
|
@@ -476,7 +476,7 @@ PicoNowGridInstance.prototype.subMonths = function (value) {
|
|
|
476
476
|
/**
|
|
477
477
|
* @see PicoNow.add
|
|
478
478
|
*/
|
|
479
|
-
|
|
479
|
+
PicoNowDefaultInstance.prototype.addYears = function (value) {
|
|
480
480
|
console.warn('Now.addYears() is deprecated, use Now.add(value, \'year\') instead.');
|
|
481
481
|
return this.add(value, 'year');
|
|
482
482
|
}
|
|
@@ -484,7 +484,7 @@ PicoNowGridInstance.prototype.addYears = function (value) {
|
|
|
484
484
|
/**
|
|
485
485
|
* @see PicoNow.sub
|
|
486
486
|
*/
|
|
487
|
-
|
|
487
|
+
PicoNowDefaultInstance.prototype.subYears = function (value) {
|
|
488
488
|
console.warn('Now.subYears() is deprecated, use Now.sub(value, \'year\') instead.');
|
|
489
489
|
return this.sub(value, 'year');
|
|
490
490
|
}
|
|
@@ -492,7 +492,7 @@ PicoNowGridInstance.prototype.subYears = function (value) {
|
|
|
492
492
|
/**
|
|
493
493
|
* @see PicoNow.add
|
|
494
494
|
*/
|
|
495
|
-
|
|
495
|
+
PicoNowDefaultInstance.prototype.addDecades = function (value) {
|
|
496
496
|
console.warn('Now.addDecades() is deprecated, use Now.grid(10 * value, \'year\') instead.');
|
|
497
497
|
return this.add(10 * value, 'year');
|
|
498
498
|
}
|
|
@@ -500,7 +500,7 @@ PicoNowGridInstance.prototype.addDecades = function (value) {
|
|
|
500
500
|
/**
|
|
501
501
|
* @see PicoNow.sub
|
|
502
502
|
*/
|
|
503
|
-
|
|
503
|
+
PicoNowDefaultInstance.prototype.subDecades = function (value) {
|
|
504
504
|
console.warn('Now.subDecades() is deprecated, use Now.grid(10 * value, \'year\') instead.');
|
|
505
505
|
return this.sub(10 * value, 'year');
|
|
506
506
|
}
|
|
@@ -508,7 +508,7 @@ PicoNowGridInstance.prototype.subDecades = function (value) {
|
|
|
508
508
|
/**
|
|
509
509
|
* @see PicoNow.day
|
|
510
510
|
*/
|
|
511
|
-
|
|
511
|
+
PicoNowDefaultInstance.prototype.humanDay = function () {
|
|
512
512
|
console.warn('Now.humanDay() is deprecated, use Now.day() instead.');
|
|
513
513
|
return this.day();
|
|
514
514
|
}
|
|
@@ -516,7 +516,7 @@ PicoNowGridInstance.prototype.humanDay = function () {
|
|
|
516
516
|
/**
|
|
517
517
|
* @see PicoNow.month
|
|
518
518
|
*/
|
|
519
|
-
|
|
519
|
+
PicoNowDefaultInstance.prototype.humanMonth = function () {
|
|
520
520
|
console.warn('Now.humanMonth() is deprecated, use Now.month() instead.');
|
|
521
521
|
return this.month();
|
|
522
522
|
}
|
package/src/utils/Hash.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Str
|
|
1
|
+
import { Str } from "../index.esm.js";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @var {Array<string>} RADIX_NUMBER Radix from 0 to 9
|
|
@@ -96,7 +96,7 @@ export class PicoHash
|
|
|
96
96
|
let hash = '';
|
|
97
97
|
|
|
98
98
|
for ( let i = 0; i < length; i ++ ) {
|
|
99
|
-
hash +=
|
|
99
|
+
hash += this.radix(radix);
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
for ( const k of Object.keys(map) ) {
|
|
@@ -121,9 +121,9 @@ export class PicoHash
|
|
|
121
121
|
// Use only selected chars from the radix store
|
|
122
122
|
for ( let i = 0; i < 31; i ++ ) {
|
|
123
123
|
if ( i === 15 ) {
|
|
124
|
-
hash +=
|
|
124
|
+
hash += this.radix(RADIX_UP19.length, RADIX_UP19);
|
|
125
125
|
} else {
|
|
126
|
-
hash +=
|
|
126
|
+
hash += this.radix(RADIX_UUID.length, RADIX_UUID);
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
|
|
@@ -153,7 +153,7 @@ export class PicoHash
|
|
|
153
153
|
let hash = '';
|
|
154
154
|
|
|
155
155
|
for ( let i = 0; i < length; i ++ ) {
|
|
156
|
-
hash +=
|
|
156
|
+
hash += this.radix(radix.length, radix);
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
return hash;
|
package/src/utils/Mixed.js
CHANGED
package/types/index.esm.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @type {typeof PicoMixed}
|
|
3
|
+
*/
|
|
4
|
+
export const Any: typeof PicoMixed;
|
|
5
|
+
export function UUID(): string;
|
|
1
6
|
/**
|
|
2
7
|
* @type {typeof PicoDom}
|
|
3
8
|
*/
|
|
@@ -10,51 +15,16 @@ export const Now: typeof PicoNow;
|
|
|
10
15
|
* @type {typeof PicoFormat}
|
|
11
16
|
*/
|
|
12
17
|
export const For: typeof PicoFormat;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
*/
|
|
24
|
-
export const Num: typeof PicoNumber;
|
|
25
|
-
/**
|
|
26
|
-
* @type {typeof PicoArray}
|
|
27
|
-
*/
|
|
28
|
-
export const Arr: typeof PicoArray;
|
|
29
|
-
/**
|
|
30
|
-
* @type {typeof PicoObject}
|
|
31
|
-
*/
|
|
32
|
-
export const Obj: typeof PicoObject;
|
|
33
|
-
/**
|
|
34
|
-
* @type {typeof PicoMixed}
|
|
35
|
-
*/
|
|
36
|
-
export const Mix: typeof PicoMixed;
|
|
37
|
-
/**
|
|
38
|
-
* @type {typeof PicoHash}
|
|
39
|
-
*/
|
|
40
|
-
export const Hash: typeof PicoHash;
|
|
41
|
-
/**
|
|
42
|
-
* @type {typeof PicoEvent}
|
|
43
|
-
*/
|
|
44
|
-
export const Event: typeof PicoEvent;
|
|
45
|
-
/**
|
|
46
|
-
* @type {typeof PicoLocale}
|
|
47
|
-
*/
|
|
48
|
-
export const Locale: typeof PicoLocale;
|
|
49
|
-
/**
|
|
50
|
-
* @type {typeof PicoCookie}
|
|
51
|
-
*/
|
|
52
|
-
export const Cookie: typeof PicoCookie;
|
|
53
|
-
/**
|
|
54
|
-
* @type {typeof PicoMixed}
|
|
55
|
-
*/
|
|
56
|
-
export const Any: typeof PicoMixed;
|
|
57
|
-
export function UUID(): string;
|
|
18
|
+
import { default as Run } from "./utils/Runner.js";
|
|
19
|
+
import { default as Str } from "./utils/String.js";
|
|
20
|
+
import { default as Num } from "./utils/Number.js";
|
|
21
|
+
import { default as Arr } from "./utils/Array.js";
|
|
22
|
+
import { default as Obj } from "./utils/Object.js";
|
|
23
|
+
import { default as Mix } from "./utils/Mixed.js";
|
|
24
|
+
import { default as Hash } from "./utils/Hash.js";
|
|
25
|
+
import { default as Event } from "./utils/Event.js";
|
|
26
|
+
import { default as Locale } from "./utils/Locale.js";
|
|
27
|
+
import { default as Cookie } from "./utils/Cookie.js";
|
|
58
28
|
import { go } from "./tool/scope.js";
|
|
59
29
|
import { browser } from "./tool/scope.js";
|
|
60
30
|
import { device } from "./tool/scope.js";
|
|
@@ -62,17 +32,8 @@ import { default as Map } from "./wip/Map.js";
|
|
|
62
32
|
import { default as Data } from "./utils/Data.js";
|
|
63
33
|
import { default as Route } from "./utils/Route.js";
|
|
64
34
|
import { default as Element } from "./wip/Element.js";
|
|
35
|
+
import { PicoMixed } from "./utils/Mixed.js";
|
|
65
36
|
import { PicoDom } from "./utils/Dom.js";
|
|
66
37
|
import { PicoNow } from "./utils/Now.js";
|
|
67
38
|
import { PicoFormat } from "./utils/Format.js";
|
|
68
|
-
|
|
69
|
-
import { default as PicoString } from "./utils/String.js";
|
|
70
|
-
import { default as PicoNumber } from "./utils/Number.js";
|
|
71
|
-
import { default as PicoArray } from "./utils/Array.js";
|
|
72
|
-
import { default as PicoObject } from "./utils/Object.js";
|
|
73
|
-
import { default as PicoMixed } from "./utils/Mixed.js";
|
|
74
|
-
import { default as PicoHash } from "./utils/Hash.js";
|
|
75
|
-
import { default as PicoEvent } from "./utils/Event.js";
|
|
76
|
-
import { default as PicoLocale } from "./utils/Locale.js";
|
|
77
|
-
import { default as PicoCookie } from "./utils/Cookie.js";
|
|
78
|
-
export { go, browser, device, Map, Data, Route, Element };
|
|
39
|
+
export { Run, Str, Num, Arr, Obj, Mix, Hash, Event, Locale, Cookie, go, browser, device, Map, Data, Route, Element };
|
|
@@ -179,6 +179,70 @@ export class PicoNowDefaultInstance {
|
|
|
179
179
|
* @returns {PicoNow} Current instance
|
|
180
180
|
*/
|
|
181
181
|
applyTime(value: any, format?: string): PicoNow;
|
|
182
|
+
/**
|
|
183
|
+
* @see PicoNow.add
|
|
184
|
+
*/
|
|
185
|
+
addSecond(value: any): PicoNow;
|
|
186
|
+
/**
|
|
187
|
+
* @see PicoNow.sub
|
|
188
|
+
*/
|
|
189
|
+
subSecond(value: any): PicoNow;
|
|
190
|
+
/**
|
|
191
|
+
* @see PicoNow.add
|
|
192
|
+
*/
|
|
193
|
+
addMinute(value: any): PicoNow;
|
|
194
|
+
/**
|
|
195
|
+
* @see PicoNow.sub
|
|
196
|
+
*/
|
|
197
|
+
subMinute(value: any): PicoNow;
|
|
198
|
+
/**
|
|
199
|
+
* @see PicoNow.add
|
|
200
|
+
*/
|
|
201
|
+
addHour(value: any): PicoNow;
|
|
202
|
+
/**
|
|
203
|
+
* @see PicoNow.sub
|
|
204
|
+
*/
|
|
205
|
+
subHour(value: any): PicoNow;
|
|
206
|
+
/**
|
|
207
|
+
* @see PicoNow.add
|
|
208
|
+
*/
|
|
209
|
+
addDates(value: any): PicoNow;
|
|
210
|
+
/**
|
|
211
|
+
* @see PicoNow.sub
|
|
212
|
+
*/
|
|
213
|
+
subDates(value: any): PicoNow;
|
|
214
|
+
/**
|
|
215
|
+
* @see PicoNow.add
|
|
216
|
+
*/
|
|
217
|
+
addMonths(value: any): PicoNow;
|
|
218
|
+
/**
|
|
219
|
+
* @see PicoNow.sub
|
|
220
|
+
*/
|
|
221
|
+
subMonths(value: any): PicoNow;
|
|
222
|
+
/**
|
|
223
|
+
* @see PicoNow.add
|
|
224
|
+
*/
|
|
225
|
+
addYears(value: any): PicoNow;
|
|
226
|
+
/**
|
|
227
|
+
* @see PicoNow.sub
|
|
228
|
+
*/
|
|
229
|
+
subYears(value: any): PicoNow;
|
|
230
|
+
/**
|
|
231
|
+
* @see PicoNow.add
|
|
232
|
+
*/
|
|
233
|
+
addDecades(value: any): PicoNow;
|
|
234
|
+
/**
|
|
235
|
+
* @see PicoNow.sub
|
|
236
|
+
*/
|
|
237
|
+
subDecades(value: any): PicoNow;
|
|
238
|
+
/**
|
|
239
|
+
* @see PicoNow.day
|
|
240
|
+
*/
|
|
241
|
+
humanDay(): number | PicoNow;
|
|
242
|
+
/**
|
|
243
|
+
* @see PicoNow.month
|
|
244
|
+
*/
|
|
245
|
+
humanMonth(): number | PicoNow;
|
|
182
246
|
}
|
|
183
247
|
export function PicoNowDefaultPlugin(self: typeof PicoNow): typeof PicoNow;
|
|
184
248
|
import { PicoNow } from "../utils/Now.js";
|
package/types/utils/Event.d.ts
CHANGED
package/types/utils/Locale.d.ts
CHANGED
package/types/utils/Mixed.d.ts
CHANGED
|
@@ -66,7 +66,7 @@ export class PicoMixed {
|
|
|
66
66
|
/**
|
|
67
67
|
* @see PicoMixed.isPrim
|
|
68
68
|
*/
|
|
69
|
-
static isPrimitive: typeof
|
|
69
|
+
static isPrimitive: typeof Mix.isPrim;
|
|
70
70
|
/**
|
|
71
71
|
* Check if the value is a string
|
|
72
72
|
*
|
|
@@ -80,7 +80,7 @@ export class PicoMixed {
|
|
|
80
80
|
/**
|
|
81
81
|
* @see PicoMixed.isStr
|
|
82
82
|
*/
|
|
83
|
-
static isString: typeof
|
|
83
|
+
static isString: typeof Mix.isStr;
|
|
84
84
|
/**
|
|
85
85
|
* Check if the value is a number
|
|
86
86
|
*
|
|
@@ -95,7 +95,7 @@ export class PicoMixed {
|
|
|
95
95
|
/**
|
|
96
96
|
* @see PicoMixed.isNum
|
|
97
97
|
*/
|
|
98
|
-
static isNumber: typeof
|
|
98
|
+
static isNumber: typeof Mix.isNum;
|
|
99
99
|
/**
|
|
100
100
|
* Check if the value is an integer
|
|
101
101
|
*
|
|
@@ -111,7 +111,7 @@ export class PicoMixed {
|
|
|
111
111
|
/**
|
|
112
112
|
* @see PicoMixed.isInt
|
|
113
113
|
*/
|
|
114
|
-
static isInteger: typeof
|
|
114
|
+
static isInteger: typeof Mix.isInt;
|
|
115
115
|
/**
|
|
116
116
|
* Check if the value is a boolean
|
|
117
117
|
*
|
|
@@ -127,7 +127,7 @@ export class PicoMixed {
|
|
|
127
127
|
/**
|
|
128
128
|
* @see PicoMixed.isBool
|
|
129
129
|
*/
|
|
130
|
-
static isBoolean: typeof
|
|
130
|
+
static isBoolean: typeof Mix.isBool;
|
|
131
131
|
/**
|
|
132
132
|
* Check if the value is a function
|
|
133
133
|
*
|
|
@@ -143,7 +143,7 @@ export class PicoMixed {
|
|
|
143
143
|
/**
|
|
144
144
|
* @see PicoMixed.isFunc
|
|
145
145
|
*/
|
|
146
|
-
static isFunction: typeof
|
|
146
|
+
static isFunction: typeof Mix.isFunc;
|
|
147
147
|
/**
|
|
148
148
|
* Check if the value is object
|
|
149
149
|
*
|
|
@@ -160,7 +160,7 @@ export class PicoMixed {
|
|
|
160
160
|
/**
|
|
161
161
|
* @see PicoMixed.isRef
|
|
162
162
|
*/
|
|
163
|
-
static isReference: typeof
|
|
163
|
+
static isReference: typeof Mix.isRef;
|
|
164
164
|
/**
|
|
165
165
|
* Check if the value is plain object
|
|
166
166
|
*
|
|
@@ -174,7 +174,7 @@ export class PicoMixed {
|
|
|
174
174
|
/**
|
|
175
175
|
* @see PicoMixed.isObj
|
|
176
176
|
*/
|
|
177
|
-
static isObject: typeof
|
|
177
|
+
static isObject: typeof Mix.isObj;
|
|
178
178
|
/**
|
|
179
179
|
* Check if the value is array object
|
|
180
180
|
*
|
|
@@ -188,7 +188,7 @@ export class PicoMixed {
|
|
|
188
188
|
/**
|
|
189
189
|
* @see PicoMixed.isArr
|
|
190
190
|
*/
|
|
191
|
-
static isArray: typeof
|
|
191
|
+
static isArray: typeof Mix.isArr;
|
|
192
192
|
/**
|
|
193
193
|
* Check if the value is iterable object
|
|
194
194
|
*
|
|
@@ -202,7 +202,7 @@ export class PicoMixed {
|
|
|
202
202
|
/**
|
|
203
203
|
* @see PicoMixed.isIter
|
|
204
204
|
*/
|
|
205
|
-
static isIterable: typeof
|
|
205
|
+
static isIterable: typeof Mix.isIter;
|
|
206
206
|
/**
|
|
207
207
|
* Check if the value is iso date
|
|
208
208
|
*
|
|
@@ -349,7 +349,7 @@ export class PicoMixed {
|
|
|
349
349
|
/**
|
|
350
350
|
* @see PicoMixed.length
|
|
351
351
|
*/
|
|
352
|
-
static length: typeof
|
|
352
|
+
static length: typeof Mix.len;
|
|
353
353
|
/**
|
|
354
354
|
* Compare two objects (used for natural array sort)
|
|
355
355
|
*
|
|
@@ -380,7 +380,7 @@ export class PicoMixed {
|
|
|
380
380
|
/**
|
|
381
381
|
* @see PicoMixed.arr
|
|
382
382
|
*/
|
|
383
|
-
static array: typeof
|
|
383
|
+
static array: typeof Mix.arr;
|
|
384
384
|
/**
|
|
385
385
|
* Convert value to string
|
|
386
386
|
*
|
|
@@ -397,7 +397,7 @@ export class PicoMixed {
|
|
|
397
397
|
/**
|
|
398
398
|
* @see PicoMixed.str
|
|
399
399
|
*/
|
|
400
|
-
static string: typeof
|
|
400
|
+
static string: typeof Mix.str;
|
|
401
401
|
/**
|
|
402
402
|
* Convert value to number
|
|
403
403
|
*
|
|
@@ -414,7 +414,7 @@ export class PicoMixed {
|
|
|
414
414
|
/**
|
|
415
415
|
* @see PicoMixed.num
|
|
416
416
|
*/
|
|
417
|
-
static number: typeof
|
|
417
|
+
static number: typeof Mix.num;
|
|
418
418
|
/**
|
|
419
419
|
* Convert value to integer
|
|
420
420
|
*
|
|
@@ -431,7 +431,7 @@ export class PicoMixed {
|
|
|
431
431
|
/**
|
|
432
432
|
* @see PicoMixed.int
|
|
433
433
|
*/
|
|
434
|
-
static integer: typeof
|
|
434
|
+
static integer: typeof Mix.int;
|
|
435
435
|
/**
|
|
436
436
|
* Convert value to boolean
|
|
437
437
|
*
|
|
@@ -450,14 +450,14 @@ export class PicoMixed {
|
|
|
450
450
|
/**
|
|
451
451
|
* @see PicoMixed.bool
|
|
452
452
|
*/
|
|
453
|
-
static boolean: typeof
|
|
453
|
+
static boolean: typeof Mix.bool;
|
|
454
454
|
}
|
|
455
455
|
export namespace PicoMixed {
|
|
456
456
|
function global(...args: any[]): any;
|
|
457
457
|
function isPlain(...args: any[]): boolean;
|
|
458
458
|
function float(...args: any[]): any;
|
|
459
459
|
function delay(...args: any[]): Function;
|
|
460
|
-
function async(...args: any[]): typeof
|
|
460
|
+
function async(...args: any[]): typeof Run;
|
|
461
461
|
function debounce(...args: any[]): Function;
|
|
462
462
|
function throttle(...args: any[]): Function;
|
|
463
463
|
function framerate(...args: any[]): Function;
|
|
@@ -466,4 +466,6 @@ export namespace PicoMixed {
|
|
|
466
466
|
function convertBool(...args: any[]): any;
|
|
467
467
|
function convertBoolean(...args: any[]): any;
|
|
468
468
|
}
|
|
469
|
-
export default
|
|
469
|
+
export default Mix;
|
|
470
|
+
import { Mix } from "../index.esm.js";
|
|
471
|
+
import { Run } from "../index.esm.js";
|
package/types/utils/Number.d.ts
CHANGED