@kizmann/pico-js 1.0.14 → 2.0.1

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.
Files changed (124) hide show
  1. package/README.md +27 -7
  2. package/dist/pico-js.browser.js +2 -0
  3. package/dist/pico-js.browser.js.map +1 -0
  4. package/dist/pico-js.esm.js +2 -0
  5. package/dist/pico-js.esm.js.map +1 -0
  6. package/package.json +19 -7
  7. package/src/dom/DomAttribute.js +376 -0
  8. package/src/dom/DomBuilder.js +154 -0
  9. package/src/dom/DomEvent.js +255 -0
  10. package/src/dom/DomFinder.js +671 -0
  11. package/src/dom/DomForm.js +59 -0
  12. package/src/dom/DomGlobal.js +195 -0
  13. package/src/dom/DomInview.js +334 -0
  14. package/src/dom/DomMeta.js +68 -0
  15. package/src/dom/DomObserver.js +59 -0
  16. package/src/dom/DomRectangle.js +658 -0
  17. package/src/format/FormatFile.js +56 -0
  18. package/src/format/FormatOption.js +110 -0
  19. package/src/format/FormatParam.js +109 -0
  20. package/src/format/FormatParser.js +158 -0
  21. package/src/format/FormatUrl.js +77 -0
  22. package/src/index.browser.js +31 -0
  23. package/src/index.esm.js +116 -0
  24. package/src/now/NowDefault.js +535 -0
  25. package/src/now/NowFormat.js +198 -0
  26. package/src/now/NowGrid.js +253 -0
  27. package/src/now/NowHuman.js +120 -0
  28. package/src/now/NowMatch.js +177 -0
  29. package/src/now/NowRange.js +72 -0
  30. package/src/now/NowWalker.js +546 -0
  31. package/src/tool/scope.js +103 -0
  32. package/src/utils/Array.js +986 -0
  33. package/src/utils/Cookie.js +184 -0
  34. package/src/utils/Data.js +200 -0
  35. package/src/utils/Dom.js +208 -0
  36. package/src/utils/Event.js +140 -0
  37. package/src/utils/Format.js +62 -0
  38. package/src/utils/Hash.js +164 -0
  39. package/src/utils/Locale.js +229 -0
  40. package/src/utils/Mixed.js +887 -0
  41. package/src/utils/Now.js +234 -0
  42. package/src/utils/Number.js +238 -0
  43. package/src/utils/Object.js +655 -0
  44. package/src/utils/Route.js +67 -0
  45. package/src/utils/Runner.js +327 -0
  46. package/src/utils/String.js +618 -0
  47. package/src/{library/element.js → wip/Element.js} +90 -16
  48. package/src/{library/map.js → wip/Map.js} +256 -40
  49. package/types/dom/DomAttribute.d.ts +138 -0
  50. package/types/dom/DomBuilder.d.ts +68 -0
  51. package/types/dom/DomEvent.d.ts +104 -0
  52. package/types/dom/DomFinder.d.ts +322 -0
  53. package/types/dom/DomForm.d.ts +22 -0
  54. package/types/dom/DomGlobal.d.ts +80 -0
  55. package/types/dom/DomInview.d.ts +115 -0
  56. package/types/dom/DomMeta.d.ts +30 -0
  57. package/types/dom/DomObserver.d.ts +22 -0
  58. package/types/dom/DomRectangle.d.ts +271 -0
  59. package/types/format/FormatFile.d.ts +19 -0
  60. package/types/format/FormatOption.d.ts +41 -0
  61. package/types/format/FormatParam.d.ts +40 -0
  62. package/types/format/FormatParser.d.ts +47 -0
  63. package/types/format/FormatUrl.d.ts +18 -0
  64. package/types/index.esm.d.ts +78 -0
  65. package/types/now/NowDefault.d.ts +184 -0
  66. package/types/now/NowFormat.d.ts +71 -0
  67. package/types/now/NowGrid.d.ts +108 -0
  68. package/types/now/NowHuman.d.ts +38 -0
  69. package/types/now/NowMatch.d.ts +109 -0
  70. package/types/now/NowRange.d.ts +22 -0
  71. package/types/now/NowWalker.d.ts +302 -0
  72. package/types/tool/scope.d.ts +24 -0
  73. package/types/utils/Array.d.ts +480 -0
  74. package/types/utils/Cookie.d.ts +60 -0
  75. package/types/utils/Data.d.ts +91 -0
  76. package/types/utils/Dom.d.ts +138 -0
  77. package/types/utils/Event.d.ts +58 -0
  78. package/types/utils/Format.d.ts +37 -0
  79. package/types/utils/Hash.d.ts +81 -0
  80. package/types/utils/Locale.d.ts +115 -0
  81. package/types/utils/Mixed.d.ts +469 -0
  82. package/types/utils/Now.d.ts +125 -0
  83. package/types/utils/Number.d.ts +127 -0
  84. package/types/utils/Object.d.ts +255 -0
  85. package/types/utils/Route.d.ts +37 -0
  86. package/types/utils/Runner.d.ts +139 -0
  87. package/types/utils/String.d.ts +330 -0
  88. package/types/wip/Element.d.ts +119 -0
  89. package/types/wip/Map.d.ts +254 -0
  90. package/dist/.ignore.js +0 -0
  91. package/dist/pico-js.js +0 -2
  92. package/dist/pico-js.js.map +0 -1
  93. package/src/element/default.js +0 -46
  94. package/src/element/example.js +0 -58
  95. package/src/index.js +0 -90
  96. package/src/library/cookie.js +0 -123
  97. package/src/library/data.js +0 -111
  98. package/src/library/event.js +0 -91
  99. package/src/library/locale.js +0 -84
  100. package/src/library/queue.js +0 -64
  101. package/src/library/route.js +0 -28
  102. package/src/utility/any.js +0 -369
  103. package/src/utility/array.js +0 -410
  104. package/src/utility/dom.js +0 -1425
  105. package/src/utility/now.js +0 -544
  106. package/src/utility/number.js +0 -128
  107. package/src/utility/object.js +0 -429
  108. package/src/utility/string.js +0 -328
  109. package/types/index.d.ts +0 -77
  110. package/types/library/cookie.d.ts +0 -10
  111. package/types/library/data.d.ts +0 -15
  112. package/types/library/element.d.ts +0 -22
  113. package/types/library/event.d.ts +0 -13
  114. package/types/library/locale.d.ts +0 -14
  115. package/types/library/map.d.ts +0 -43
  116. package/types/library/queue.d.ts +0 -18
  117. package/types/library/route.d.ts +0 -11
  118. package/types/utility/any.d.ts +0 -35
  119. package/types/utility/array.d.ts +0 -46
  120. package/types/utility/dom.d.ts +0 -101
  121. package/types/utility/now.d.ts +0 -79
  122. package/types/utility/number.d.ts +0 -17
  123. package/types/utility/object.d.ts +0 -29
  124. package/types/utility/string.d.ts +0 -26
@@ -0,0 +1,78 @@
1
+ /**
2
+ * @type {typeof PicoDom}
3
+ */
4
+ export const Dom: typeof PicoDom;
5
+ /**
6
+ * @type {typeof PicoNow}
7
+ */
8
+ export const Now: typeof PicoNow;
9
+ /**
10
+ * @type {typeof PicoFormat}
11
+ */
12
+ export const For: typeof PicoFormat;
13
+ /**
14
+ * @type {typeof PicoRunner}
15
+ */
16
+ export const Run: typeof PicoRunner;
17
+ /**
18
+ * @type {typeof PicoString}
19
+ */
20
+ export const Str: typeof PicoString;
21
+ /**
22
+ * @type {typeof PicoNumber}
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;
58
+ import { go } from "./tool/scope.js";
59
+ import { browser } from "./tool/scope.js";
60
+ import { device } from "./tool/scope.js";
61
+ import { default as Map } from "./wip/Map.js";
62
+ import { default as Data } from "./utils/Data.js";
63
+ import { default as Route } from "./utils/Route.js";
64
+ import { default as Element } from "./wip/Element.js";
65
+ import { PicoDom } from "./utils/Dom.js";
66
+ import { PicoNow } from "./utils/Now.js";
67
+ import { PicoFormat } from "./utils/Format.js";
68
+ import { default as PicoRunner } from "./utils/Runner.js";
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 };
@@ -0,0 +1,184 @@
1
+ export namespace NOW_MODIFY {
2
+ let second: RegExp;
3
+ let minute: RegExp;
4
+ let hour: RegExp;
5
+ let date: RegExp;
6
+ let month: RegExp;
7
+ let year: RegExp;
8
+ }
9
+ /**
10
+ * @memberof PicoNow
11
+ * @extends {PicoNow}
12
+ */
13
+ export class PicoNowDefaultInstance {
14
+ /**
15
+ * Get value by scope
16
+ *
17
+ * @example Now.get("year") // => 2026
18
+ *
19
+ * @param {string} scope Value scope
20
+ * @returns {number|PicoNow} Scope value
21
+ */
22
+ get(scope: string): number | PicoNow;
23
+ /**
24
+ * Set value by scope
25
+ *
26
+ * @example Now.set(2026, "year")
27
+ *
28
+ * @param {any} value New value
29
+ * @param {string} scope Value scope
30
+ * @returns {PicoNow} Current instance
31
+ */
32
+ set(value: any, scope: string): PicoNow;
33
+ /**
34
+ * Get or set timestamp
35
+ *
36
+ * @example Now.time() // => 1739334660000
37
+ *
38
+ * @param {any} [value] New timestamp
39
+ * @returns {number|PicoNow} Timestamp or instance
40
+ */
41
+ time(value?: any): number | PicoNow;
42
+ /**
43
+ * Get or set seconds
44
+ *
45
+ * @example Now.second() // => 45
46
+ *
47
+ * @param {any} [value] New seconds
48
+ * @returns {number|PicoNow} Seconds or instance
49
+ */
50
+ second(value?: any): number | PicoNow;
51
+ /**
52
+ * Get or set minutes
53
+ *
54
+ * @example Now.minute() // => 30
55
+ *
56
+ * @param {any} [value] New minutes
57
+ * @returns {number|PicoNow} Minutes or instance
58
+ */
59
+ minute(value?: any): number | PicoNow;
60
+ /**
61
+ * Get or set hours
62
+ *
63
+ * @example Now.hour() // => 12
64
+ *
65
+ * @param {any} [value] New hours
66
+ * @returns {number|PicoNow} Hours or instance
67
+ */
68
+ hour(value?: any): number | PicoNow;
69
+ /**
70
+ * Get or set day of week
71
+ *
72
+ * @example Now.day() // => 1
73
+ *
74
+ * @param {any} [value] New day
75
+ * @returns {number|PicoNow} Day or instance
76
+ */
77
+ day(value?: any): number | PicoNow;
78
+ /**
79
+ * Get or set date of month
80
+ *
81
+ * @example Now.date() // => 12
82
+ *
83
+ * @param {any} [value] New date
84
+ * @returns {number|PicoNow} Date or instance
85
+ */
86
+ date(value?: any): number | PicoNow;
87
+ /**
88
+ * Get or set month
89
+ *
90
+ * @example Now.month() // => 2
91
+ *
92
+ * @param {any} [value] New month
93
+ * @returns {number|PicoNow} Month or instance
94
+ */
95
+ month(value?: any): number | PicoNow;
96
+ /**
97
+ * Get or set year
98
+ *
99
+ * @example Now.year() // => 2026
100
+ *
101
+ * @param {any} [value] New year
102
+ * @returns {number|PicoNow} Year or instance
103
+ */
104
+ year(value?: any): number | PicoNow;
105
+ /**
106
+ * Get short year
107
+ *
108
+ * @example Now.shortyear() // => "26"
109
+ *
110
+ * @returns {string} Short year
111
+ */
112
+ shortyear(): string;
113
+ /**
114
+ * Add value to scope
115
+ *
116
+ * @example Now.add(1, "day")
117
+ *
118
+ * @param {number} value Add value
119
+ * @param {string} [scope] Target scope
120
+ * @returns {PicoNow} Current instance
121
+ */
122
+ add(value: number, scope?: string): PicoNow;
123
+ /**
124
+ * Subtract value from scope
125
+ *
126
+ * @example Now.sub(1, "day")
127
+ *
128
+ * @param {number} value Sub value
129
+ * @param {string} [scope] Target scope
130
+ * @returns {PicoNow} Current instance
131
+ */
132
+ sub(value: number, scope?: string): PicoNow;
133
+ /**
134
+ * Check if string is modifiable
135
+ *
136
+ * @example Now.isModifible("+1 day") // => true
137
+ *
138
+ * @param {string} value Test value
139
+ * @returns {boolean} Is modifiable
140
+ */
141
+ isModifible(value: string): boolean;
142
+ /**
143
+ * Modify date by string
144
+ *
145
+ * @example Now.modify("+1 day")
146
+ *
147
+ * @param {string} value Modify string
148
+ * @returns {PicoNow} Current instance
149
+ */
150
+ modify(value: string): PicoNow;
151
+ /**
152
+ * Apply values from other date
153
+ *
154
+ * @example Now.apply("2026-01-01", "YYYY-MM-DD", ["year"])
155
+ *
156
+ * @param {any} value Source value
157
+ * @param {string} [format] Source format
158
+ * @param {Array<string>} [keys] Scope keys
159
+ * @returns {PicoNow} Current instance
160
+ */
161
+ apply(value: any, format?: string, keys?: Array<string>): PicoNow;
162
+ /**
163
+ * Apply date from other value
164
+ *
165
+ * @example Now.applyDate("2026-01-01")
166
+ *
167
+ * @param {any} value Source value
168
+ * @param {string} [format] Source format
169
+ * @returns {PicoNow} Current instance
170
+ */
171
+ applyDate(value: any, format?: string): PicoNow;
172
+ /**
173
+ * Apply time from other value
174
+ *
175
+ * @example Now.applyTime("12:00:00")
176
+ *
177
+ * @param {any} value Source value
178
+ * @param {string} [format] Source format
179
+ * @returns {PicoNow} Current instance
180
+ */
181
+ applyTime(value: any, format?: string): PicoNow;
182
+ }
183
+ export function PicoNowDefaultPlugin(self: typeof PicoNow): typeof PicoNow;
184
+ import { PicoNow } from "../utils/Now.js";
@@ -0,0 +1,71 @@
1
+ export namespace NOW_FORMAT {
2
+ let L: string;
3
+ let LL: string;
4
+ let LLL: string;
5
+ let LLLL: string;
6
+ }
7
+ export namespace NOW_PARSE {
8
+ let second: string;
9
+ let minute: string;
10
+ let hour: string;
11
+ let date: string;
12
+ let month: string;
13
+ let year: string;
14
+ }
15
+ /**
16
+ * @memberof PicoNow
17
+ * @extends {PicoNow}
18
+ */
19
+ export class PicoNowFormatInstance {
20
+ /**
21
+ * Check if value matches format
22
+ *
23
+ * @example Now.isParsable("2026-01-01") // => true
24
+ *
25
+ * @param {string} value Test value
26
+ * @param {string} [format] Date format
27
+ * @returns {boolean} Is parsable
28
+ */
29
+ isParsable(value: string, format?: string): boolean;
30
+ /**
31
+ * Parse date from string
32
+ *
33
+ * @example Now.parse("2026-01-01") // => Now
34
+ *
35
+ * @param {any} value Input value
36
+ * @param {string} [format] Input format
37
+ * @returns {PicoNow} Current instance
38
+ */
39
+ parse(value: any, format?: string): PicoNow;
40
+ value: Date;
41
+ /**
42
+ * Parse date using format
43
+ *
44
+ * @example Now.parseFormat("01/01/2026", "DD/MM/YYYY")
45
+ *
46
+ * @param {string} value Input value
47
+ * @param {string} format Input format
48
+ * @returns {PicoNow} Current instance
49
+ */
50
+ parseFormat(value: string, format: string): PicoNow;
51
+ /**
52
+ * Format date to string
53
+ *
54
+ * @example Now.format("YYYY-MM-DD") // => "2026-02-12"
55
+ *
56
+ * @param {string} [format] Output format
57
+ * @returns {string} Formatted string
58
+ */
59
+ format(format?: string): string;
60
+ /**
61
+ * Format date as integer
62
+ *
63
+ * @example Now.code("YYYYMMDD") // => 20260212
64
+ *
65
+ * @param {string} [format] Output format
66
+ * @returns {number} Formatted integer
67
+ */
68
+ code(format?: string): number;
69
+ }
70
+ export function PicoNowFormatPlugin(self: typeof PicoNow): typeof PicoNow;
71
+ import { PicoNow } from "../utils/Now.js";
@@ -0,0 +1,108 @@
1
+ /**
2
+ * @memberof PicoNow
3
+ * @extends {PicoNow}
4
+ */
5
+ export class PicoNowGridInstance {
6
+ /**
7
+ * Get grid of dates by scope
8
+ *
9
+ * @example Now.grid("month") // => [Now, Now, ...]
10
+ *
11
+ * @param {string} [scope] Grid scope
12
+ * @returns {Array<PicoNow>} Array of dates
13
+ */
14
+ grid(scope?: string): Array<PicoNow>;
15
+ /**
16
+ * Get seconds grid
17
+ *
18
+ * @example Now.getSecondsGrid(10)
19
+ *
20
+ * @param {number} [interval] Step interval
21
+ * @returns {Array<PicoNow>} Array of dates
22
+ */
23
+ getSecondsGrid(interval?: number): Array<PicoNow>;
24
+ /**
25
+ * Get minutes grid
26
+ *
27
+ * @example Now.getMinutesGrid(10)
28
+ *
29
+ * @param {number} [interval] Step interval
30
+ * @returns {Array<PicoNow>} Array of dates
31
+ */
32
+ getMinutesGrid(interval?: number): Array<PicoNow>;
33
+ /**
34
+ * Get hours grid
35
+ *
36
+ * @example Now.getHoursGrid(2)
37
+ *
38
+ * @param {number} [interval] Step interval
39
+ * @returns {Array<PicoNow>} Array of dates
40
+ */
41
+ getHoursGrid(interval?: number): Array<PicoNow>;
42
+ /**
43
+ * Get days grid
44
+ *
45
+ * @example Now.getDaysGrid()
46
+ *
47
+ * @returns {Array<PicoNow>} Array of dates
48
+ */
49
+ getDaysGrid(): Array<PicoNow>;
50
+ /**
51
+ * Get dates grid
52
+ *
53
+ * @example Now.getDatesGrid()
54
+ *
55
+ * @returns {Array<PicoNow>} Array of dates
56
+ */
57
+ getDatesGrid(): Array<PicoNow>;
58
+ /**
59
+ * Get months grid
60
+ *
61
+ * @example Now.getMonthsGrid()
62
+ *
63
+ * @returns {Array<PicoNow>} Array of dates
64
+ */
65
+ getMonthsGrid(): Array<PicoNow>;
66
+ /**
67
+ * Get years grid
68
+ *
69
+ * @example Now.getYearsGrid()
70
+ *
71
+ * @returns {Array<PicoNow>} Array of dates
72
+ */
73
+ getYearsGrid(): Array<PicoNow>;
74
+ /**
75
+ * Get decades grid
76
+ *
77
+ * @example Now.getDecadesGrid()
78
+ *
79
+ * @returns {Array<PicoNow>} Array of dates
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
104
+ */
105
+ getSeconds(): PicoNow[];
106
+ }
107
+ export function PicoNowGridPlugin(self: typeof PicoNow): typeof PicoNow;
108
+ import { PicoNow } from "../utils/Now.js";
@@ -0,0 +1,38 @@
1
+ export const NOW_HUMAN_DAYS: string[];
2
+ export const NOW_HUMAN_MONTHS: string[];
3
+ /**
4
+ * @memberof PicoNow
5
+ * @extends {PicoNow}
6
+ */
7
+ export class PicoNowHumanInstance {
8
+ /**
9
+ * Get human readable value
10
+ *
11
+ * @example Now.human("day") // => "Monday"
12
+ *
13
+ * @param {string} [scope] Value scope
14
+ * @param {number} [substr] Substring length
15
+ * @returns {string|number} Human value
16
+ */
17
+ human(scope?: string, substr?: number): string | number;
18
+ /**
19
+ * Get human readable day
20
+ *
21
+ * @example Now.getHumanDay(3) // => "Mon"
22
+ *
23
+ * @param {number} [substr] Substring length
24
+ * @returns {string} Day name
25
+ */
26
+ getHumanDay(substr?: number): string;
27
+ /**
28
+ * Get human readable month
29
+ *
30
+ * @example Now.getHumanMonth(3) // => "Jan"
31
+ *
32
+ * @param {number} [substr] Substring length
33
+ * @returns {string} Month name
34
+ */
35
+ getHumanMonth(substr?: number): string;
36
+ }
37
+ export function PicoNowHumanPlugin(self: typeof PicoNow): typeof PicoNow;
38
+ import { PicoNow } from "../utils/Now.js";
@@ -0,0 +1,109 @@
1
+ /**
2
+ * @memberof PicoNow
3
+ * @extends {PicoNow}
4
+ */
5
+ export class PicoNowMatchInstance {
6
+ /**
7
+ * Check if date is before value
8
+ *
9
+ * @example Now.make("2026-01-01").before("2026-02-12") // => true
10
+ *
11
+ * @param {any} [value] Compare value
12
+ * @param {string} [format] Compare format
13
+ * @returns {boolean} True if before
14
+ */
15
+ before(value?: any, format?: string): boolean;
16
+ /**
17
+ * Check if date is before value date
18
+ *
19
+ * @example Now.make("2026-01-01").beforeDate("2026-02-12")
20
+ *
21
+ * @param {any} [value] Compare value
22
+ * @param {string} [format] Compare format
23
+ * @returns {boolean} True if before
24
+ */
25
+ beforeDate(value?: any, format?: string): boolean;
26
+ /**
27
+ * Check if date is before value time
28
+ *
29
+ * @example Now.make("10:00:00").beforeTime("12:00:00")
30
+ *
31
+ * @param {any} [value] Compare value
32
+ * @param {string} [format] Compare format
33
+ * @returns {boolean} True if before
34
+ */
35
+ beforeTime(value?: any, format?: string): boolean;
36
+ /**
37
+ * Check if date is after value
38
+ *
39
+ * @example Now.make("2026-02-12").after("2026-01-01") // => true
40
+ *
41
+ * @param {any} [value] Compare value
42
+ * @param {string} [format] Compare format
43
+ * @returns {boolean} True if after
44
+ */
45
+ after(value?: any, format?: string): boolean;
46
+ /**
47
+ * Check if date is after value date
48
+ *
49
+ * @example Now.make("2026-02-12").afterDate("2026-01-01")
50
+ *
51
+ * @param {any} [value] Compare value
52
+ * @param {string} [format] Compare format
53
+ * @returns {boolean} True if after
54
+ */
55
+ afterDate(value?: any, format?: string): boolean;
56
+ /**
57
+ * Check if date is after value time
58
+ *
59
+ * @example Now.make("12:00:00").afterTime("10:00:00")
60
+ *
61
+ * @param {any} [value] Compare value
62
+ * @param {string} [format] Compare format
63
+ * @returns {boolean} True if after
64
+ */
65
+ afterTime(value?: any, format?: string): boolean;
66
+ /**
67
+ * Check if date equals value
68
+ *
69
+ * @example Now.make("2026-01-01").equal("2026-01-01") // => true
70
+ *
71
+ * @param {any} [value] Compare value
72
+ * @param {string} [format] Compare format
73
+ * @returns {boolean} True if equal
74
+ */
75
+ equal(value?: any, format?: string): boolean;
76
+ /**
77
+ * Check if date equals value date
78
+ *
79
+ * @example Now.make("2026-01-01").equalDate("2026-01-01")
80
+ *
81
+ * @param {any} [value] Compare value
82
+ * @param {string} [format] Compare format
83
+ * @returns {boolean} True if equal
84
+ */
85
+ equalDate(value?: any, format?: string): boolean;
86
+ /**
87
+ * Check if date equals value time
88
+ *
89
+ * @example Now.make("12:00:00").equalTime("12:00:00")
90
+ *
91
+ * @param {any} [value] Compare value
92
+ * @param {string} [format] Compare format
93
+ * @returns {boolean} True if equal
94
+ */
95
+ equalTime(value?: any, format?: string): boolean;
96
+ /**
97
+ * Check if date is between values
98
+ *
99
+ * @example Now.make("2026-01-15").between("2026-01-01", "2026-01-31")
100
+ *
101
+ * @param {any} [start] Start value
102
+ * @param {any} [end] End value
103
+ * @param {string} [format] Compare format
104
+ * @returns {boolean} True if between
105
+ */
106
+ between(start?: any, end?: any, format?: string): boolean;
107
+ }
108
+ export function PicoNowMatchPlugin(self: typeof PicoNow): typeof PicoNow;
109
+ import { PicoNow } from "../utils/Now.js";
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @memberof PicoNow
3
+ * @extends {PicoNow}
4
+ */
5
+ export class PicoNowRangeInstance {
6
+ /**
7
+ * Get range of dates
8
+ *
9
+ * @example Now.range("2026-01-31", "day") // => [Now, Now, ...]
10
+ *
11
+ * @param {any} [value] End date
12
+ * @param {string} [scope] Range scope
13
+ * @returns {Array<PicoNow>} Array of dates
14
+ */
15
+ range(value?: any, scope?: string): Array<PicoNow>;
16
+ /**
17
+ * @see PicoNow.range
18
+ */
19
+ getDatesRange(...args: any[]): PicoNow[];
20
+ }
21
+ export function PicoNowRangePlugin(self: typeof PicoNow): typeof PicoNow;
22
+ import { PicoNow } from "../utils/Now.js";