@kizmann/pico-js 2.0.7 → 2.0.9
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 -6
- package/src/dom/{DomAttribute.js → DomAttribute.ts} +40 -63
- package/src/dom/{DomBuilder.js → DomBuilder.ts} +27 -44
- package/src/dom/{DomEvent.js → DomEvent.ts} +101 -76
- package/src/dom/{DomFinder.js → DomFinder.ts} +103 -139
- package/src/dom/DomForm.ts +38 -0
- package/src/dom/{DomGlobal.js → DomGlobal.ts} +34 -51
- package/src/dom/{DomInview.js → DomInview.ts} +37 -57
- package/src/dom/DomMeta.ts +48 -0
- package/src/dom/DomObserver.ts +17 -0
- package/src/dom/{DomPopover.js → DomPopover.ts} +20 -39
- package/src/dom/{DomRectangle.js → DomRectangle.ts} +70 -87
- package/src/format/{FormatFile.js → FormatFile.ts} +12 -23
- package/src/format/{FormatOption.js → FormatOption.ts} +15 -24
- package/src/format/{FormatParam.js → FormatParam.ts} +14 -25
- package/src/format/{FormatParser.js → FormatParser.ts} +29 -39
- package/src/format/{FormatUrl.js → FormatUrl.ts} +9 -21
- package/src/index.browser.ts +32 -0
- package/src/index.esm.ts +64 -0
- package/src/now/{NowDefault.js → NowDefault.ts} +86 -121
- package/src/now/{NowFormat.js → NowFormat.ts} +23 -28
- package/src/now/{NowGrid.js → NowGrid.ts} +41 -58
- package/src/now/{NowHuman.js → NowHuman.ts} +18 -27
- package/src/now/{NowMatch.js → NowMatch.ts} +22 -28
- package/src/now/{NowRange.js → NowRange.ts} +13 -22
- package/src/now/{NowWalker.js → NowWalker.ts} +65 -71
- package/src/tool/{scope.js → scope.ts} +41 -11
- package/src/utils/{Array.js → Array.ts} +187 -152
- package/src/utils/{Cookie.js → Cookie.ts} +15 -12
- package/src/utils/{Data.js → Data.ts} +17 -17
- package/src/utils/Dom.ts +204 -0
- package/src/utils/Format.ts +48 -0
- package/src/utils/{Hash.js → Hash.ts} +20 -20
- package/src/utils/{Locale.js → Locale.ts} +21 -21
- package/src/utils/{Mixed.js → Mixed.ts} +104 -61
- package/src/utils/{Now.js → Now.ts} +68 -69
- package/src/utils/{Number.js → Number.ts} +34 -36
- package/src/utils/{Object.js → Object.ts} +68 -122
- package/src/utils/{Route.js → Route.ts} +11 -9
- package/src/utils/{Runner.js → Runner.ts} +89 -77
- package/src/utils/{Signal.js → Signal.ts} +35 -22
- package/src/utils/{String.js → String.ts} +79 -69
- package/src/wip/{Element.js → Element.ts} +2 -2
- package/src/wip/{Map.js → Map.ts} +1 -1
- package/types/dom/DomAttribute.d.ts +16 -27
- package/types/dom/DomBuilder.d.ts +6 -9
- package/types/dom/DomEvent.d.ts +19 -24
- package/types/dom/DomFinder.d.ts +38 -61
- package/types/dom/DomForm.d.ts +7 -10
- package/types/dom/DomGlobal.d.ts +8 -15
- package/types/dom/DomInview.d.ts +9 -19
- package/types/dom/DomMeta.d.ts +9 -16
- package/types/dom/DomObserver.d.ts +4 -8
- package/types/dom/DomPopover.d.ts +8 -11
- package/types/dom/DomRectangle.d.ts +21 -35
- package/types/format/FormatFile.d.ts +5 -8
- package/types/format/FormatOption.d.ts +6 -8
- package/types/format/FormatParam.d.ts +6 -9
- package/types/format/FormatParser.d.ts +10 -18
- package/types/format/FormatUrl.d.ts +5 -8
- package/types/index.esm.d.ts +25 -37
- package/types/now/NowDefault.d.ts +30 -99
- package/types/now/NowFormat.d.ts +8 -21
- package/types/now/NowGrid.d.ts +24 -46
- package/types/now/NowHuman.d.ts +10 -11
- package/types/now/NowMatch.d.ts +6 -4
- package/types/now/NowRange.d.ts +5 -8
- package/types/now/NowWalker.d.ts +6 -4
- package/types/tool/scope.d.ts +11 -3
- package/types/utils/Array.d.ts +83 -101
- package/types/utils/Cookie.d.ts +11 -8
- package/types/utils/Data.d.ts +7 -7
- package/types/utils/Dom.d.ts +63 -96
- package/types/utils/Format.d.ts +15 -28
- package/types/utils/Hash.d.ts +21 -21
- package/types/utils/Locale.d.ts +9 -9
- package/types/utils/Mixed.d.ts +19 -32
- package/types/utils/Now.d.ts +51 -56
- package/types/utils/Number.d.ts +9 -20
- package/types/utils/Object.d.ts +21 -36
- package/types/utils/Route.d.ts +5 -2
- package/types/utils/Runner.d.ts +45 -38
- package/types/utils/Signal.d.ts +16 -16
- package/types/utils/String.d.ts +40 -76
- package/src/dom/DomForm.js +0 -59
- package/src/dom/DomMeta.js +0 -68
- package/src/dom/DomObserver.js +0 -38
- package/src/index.browser.js +0 -36
- package/src/index.esm.js +0 -80
- package/src/utils/Dom.js +0 -214
- package/src/utils/Format.js +0 -62
- package/types/wip/Element.d.ts +0 -119
- package/types/wip/Map.d.ts +0 -254
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
export const FILE_UNITS: string[];
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*/
|
|
6
|
-
export class PicoFormatFileStatic {
|
|
1
|
+
export declare const FILE_UNITS: string[];
|
|
2
|
+
export interface PicoFormatFile {
|
|
3
|
+
}
|
|
4
|
+
export declare class PicoFormatFile {
|
|
7
5
|
/**
|
|
8
6
|
* Format file size
|
|
9
7
|
*
|
|
@@ -15,5 +13,4 @@ export class PicoFormatFileStatic {
|
|
|
15
13
|
*/
|
|
16
14
|
static filesize(value: any, decimals?: number): string;
|
|
17
15
|
}
|
|
18
|
-
export
|
|
19
|
-
import { PicoFormat } from "../utils/Format.js";
|
|
16
|
+
export default PicoFormatFile;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
1
|
+
export declare const OPTION_REGEX: {
|
|
2
|
+
entry: RegExp;
|
|
3
|
+
};
|
|
4
|
+
export interface PicoFormatOption {
|
|
3
5
|
}
|
|
4
|
-
|
|
5
|
-
* @memberof PicoFormat
|
|
6
|
-
*/
|
|
7
|
-
export class PicoFormatOptionStatic {
|
|
6
|
+
export declare class PicoFormatOption {
|
|
8
7
|
/**
|
|
9
8
|
* Cast object to options string
|
|
10
9
|
*
|
|
@@ -37,5 +36,4 @@ export class PicoFormatOptionStatic {
|
|
|
37
36
|
*/
|
|
38
37
|
static parseOptions(value: string): any;
|
|
39
38
|
}
|
|
40
|
-
export
|
|
41
|
-
import { PicoFormat } from "../utils/Format.js";
|
|
39
|
+
export default PicoFormatOption;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
1
|
+
export declare const PARAM_REGEX: {
|
|
2
|
+
entry: RegExp;
|
|
3
|
+
};
|
|
4
|
+
export interface PicoFormatParam {
|
|
3
5
|
}
|
|
4
|
-
|
|
5
|
-
* @memberof PicoFormat
|
|
6
|
-
* @extends {PicoFormat}
|
|
7
|
-
*/
|
|
8
|
-
export class PicoFormatParamStatic {
|
|
6
|
+
export declare class PicoFormatParam {
|
|
9
7
|
/**
|
|
10
8
|
* Cast object to params string
|
|
11
9
|
*
|
|
@@ -36,5 +34,4 @@ export class PicoFormatParamStatic {
|
|
|
36
34
|
*/
|
|
37
35
|
static parseParams(value: string): any;
|
|
38
36
|
}
|
|
39
|
-
export
|
|
40
|
-
import { PicoFormat } from "../utils/Format.js";
|
|
37
|
+
export default PicoFormatParam;
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
export const TYPE_PARSERS:
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
export
|
|
6
|
-
match: (val: any) => boolean;
|
|
7
|
-
parse: (val: any) => string;
|
|
8
|
-
}[];
|
|
9
|
-
/**
|
|
10
|
-
* @memberof PicoFormat
|
|
11
|
-
*/
|
|
12
|
-
export class PicoFormatParserStatic {
|
|
1
|
+
export declare const TYPE_PARSERS: any[];
|
|
2
|
+
export declare const TYPE_CASTERS: any[];
|
|
3
|
+
export interface PicoFormatParser {
|
|
4
|
+
}
|
|
5
|
+
export declare class PicoFormatParser {
|
|
13
6
|
/**
|
|
14
7
|
* Convert key path format
|
|
15
8
|
*
|
|
@@ -27,10 +20,10 @@ export class PicoFormatParserStatic {
|
|
|
27
20
|
*
|
|
28
21
|
* @param {any} value Input value
|
|
29
22
|
* @param {any} [fallback] Fallback value
|
|
30
|
-
* @param {
|
|
23
|
+
* @param {any[]} [parsers] Custom parsers
|
|
31
24
|
* @returns {any} Parsed value
|
|
32
25
|
*/
|
|
33
|
-
static parsed(value: any, fallback?: any, parsers?:
|
|
26
|
+
static parsed(value: any, fallback?: any, parsers?: any[]): any;
|
|
34
27
|
/**
|
|
35
28
|
* Cast value to string
|
|
36
29
|
*
|
|
@@ -38,10 +31,9 @@ export class PicoFormatParserStatic {
|
|
|
38
31
|
*
|
|
39
32
|
* @param {any} value Input value
|
|
40
33
|
* @param {boolean} [encode] Encode value
|
|
41
|
-
* @param {
|
|
34
|
+
* @param {any[]} [casters] Custom casters
|
|
42
35
|
* @returns {string} Casted string
|
|
43
36
|
*/
|
|
44
|
-
static casted(value: any, encode?: boolean, casters?:
|
|
37
|
+
static casted(value: any, encode?: boolean, casters?: any[]): string;
|
|
45
38
|
}
|
|
46
|
-
export
|
|
47
|
-
import { PicoFormat } from "../utils/Format.js";
|
|
39
|
+
export default PicoFormatParser;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
export const SLUG_CONVERT:
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*/
|
|
6
|
-
export class PicoFormatUrlStatic {
|
|
1
|
+
export declare const SLUG_CONVERT: any[];
|
|
2
|
+
export interface PicoFormatUrl {
|
|
3
|
+
}
|
|
4
|
+
export declare class PicoFormatUrl {
|
|
7
5
|
/**
|
|
8
6
|
* Create slug from string
|
|
9
7
|
*
|
|
@@ -14,5 +12,4 @@ export class PicoFormatUrlStatic {
|
|
|
14
12
|
*/
|
|
15
13
|
static slugify(value: any): string;
|
|
16
14
|
}
|
|
17
|
-
export
|
|
18
|
-
import { PicoFormat } from "../utils/Format.js";
|
|
15
|
+
export default PicoFormatUrl;
|
package/types/index.esm.d.ts
CHANGED
|
@@ -1,43 +1,31 @@
|
|
|
1
|
+
import { default as Run } from "./utils/Runner.ts";
|
|
2
|
+
import { default as Str } from "./utils/String.ts";
|
|
3
|
+
import { default as Num } from "./utils/Number.ts";
|
|
4
|
+
import { default as Arr } from "./utils/Array.ts";
|
|
5
|
+
import { default as Obj } from "./utils/Object.ts";
|
|
6
|
+
import { default as Mix } from "./utils/Mixed.ts";
|
|
7
|
+
import { default as Hash } from "./utils/Hash.ts";
|
|
8
|
+
import { default as Signal } from "./utils/Signal.ts";
|
|
9
|
+
import { default as Locale } from "./utils/Locale.ts";
|
|
10
|
+
import { default as Cookie } from "./utils/Cookie.ts";
|
|
11
|
+
import { default as Now } from "./utils/Now.ts";
|
|
12
|
+
import { default as Dom } from "./utils/Dom.ts";
|
|
13
|
+
import { default as For } from "./utils/Format.ts";
|
|
14
|
+
export { Dom, Now, For, Run, Str, Num, Arr, Obj, Mix, Hash, Signal, Locale, Cookie };
|
|
15
|
+
import { go, browser, device, trait } from "./tool/scope.ts";
|
|
16
|
+
export { go, browser, device, trait };
|
|
17
|
+
import { default as Data } from "./utils/Data.ts";
|
|
18
|
+
import { default as Route } from "./utils/Route.ts";
|
|
19
|
+
export { Route, Data };
|
|
1
20
|
/**
|
|
2
|
-
* @type {
|
|
21
|
+
* @type {Mix}
|
|
3
22
|
*/
|
|
4
|
-
export const Any:
|
|
23
|
+
export declare const Any: Mix;
|
|
5
24
|
/**
|
|
6
|
-
* @type {
|
|
25
|
+
* @type {Signal}
|
|
7
26
|
*/
|
|
8
|
-
export const Event:
|
|
9
|
-
export function UUID(): string;
|
|
27
|
+
export declare const Event: Signal;
|
|
10
28
|
/**
|
|
11
|
-
* @
|
|
29
|
+
* @returns {string}
|
|
12
30
|
*/
|
|
13
|
-
export const
|
|
14
|
-
/**
|
|
15
|
-
* @type {typeof PicoNow}
|
|
16
|
-
*/
|
|
17
|
-
export const Now: typeof PicoNow;
|
|
18
|
-
/**
|
|
19
|
-
* @type {typeof PicoFormat}
|
|
20
|
-
*/
|
|
21
|
-
export const For: typeof PicoFormat;
|
|
22
|
-
import { default as Run } from "./utils/Runner.js";
|
|
23
|
-
import { default as Str } from "./utils/String.js";
|
|
24
|
-
import { default as Num } from "./utils/Number.js";
|
|
25
|
-
import { default as Arr } from "./utils/Array.js";
|
|
26
|
-
import { default as Obj } from "./utils/Object.js";
|
|
27
|
-
import { default as Mix } from "./utils/Mixed.js";
|
|
28
|
-
import { default as Hash } from "./utils/Hash.js";
|
|
29
|
-
import { default as Signal } from "./utils/Signal.js";
|
|
30
|
-
import { default as Locale } from "./utils/Locale.js";
|
|
31
|
-
import { default as Cookie } from "./utils/Cookie.js";
|
|
32
|
-
import { go } from "./tool/scope.js";
|
|
33
|
-
import { browser } from "./tool/scope.js";
|
|
34
|
-
import { device } from "./tool/scope.js";
|
|
35
|
-
import { default as Map } from "./wip/Map.js";
|
|
36
|
-
import { default as Data } from "./utils/Data.js";
|
|
37
|
-
import { default as Route } from "./utils/Route.js";
|
|
38
|
-
import { default as Element } from "./wip/Element.js";
|
|
39
|
-
import { PicoMixed } from "./utils/Mixed.js";
|
|
40
|
-
import { PicoDom } from "./utils/Dom.js";
|
|
41
|
-
import { PicoNow } from "./utils/Now.js";
|
|
42
|
-
import { PicoFormat } from "./utils/Format.js";
|
|
43
|
-
export { Run, Str, Num, Arr, Obj, Mix, Hash, Signal, Locale, Cookie, go, browser, device, Map, Data, Route, Element };
|
|
31
|
+
export declare const UUID: () => string;
|
|
@@ -1,25 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
let hour: RegExp;
|
|
5
|
-
let date: RegExp;
|
|
6
|
-
let month: RegExp;
|
|
7
|
-
let year: RegExp;
|
|
1
|
+
import { PicoNow, PicoNowInterface } from "../utils/Now.ts";
|
|
2
|
+
export declare const NOW_MODIFY: any;
|
|
3
|
+
export interface PicoNowDefault extends PicoNowInterface {
|
|
8
4
|
}
|
|
9
5
|
/**
|
|
10
6
|
* @memberof PicoNow
|
|
11
|
-
* @extends {PicoNow}
|
|
12
7
|
*/
|
|
13
|
-
export class
|
|
8
|
+
export declare class PicoNowDefault {
|
|
9
|
+
static test(value: any): boolean;
|
|
14
10
|
/**
|
|
15
11
|
* Get value by scope
|
|
16
12
|
*
|
|
17
13
|
* @example Now.get("year") // => 2026
|
|
18
14
|
*
|
|
19
15
|
* @param {string} scope Value scope
|
|
20
|
-
* @returns {
|
|
16
|
+
* @returns {any} Scope value
|
|
21
17
|
*/
|
|
22
|
-
get(scope: string):
|
|
18
|
+
get(scope: string): any;
|
|
23
19
|
/**
|
|
24
20
|
* Set value by scope
|
|
25
21
|
*
|
|
@@ -36,72 +32,72 @@ export class PicoNowDefaultInstance {
|
|
|
36
32
|
* @example Now.time() // => 1739334660000
|
|
37
33
|
*
|
|
38
34
|
* @param {any} [value] New timestamp
|
|
39
|
-
* @returns {
|
|
35
|
+
* @returns {any} Timestamp or instance
|
|
40
36
|
*/
|
|
41
|
-
time(value?: any):
|
|
37
|
+
time(value?: any): any;
|
|
42
38
|
/**
|
|
43
39
|
* Get or set seconds
|
|
44
40
|
*
|
|
45
41
|
* @example Now.second() // => 45
|
|
46
42
|
*
|
|
47
43
|
* @param {any} [value] New seconds
|
|
48
|
-
* @returns {
|
|
44
|
+
* @returns {any} Seconds or instance
|
|
49
45
|
*/
|
|
50
|
-
second(value?: any):
|
|
46
|
+
second(value?: any): any;
|
|
51
47
|
/**
|
|
52
48
|
* Get or set minutes
|
|
53
49
|
*
|
|
54
50
|
* @example Now.minute() // => 30
|
|
55
51
|
*
|
|
56
52
|
* @param {any} [value] New minutes
|
|
57
|
-
* @returns {
|
|
53
|
+
* @returns {any} Minutes or instance
|
|
58
54
|
*/
|
|
59
|
-
minute(value?: any):
|
|
55
|
+
minute(value?: any): any;
|
|
60
56
|
/**
|
|
61
57
|
* Get or set hours
|
|
62
58
|
*
|
|
63
59
|
* @example Now.hour() // => 12
|
|
64
60
|
*
|
|
65
61
|
* @param {any} [value] New hours
|
|
66
|
-
* @returns {
|
|
62
|
+
* @returns {any} Hours or instance
|
|
67
63
|
*/
|
|
68
|
-
hour(value?: any):
|
|
64
|
+
hour(value?: any): any;
|
|
69
65
|
/**
|
|
70
66
|
* Get or set day of week
|
|
71
67
|
*
|
|
72
68
|
* @example Now.day() // => 1
|
|
73
69
|
*
|
|
74
70
|
* @param {any} [value] New day
|
|
75
|
-
* @returns {
|
|
71
|
+
* @returns {any} Day or instance
|
|
76
72
|
*/
|
|
77
|
-
day(value?: any):
|
|
73
|
+
day(value?: any): any;
|
|
78
74
|
/**
|
|
79
75
|
* Get or set date of month
|
|
80
76
|
*
|
|
81
77
|
* @example Now.date() // => 12
|
|
82
78
|
*
|
|
83
79
|
* @param {any} [value] New date
|
|
84
|
-
* @returns {
|
|
80
|
+
* @returns {any} Date or instance
|
|
85
81
|
*/
|
|
86
|
-
date(value?: any):
|
|
82
|
+
date(value?: any): any;
|
|
87
83
|
/**
|
|
88
84
|
* Get or set month
|
|
89
85
|
*
|
|
90
86
|
* @example Now.month() // => 2
|
|
91
87
|
*
|
|
92
88
|
* @param {any} [value] New month
|
|
93
|
-
* @returns {
|
|
89
|
+
* @returns {any} Month or instance
|
|
94
90
|
*/
|
|
95
|
-
month(value?: any):
|
|
91
|
+
month(value?: any): any;
|
|
96
92
|
/**
|
|
97
93
|
* Get or set year
|
|
98
94
|
*
|
|
99
95
|
* @example Now.year() // => 2026
|
|
100
96
|
*
|
|
101
97
|
* @param {any} [value] New year
|
|
102
|
-
* @returns {
|
|
98
|
+
* @returns {any} Year or instance
|
|
103
99
|
*/
|
|
104
|
-
year(value?: any):
|
|
100
|
+
year(value?: any): any;
|
|
105
101
|
/**
|
|
106
102
|
* Get short year
|
|
107
103
|
*
|
|
@@ -115,21 +111,21 @@ export class PicoNowDefaultInstance {
|
|
|
115
111
|
*
|
|
116
112
|
* @example Now.add(1, "day")
|
|
117
113
|
*
|
|
118
|
-
* @param {
|
|
114
|
+
* @param {any} value Add value
|
|
119
115
|
* @param {string} [scope] Target scope
|
|
120
116
|
* @returns {PicoNow} Current instance
|
|
121
117
|
*/
|
|
122
|
-
add(value:
|
|
118
|
+
add(value: any, scope?: string): PicoNow;
|
|
123
119
|
/**
|
|
124
120
|
* Subtract value from scope
|
|
125
121
|
*
|
|
126
122
|
* @example Now.sub(1, "day")
|
|
127
123
|
*
|
|
128
|
-
* @param {
|
|
124
|
+
* @param {any} value Sub value
|
|
129
125
|
* @param {string} [scope] Target scope
|
|
130
126
|
* @returns {PicoNow} Current instance
|
|
131
127
|
*/
|
|
132
|
-
sub(value:
|
|
128
|
+
sub(value: any, scope?: string): PicoNow;
|
|
133
129
|
/**
|
|
134
130
|
* Check if string is modifiable
|
|
135
131
|
*
|
|
@@ -155,10 +151,10 @@ export class PicoNowDefaultInstance {
|
|
|
155
151
|
*
|
|
156
152
|
* @param {any} value Source value
|
|
157
153
|
* @param {string} [format] Source format
|
|
158
|
-
* @param {
|
|
154
|
+
* @param {string[]} [keys] Scope keys
|
|
159
155
|
* @returns {PicoNow} Current instance
|
|
160
156
|
*/
|
|
161
|
-
apply(value: any, format?: string, keys?:
|
|
157
|
+
apply(value: any, format?: string, keys?: string[]): PicoNow;
|
|
162
158
|
/**
|
|
163
159
|
* Apply date from other value
|
|
164
160
|
*
|
|
@@ -179,70 +175,5 @@ export class PicoNowDefaultInstance {
|
|
|
179
175
|
* @returns {PicoNow} Current instance
|
|
180
176
|
*/
|
|
181
177
|
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;
|
|
246
178
|
}
|
|
247
|
-
export
|
|
248
|
-
import { PicoNow } from "../utils/Now.js";
|
|
179
|
+
export default PicoNowDefault;
|
package/types/now/NowFormat.d.ts
CHANGED
|
@@ -1,25 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
let LTS: string;
|
|
8
|
-
let LTSD: string;
|
|
9
|
-
}
|
|
10
|
-
export namespace NOW_PARSE {
|
|
11
|
-
let second: string;
|
|
12
|
-
let minute: string;
|
|
13
|
-
let hour: string;
|
|
14
|
-
let date: string;
|
|
15
|
-
let month: string;
|
|
16
|
-
let year: string;
|
|
1
|
+
import { PicoNow, PicoNowInterface } from "../utils/Now.ts";
|
|
2
|
+
import PicoNowDefault from "./NowDefault.js";
|
|
3
|
+
import PicoNowHuman from "./NowHuman.js";
|
|
4
|
+
export declare const NOW_FORMAT: any;
|
|
5
|
+
export declare const NOW_PARSE: any;
|
|
6
|
+
export interface PicoNowFormat extends PicoNowInterface, PicoNowDefault, PicoNowHuman {
|
|
17
7
|
}
|
|
18
8
|
/**
|
|
19
9
|
* @memberof PicoNow
|
|
20
|
-
* @extends {PicoNow}
|
|
21
10
|
*/
|
|
22
|
-
export class
|
|
11
|
+
export declare class PicoNowFormat {
|
|
23
12
|
/**
|
|
24
13
|
* Check if value matches format
|
|
25
14
|
*
|
|
@@ -40,7 +29,6 @@ export class PicoNowFormatInstance {
|
|
|
40
29
|
* @returns {PicoNow} Current instance
|
|
41
30
|
*/
|
|
42
31
|
parse(value: any, format?: string): PicoNow;
|
|
43
|
-
value: Date;
|
|
44
32
|
/**
|
|
45
33
|
* Parse date using format
|
|
46
34
|
*
|
|
@@ -70,5 +58,4 @@ export class PicoNowFormatInstance {
|
|
|
70
58
|
*/
|
|
71
59
|
code(format?: string): number;
|
|
72
60
|
}
|
|
73
|
-
export
|
|
74
|
-
import { PicoNow } from "../utils/Now.js";
|
|
61
|
+
export default PicoNowFormat;
|
package/types/now/NowGrid.d.ts
CHANGED
|
@@ -1,108 +1,86 @@
|
|
|
1
|
+
import { PicoNowInterface } from "../utils/Now.ts";
|
|
2
|
+
import PicoNowWalker from "./NowWalker.js";
|
|
3
|
+
export interface PicoNowGrid extends PicoNowInterface, PicoNowWalker {
|
|
4
|
+
}
|
|
1
5
|
/**
|
|
2
6
|
* @memberof PicoNow
|
|
3
|
-
* @extends {PicoNow}
|
|
4
7
|
*/
|
|
5
|
-
export class
|
|
8
|
+
export declare class PicoNowGrid {
|
|
6
9
|
/**
|
|
7
10
|
* Get grid of dates by scope
|
|
8
11
|
*
|
|
9
12
|
* @example Now.grid("month") // => [Now, Now, ...]
|
|
10
13
|
*
|
|
11
14
|
* @param {string} [scope] Grid scope
|
|
12
|
-
* @returns {Array<
|
|
15
|
+
* @returns {Array<PicoNowInterface>} Array of dates
|
|
13
16
|
*/
|
|
14
|
-
grid(scope?: string): Array<
|
|
17
|
+
grid(scope?: string): Array<PicoNowInterface>;
|
|
15
18
|
/**
|
|
16
19
|
* Get seconds grid
|
|
17
20
|
*
|
|
18
21
|
* @example Now.getSecondsGrid(10)
|
|
19
22
|
*
|
|
20
23
|
* @param {number} [interval] Step interval
|
|
21
|
-
* @returns {Array<
|
|
24
|
+
* @returns {Array<PicoNowInterface>} Array of dates
|
|
22
25
|
*/
|
|
23
|
-
getSecondsGrid(interval?: number): Array<
|
|
26
|
+
getSecondsGrid(interval?: number): Array<PicoNowInterface>;
|
|
24
27
|
/**
|
|
25
28
|
* Get minutes grid
|
|
26
29
|
*
|
|
27
30
|
* @example Now.getMinutesGrid(10)
|
|
28
31
|
*
|
|
29
32
|
* @param {number} [interval] Step interval
|
|
30
|
-
* @returns {Array<
|
|
33
|
+
* @returns {Array<PicoNowInterface>} Array of dates
|
|
31
34
|
*/
|
|
32
|
-
getMinutesGrid(interval?: number): Array<
|
|
35
|
+
getMinutesGrid(interval?: number): Array<PicoNowInterface>;
|
|
33
36
|
/**
|
|
34
37
|
* Get hours grid
|
|
35
38
|
*
|
|
36
39
|
* @example Now.getHoursGrid(2)
|
|
37
40
|
*
|
|
38
41
|
* @param {number} [interval] Step interval
|
|
39
|
-
* @returns {Array<
|
|
42
|
+
* @returns {Array<PicoNowInterface>} Array of dates
|
|
40
43
|
*/
|
|
41
|
-
getHoursGrid(interval?: number): Array<
|
|
44
|
+
getHoursGrid(interval?: number): Array<PicoNowInterface>;
|
|
42
45
|
/**
|
|
43
46
|
* Get days grid
|
|
44
47
|
*
|
|
45
48
|
* @example Now.getDaysGrid()
|
|
46
49
|
*
|
|
47
|
-
* @returns {Array<
|
|
50
|
+
* @returns {Array<PicoNowInterface>} Array of dates
|
|
48
51
|
*/
|
|
49
|
-
getDaysGrid(): Array<
|
|
52
|
+
getDaysGrid(): Array<PicoNowInterface>;
|
|
50
53
|
/**
|
|
51
54
|
* Get dates grid
|
|
52
55
|
*
|
|
53
56
|
* @example Now.getDatesGrid()
|
|
54
57
|
*
|
|
55
|
-
* @returns {Array<
|
|
58
|
+
* @returns {Array<PicoNowInterface>} Array of dates
|
|
56
59
|
*/
|
|
57
|
-
getDatesGrid(): Array<
|
|
60
|
+
getDatesGrid(): Array<PicoNowInterface>;
|
|
58
61
|
/**
|
|
59
62
|
* Get months grid
|
|
60
63
|
*
|
|
61
64
|
* @example Now.getMonthsGrid()
|
|
62
65
|
*
|
|
63
|
-
* @returns {Array<
|
|
66
|
+
* @returns {Array<PicoNowInterface>} Array of dates
|
|
64
67
|
*/
|
|
65
|
-
getMonthsGrid(): Array<
|
|
68
|
+
getMonthsGrid(): Array<PicoNowInterface>;
|
|
66
69
|
/**
|
|
67
70
|
* Get years grid
|
|
68
71
|
*
|
|
69
72
|
* @example Now.getYearsGrid()
|
|
70
73
|
*
|
|
71
|
-
* @returns {Array<
|
|
74
|
+
* @returns {Array<PicoNowInterface>} Array of dates
|
|
72
75
|
*/
|
|
73
|
-
getYearsGrid(): Array<
|
|
76
|
+
getYearsGrid(): Array<PicoNowInterface>;
|
|
74
77
|
/**
|
|
75
78
|
* Get decades grid
|
|
76
79
|
*
|
|
77
80
|
* @example Now.getDecadesGrid()
|
|
78
81
|
*
|
|
79
|
-
* @returns {Array<
|
|
80
|
-
*/
|
|
81
|
-
getDecadesGrid(): Array<PicoNow>;
|
|
82
|
-
/**
|
|
83
|
-
* @see PicoNow.grid
|
|
84
|
-
*/
|
|
85
|
-
getYears(): PicoNow[];
|
|
86
|
-
/**
|
|
87
|
-
* @see PicoNow.grid
|
|
88
|
-
*/
|
|
89
|
-
getMonths(): PicoNow[];
|
|
90
|
-
/**
|
|
91
|
-
* @see PicoNow.grid
|
|
92
|
-
*/
|
|
93
|
-
getDates(): PicoNow[];
|
|
94
|
-
/**
|
|
95
|
-
* @see PicoNow.grid
|
|
96
|
-
*/
|
|
97
|
-
getHours(): PicoNow[];
|
|
98
|
-
/**
|
|
99
|
-
* @see PicoNow.grid
|
|
100
|
-
*/
|
|
101
|
-
getMinutes(): PicoNow[];
|
|
102
|
-
/**
|
|
103
|
-
* @see PicoNow.grid
|
|
82
|
+
* @returns {Array<PicoNowInterface>} Array of dates
|
|
104
83
|
*/
|
|
105
|
-
|
|
84
|
+
getDecadesGrid(): Array<PicoNowInterface>;
|
|
106
85
|
}
|
|
107
|
-
export
|
|
108
|
-
import { PicoNow } from "../utils/Now.js";
|
|
86
|
+
export default PicoNowGrid;
|
package/types/now/NowHuman.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export class
|
|
1
|
+
import { PicoNowInterface } from "../utils/Now.ts";
|
|
2
|
+
import PicoNowDefault from "./NowDefault.js";
|
|
3
|
+
export declare const NOW_HUMAN_DAYS: string[];
|
|
4
|
+
export declare const NOW_HUMAN_MONTHS: string[];
|
|
5
|
+
export interface PicoNowHuman extends PicoNowInterface, PicoNowDefault {
|
|
6
|
+
}
|
|
7
|
+
export declare class PicoNowHuman {
|
|
8
8
|
/**
|
|
9
9
|
* Get human readable value
|
|
10
10
|
*
|
|
@@ -12,9 +12,9 @@ export class PicoNowHumanInstance {
|
|
|
12
12
|
*
|
|
13
13
|
* @param {string} [scope] Value scope
|
|
14
14
|
* @param {number} [substr] Substring length
|
|
15
|
-
* @returns {
|
|
15
|
+
* @returns {any} Human value
|
|
16
16
|
*/
|
|
17
|
-
human(scope?: string, substr?: number):
|
|
17
|
+
human(scope?: string, substr?: number): any;
|
|
18
18
|
/**
|
|
19
19
|
* Get human readable day
|
|
20
20
|
*
|
|
@@ -34,5 +34,4 @@ export class PicoNowHumanInstance {
|
|
|
34
34
|
*/
|
|
35
35
|
getHumanMonth(substr?: number): string;
|
|
36
36
|
}
|
|
37
|
-
export
|
|
38
|
-
import { PicoNow } from "../utils/Now.js";
|
|
37
|
+
export default PicoNowHuman;
|
package/types/now/NowMatch.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { PicoNowInterface } from "../utils/Now.ts";
|
|
2
|
+
import PicoNowFormat from "./NowFormat.js";
|
|
3
|
+
export interface PicoNowMatch extends PicoNowInterface, PicoNowFormat {
|
|
4
|
+
}
|
|
1
5
|
/**
|
|
2
6
|
* @memberof PicoNow
|
|
3
|
-
* @extends {PicoNow}
|
|
4
7
|
*/
|
|
5
|
-
export class
|
|
8
|
+
export declare class PicoNowMatch {
|
|
6
9
|
/**
|
|
7
10
|
* Check if date is before value
|
|
8
11
|
*
|
|
@@ -105,5 +108,4 @@ export class PicoNowMatchInstance {
|
|
|
105
108
|
*/
|
|
106
109
|
between(start?: any, end?: any, format?: string): boolean;
|
|
107
110
|
}
|
|
108
|
-
export
|
|
109
|
-
import { PicoNow } from "../utils/Now.js";
|
|
111
|
+
export default PicoNowMatch;
|