@kizmann/pico-js 1.0.13 → 2.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.
Files changed (125) 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 +20 -7
  7. package/src/dom/DomAttribute.js +374 -0
  8. package/src/dom/DomBuilder.js +152 -0
  9. package/src/dom/DomEvent.js +253 -0
  10. package/src/dom/DomFinder.js +669 -0
  11. package/src/dom/DomForm.js +57 -0
  12. package/src/dom/DomGlobal.js +193 -0
  13. package/src/dom/DomInview.js +332 -0
  14. package/src/dom/DomMeta.js +66 -0
  15. package/src/dom/DomObserver.js +57 -0
  16. package/src/dom/DomRectangle.js +657 -0
  17. package/src/format/FormatFile.js +54 -0
  18. package/src/format/FormatOption.js +108 -0
  19. package/src/format/FormatParam.js +107 -0
  20. package/src/format/FormatParser.js +156 -0
  21. package/src/format/FormatUrl.js +75 -0
  22. package/src/index.browser.js +10 -0
  23. package/src/index.esm.js +138 -0
  24. package/src/now/NowDefault.js +533 -0
  25. package/src/now/NowFormat.js +196 -0
  26. package/src/now/NowGrid.js +251 -0
  27. package/src/now/NowHuman.js +118 -0
  28. package/src/now/NowMatch.js +175 -0
  29. package/src/now/NowRange.js +70 -0
  30. package/src/now/NowWalker.js +544 -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 +137 -0
  50. package/types/dom/DomBuilder.d.ts +67 -0
  51. package/types/dom/DomEvent.d.ts +103 -0
  52. package/types/dom/DomFinder.d.ts +321 -0
  53. package/types/dom/DomForm.d.ts +21 -0
  54. package/types/dom/DomGlobal.d.ts +79 -0
  55. package/types/dom/DomInview.d.ts +114 -0
  56. package/types/dom/DomMeta.d.ts +29 -0
  57. package/types/dom/DomObserver.d.ts +21 -0
  58. package/types/dom/DomRectangle.d.ts +270 -0
  59. package/types/format/FormatFile.d.ts +18 -0
  60. package/types/format/FormatOption.d.ts +40 -0
  61. package/types/format/FormatParam.d.ts +39 -0
  62. package/types/format/FormatParser.d.ts +46 -0
  63. package/types/format/FormatUrl.d.ts +17 -0
  64. package/types/index.browser.d.ts +1 -0
  65. package/types/index.esm.d.ts +52 -0
  66. package/types/now/NowDefault.d.ts +183 -0
  67. package/types/now/NowFormat.d.ts +70 -0
  68. package/types/now/NowGrid.d.ts +107 -0
  69. package/types/now/NowHuman.d.ts +37 -0
  70. package/types/now/NowMatch.d.ts +108 -0
  71. package/types/now/NowRange.d.ts +21 -0
  72. package/types/now/NowWalker.d.ts +301 -0
  73. package/types/tool/scope.d.ts +24 -0
  74. package/types/utils/Array.d.ts +480 -0
  75. package/types/utils/Cookie.d.ts +60 -0
  76. package/types/utils/Data.d.ts +91 -0
  77. package/types/utils/Dom.d.ts +138 -0
  78. package/types/utils/Event.d.ts +58 -0
  79. package/types/utils/Format.d.ts +37 -0
  80. package/types/utils/Hash.d.ts +81 -0
  81. package/types/utils/Locale.d.ts +115 -0
  82. package/types/utils/Mixed.d.ts +469 -0
  83. package/types/utils/Now.d.ts +125 -0
  84. package/types/utils/Number.d.ts +127 -0
  85. package/types/utils/Object.d.ts +255 -0
  86. package/types/utils/Route.d.ts +37 -0
  87. package/types/utils/Runner.d.ts +139 -0
  88. package/types/utils/String.d.ts +330 -0
  89. package/types/wip/Element.d.ts +119 -0
  90. package/types/wip/Map.d.ts +254 -0
  91. package/dist/.ignore.js +0 -0
  92. package/dist/pico-js.js +0 -2
  93. package/dist/pico-js.js.map +0 -1
  94. package/src/element/default.js +0 -46
  95. package/src/element/example.js +0 -58
  96. package/src/index.js +0 -90
  97. package/src/library/cookie.js +0 -123
  98. package/src/library/data.js +0 -111
  99. package/src/library/event.js +0 -91
  100. package/src/library/locale.js +0 -84
  101. package/src/library/queue.js +0 -64
  102. package/src/library/route.js +0 -28
  103. package/src/utility/any.js +0 -369
  104. package/src/utility/array.js +0 -410
  105. package/src/utility/dom.js +0 -1425
  106. package/src/utility/now.js +0 -544
  107. package/src/utility/number.js +0 -128
  108. package/src/utility/object.js +0 -429
  109. package/src/utility/string.js +0 -328
  110. package/types/index.d.ts +0 -77
  111. package/types/library/cookie.d.ts +0 -10
  112. package/types/library/data.d.ts +0 -15
  113. package/types/library/element.d.ts +0 -22
  114. package/types/library/event.d.ts +0 -13
  115. package/types/library/locale.d.ts +0 -14
  116. package/types/library/map.d.ts +0 -43
  117. package/types/library/queue.d.ts +0 -18
  118. package/types/library/route.d.ts +0 -11
  119. package/types/utility/any.d.ts +0 -35
  120. package/types/utility/array.d.ts +0 -46
  121. package/types/utility/dom.d.ts +0 -101
  122. package/types/utility/now.d.ts +0 -79
  123. package/types/utility/number.d.ts +0 -17
  124. package/types/utility/object.d.ts +0 -29
  125. package/types/utility/string.d.ts +0 -26
@@ -0,0 +1,251 @@
1
+ import { Arr, Mix, Num, Obj, Str } from "#src/index.esm.js";
2
+
3
+ /**
4
+ * @memberof PicoNow
5
+ * @extends {PicoNow}
6
+ */
7
+ export class PicoNowGridInstance
8
+ {
9
+ /**
10
+ * Get grid of dates by scope
11
+ *
12
+ * @example Now.grid("month") // => [Now, Now, ...]
13
+ *
14
+ * @param {string} [scope] Grid scope
15
+ * @returns {Array<PicoNow>} Array of dates
16
+ */
17
+ grid(scope = 'day')
18
+ {
19
+ if ( /^seconds?$/i.test(scope) ) {
20
+ return this.getSecondsGrid();
21
+ }
22
+
23
+ if ( /^minutes?$/i.test(scope) ) {
24
+ return this.getMinutesGrid();
25
+ }
26
+
27
+ if ( /^hours?$/i.test(scope) ) {
28
+ return this.getHoursGrid();
29
+ }
30
+
31
+ if ( /^days?$/i.test(scope) ) {
32
+ return this.getDaysGrid();
33
+ }
34
+
35
+ if ( /^dates?$/i.test(scope) ) {
36
+ return this.getDatesGrid();
37
+ }
38
+
39
+ if ( /^months?$/i.test(scope) ) {
40
+ return this.getMonthsGrid();
41
+ }
42
+
43
+ if ( /^years?$/i.test(scope) ) {
44
+ return this.getYearsGrid();
45
+ }
46
+
47
+ if ( /^decades?$/i.test(scope) ) {
48
+ return this.getDecadesGrid();
49
+ }
50
+
51
+ throw new Error(`Invalid grid scope type "${scope}".`);
52
+ }
53
+
54
+ /**
55
+ * Get seconds grid
56
+ *
57
+ * @example Now.getSecondsGrid(10)
58
+ *
59
+ * @param {number} [interval] Step interval
60
+ * @returns {Array<PicoNow>} Array of dates
61
+ */
62
+ getSecondsGrid(interval = 1)
63
+ {
64
+ if ( interval == null ) {
65
+ interval = 1;
66
+ }
67
+
68
+ return Arr.make(60 / interval, (i) => {
69
+ return this.clone().second(i * interval);
70
+ });
71
+ }
72
+
73
+ /**
74
+ * Get minutes grid
75
+ *
76
+ * @example Now.getMinutesGrid(10)
77
+ *
78
+ * @param {number} [interval] Step interval
79
+ * @returns {Array<PicoNow>} Array of dates
80
+ */
81
+ getMinutesGrid(interval = 1)
82
+ {
83
+ if ( interval == null ) {
84
+ interval = 1;
85
+ }
86
+
87
+ return Arr.make(60 / interval, (i) => {
88
+ return this.clone().minute(i * interval);
89
+ });
90
+ }
91
+
92
+ /**
93
+ * Get hours grid
94
+ *
95
+ * @example Now.getHoursGrid(2)
96
+ *
97
+ * @param {number} [interval] Step interval
98
+ * @returns {Array<PicoNow>} Array of dates
99
+ */
100
+ getHoursGrid(interval = 1)
101
+ {
102
+ if ( interval == null ) {
103
+ interval = 1;
104
+ }
105
+
106
+ return Arr.make(24 / interval, (i) => {
107
+ return this.clone().hour(i * interval);
108
+ });
109
+ }
110
+
111
+ /**
112
+ * Get days grid
113
+ *
114
+ * @example Now.getDaysGrid()
115
+ *
116
+ * @returns {Array<PicoNow>} Array of dates
117
+ */
118
+ getDaysGrid()
119
+ {
120
+ let dates = [
121
+ this.first('date').first('day'), this.last('date').last('day')
122
+ ];
123
+
124
+ return dates[0].range(dates[1], 'date');
125
+ }
126
+
127
+ /**
128
+ * Get dates grid
129
+ *
130
+ * @example Now.getDatesGrid()
131
+ *
132
+ * @returns {Array<PicoNow>} Array of dates
133
+ */
134
+ getDatesGrid()
135
+ {
136
+ let dates = [
137
+ this.first('date'), this.last('date')
138
+ ];
139
+
140
+ return dates[0].range(dates[1], 'date');
141
+ }
142
+
143
+ /**
144
+ * Get months grid
145
+ *
146
+ * @example Now.getMonthsGrid()
147
+ *
148
+ * @returns {Array<PicoNow>} Array of dates
149
+ */
150
+ getMonthsGrid()
151
+ {
152
+ let dates = [
153
+ this.first('month'), this.last('month')
154
+ ];
155
+
156
+ return dates[0].range(dates[1], 'month');
157
+ }
158
+
159
+ /**
160
+ * Get years grid
161
+ *
162
+ * @example Now.getYearsGrid()
163
+ *
164
+ * @returns {Array<PicoNow>} Array of dates
165
+ */
166
+ getYearsGrid()
167
+ {
168
+ let dates = [
169
+ this.first('year'), this.clone().last('year')
170
+ ];
171
+
172
+ return dates[0].range(dates[1], 'year');
173
+ }
174
+
175
+ /**
176
+ * Get decades grid
177
+ *
178
+ * @example Now.getDecadesGrid()
179
+ *
180
+ * @returns {Array<PicoNow>} Array of dates
181
+ */
182
+ getDecadesGrid()
183
+ {
184
+ let dates = [
185
+ this.first('decade'), this.clone().last('decade')
186
+ ];
187
+
188
+ return dates[0].range(dates[1], 'decade');
189
+ }
190
+
191
+ }
192
+
193
+ /**
194
+ * @see PicoNow.grid
195
+ */
196
+ PicoNowGridInstance.prototype.getYears = function () {
197
+ console.warn('Now.getYears() is deprecated, use Now.grid(\'years\') instead.');
198
+ return this.grid('years');
199
+ }
200
+
201
+ /**
202
+ * @see PicoNow.grid
203
+ */
204
+ PicoNowGridInstance.prototype.getMonths = function () {
205
+ console.warn('Now.getMonths() is deprecated, use Now.grid(\'months\') instead.');
206
+ return this.grid('months');
207
+ }
208
+
209
+ /**
210
+ * @see PicoNow.grid
211
+ */
212
+ PicoNowGridInstance.prototype.getDates = function () {
213
+ console.warn('Now.getDates() is deprecated, use Now.grid(\'dates\') instead.');
214
+ return this.grid('dates');
215
+ }
216
+
217
+ /**
218
+ * @see PicoNow.grid
219
+ */
220
+ PicoNowGridInstance.prototype.getHours = function () {
221
+ console.warn('Now.getHours() is deprecated, use Now.grid(\'hours\') instead.');
222
+ return this.grid('hours');
223
+ }
224
+
225
+ /**
226
+ * @see PicoNow.grid
227
+ */
228
+ PicoNowGridInstance.prototype.getMinutes = function () {
229
+ console.warn('Now.getMinutes() is deprecated, use Now.grid(\'minutes\') instead.');
230
+ return this.grid('minutes');
231
+ }
232
+
233
+ /**
234
+ * @see PicoNow.grid
235
+ */
236
+ PicoNowGridInstance.prototype.getSeconds = function () {
237
+ console.warn('Now.getSeconds() is deprecated, use Now.grid(\'seconds\') instead.');
238
+ return this.grid('seconds');
239
+ }
240
+
241
+ /**
242
+ * @returns {typeof import('#src/utils/Now.js').PicoNow}
243
+ */
244
+ export const PicoNowGridPlugin = function (self) {
245
+
246
+ Obj.each(Mix.proto(PicoNowGridInstance), (fn, id) => {
247
+ self.prototype[id] = fn;
248
+ });
249
+
250
+ return self;
251
+ }
@@ -0,0 +1,118 @@
1
+ import { Arr, Locale, Mix, Num, Obj, Str } from "#src/index.esm.js";
2
+
3
+ export const NOW_HUMAN_DAYS = [
4
+ 'Sunday',
5
+ 'Monday',
6
+ 'Tuesday',
7
+ 'Wednesday',
8
+ 'Thursday',
9
+ 'Friday',
10
+ 'Saturday'
11
+ ];
12
+
13
+ export const NOW_HUMAN_MONTHS = [
14
+ 'January',
15
+ 'February',
16
+ 'March',
17
+ 'April',
18
+ 'May',
19
+ 'June',
20
+ 'July',
21
+ 'August',
22
+ 'September',
23
+ 'October',
24
+ 'November',
25
+ 'December'
26
+ ];
27
+
28
+ /**
29
+ * @memberof PicoNow
30
+ * @extends {PicoNow}
31
+ */
32
+ export class PicoNowHumanInstance
33
+ {
34
+ /**
35
+ * Get human readable value
36
+ *
37
+ * @example Now.human("day") // => "Monday"
38
+ *
39
+ * @param {string} [scope] Value scope
40
+ * @param {number} [substr] Substring length
41
+ * @returns {string|number} Human value
42
+ */
43
+ human(scope = 'day', substr = null)
44
+ {
45
+ if ( /^days?$/i.test(scope) ) {
46
+ return this.getHumanDay(substr);
47
+ }
48
+
49
+ if ( /^months?$/i.test(scope) ) {
50
+ return this.getHumanMonth(substr);
51
+ }
52
+
53
+ return this.get(scope);
54
+ }
55
+
56
+ /**
57
+ * Get human readable day
58
+ *
59
+ * @example Now.getHumanDay(3) // => "Mon"
60
+ *
61
+ * @param {number} [substr] Substring length
62
+ * @returns {string} Day name
63
+ */
64
+ getHumanDay(substr = null)
65
+ {
66
+ let day = this.day() - 1;
67
+
68
+ if ( ! NOW_HUMAN_DAYS[day] ) {
69
+ throw new Error(`Invalid day number "${day}".`);
70
+ }
71
+
72
+ let value = Locale.trans(NOW_HUMAN_DAYS[day]);
73
+
74
+ if ( substr != null ) {
75
+ value = value.substring(0, substr);
76
+ }
77
+
78
+ return value;
79
+ }
80
+
81
+ /**
82
+ * Get human readable month
83
+ *
84
+ * @example Now.getHumanMonth(3) // => "Jan"
85
+ *
86
+ * @param {number} [substr] Substring length
87
+ * @returns {string} Month name
88
+ */
89
+ getHumanMonth(substr = null)
90
+ {
91
+ let month = this.day() - 1;
92
+
93
+ if ( ! NOW_HUMAN_MONTHS[month] ) {
94
+ throw new Error(`Invalid month number "${month}".`);
95
+ }
96
+
97
+ let value = Locale.trans(NOW_HUMAN_MONTHS[month]);
98
+
99
+ if ( substr != null ) {
100
+ value = value.substring(0, substr);
101
+ }
102
+
103
+ return value;
104
+ }
105
+
106
+ }
107
+
108
+ /**
109
+ * @returns {typeof import('#src/utils/Now.js').PicoNow}
110
+ */
111
+ export const PicoNowHumanPlugin = function (self) {
112
+
113
+ Obj.each(Mix.proto(PicoNowHumanInstance), (fn, id) => {
114
+ self.prototype[id] = fn;
115
+ });
116
+
117
+ return self;
118
+ }
@@ -0,0 +1,175 @@
1
+ import { Mix, Now, Obj } from "#src/index.esm.js";
2
+
3
+ /**
4
+ * @memberof PicoNow
5
+ * @extends {PicoNow}
6
+ */
7
+ export class PicoNowMatchInstance
8
+ {
9
+
10
+ /**
11
+ * Check if date is before value
12
+ *
13
+ * @example Now.make("2026-01-01").before("2026-02-12") // => true
14
+ *
15
+ * @param {any} [value] Compare value
16
+ * @param {string} [format] Compare format
17
+ * @returns {boolean} True if before
18
+ */
19
+ before(value = null, format = 'x')
20
+ {
21
+ return this.code(format) < Now.make(value).code(format);
22
+ }
23
+
24
+ /**
25
+ * Check if date is before value date
26
+ *
27
+ * @example Now.make("2026-01-01").beforeDate("2026-02-12")
28
+ *
29
+ * @param {any} [value] Compare value
30
+ * @param {string} [format] Compare format
31
+ * @returns {boolean} True if before
32
+ */
33
+ beforeDate(value = null, format = 'YYYYMMDD')
34
+ {
35
+ return this.before(value, format);
36
+ }
37
+
38
+ /**
39
+ * Check if date is before value time
40
+ *
41
+ * @example Now.make("10:00:00").beforeTime("12:00:00")
42
+ *
43
+ * @param {any} [value] Compare value
44
+ * @param {string} [format] Compare format
45
+ * @returns {boolean} True if before
46
+ */
47
+ beforeTime(value = null, format = 'HHmmss')
48
+ {
49
+ return this.before(value, format);
50
+ }
51
+
52
+ /**
53
+ * Check if date is after value
54
+ *
55
+ * @example Now.make("2026-02-12").after("2026-01-01") // => true
56
+ *
57
+ * @param {any} [value] Compare value
58
+ * @param {string} [format] Compare format
59
+ * @returns {boolean} True if after
60
+ */
61
+ after(value = null, format = 'x')
62
+ {
63
+ return this.code(format) > Now.make(value).code(format);
64
+ }
65
+
66
+ /**
67
+ * Check if date is after value date
68
+ *
69
+ * @example Now.make("2026-02-12").afterDate("2026-01-01")
70
+ *
71
+ * @param {any} [value] Compare value
72
+ * @param {string} [format] Compare format
73
+ * @returns {boolean} True if after
74
+ */
75
+ afterDate(value = null, format = 'YYYYMMDD')
76
+ {
77
+ return this.after(value, format);
78
+ }
79
+
80
+ /**
81
+ * Check if date is after value time
82
+ *
83
+ * @example Now.make("12:00:00").afterTime("10:00:00")
84
+ *
85
+ * @param {any} [value] Compare value
86
+ * @param {string} [format] Compare format
87
+ * @returns {boolean} True if after
88
+ */
89
+ afterTime(value = null, format = 'HHmmss')
90
+ {
91
+ return this.after(value, format);
92
+ }
93
+
94
+ /**
95
+ * Check if date equals value
96
+ *
97
+ * @example Now.make("2026-01-01").equal("2026-01-01") // => true
98
+ *
99
+ * @param {any} [value] Compare value
100
+ * @param {string} [format] Compare format
101
+ * @returns {boolean} True if equal
102
+ */
103
+ equal(value = null, format = 'x')
104
+ {
105
+ if ( ! (value instanceof Now) ) {
106
+ value = Now.make(value);
107
+ }
108
+
109
+ return this.code(format) === value.clone().code(format);
110
+ }
111
+
112
+ /**
113
+ * Check if date equals value date
114
+ *
115
+ * @example Now.make("2026-01-01").equalDate("2026-01-01")
116
+ *
117
+ * @param {any} [value] Compare value
118
+ * @param {string} [format] Compare format
119
+ * @returns {boolean} True if equal
120
+ */
121
+ equalDate(value = null, format = 'YYYYMMDD')
122
+ {
123
+ return this.equal(value, format);
124
+ }
125
+
126
+ /**
127
+ * Check if date equals value time
128
+ *
129
+ * @example Now.make("12:00:00").equalTime("12:00:00")
130
+ *
131
+ * @param {any} [value] Compare value
132
+ * @param {string} [format] Compare format
133
+ * @returns {boolean} True if equal
134
+ */
135
+ equalTime(value = null, format = 'HHmmss')
136
+ {
137
+ return this.equal(value, format);
138
+ }
139
+
140
+ /**
141
+ * Check if date is between values
142
+ *
143
+ * @example Now.make("2026-01-15").between("2026-01-01", "2026-01-31")
144
+ *
145
+ * @param {any} [start] Start value
146
+ * @param {any} [end] End value
147
+ * @param {string} [format] Compare format
148
+ * @returns {boolean} True if between
149
+ */
150
+ between(start = null, end = null, format = 'YYYYMMDD')
151
+ {
152
+ let dates = [
153
+ Now.make(start), Now.make(end)
154
+ ];
155
+
156
+ if ( dates[0].after(dates[1], format) ) {
157
+ dates = dates.reverse();
158
+ }
159
+
160
+ return this.after(dates[0], format) && this.before(dates[1], format);
161
+ }
162
+
163
+ }
164
+
165
+ /**
166
+ * @returns {typeof import('#src/utils/Now.js').PicoNow}
167
+ */
168
+ export const PicoNowMatchPlugin = function (self) {
169
+
170
+ Obj.each(Mix.proto(PicoNowMatchInstance), (fn, id) => {
171
+ self.prototype[id] = fn;
172
+ });
173
+
174
+ return self;
175
+ }
@@ -0,0 +1,70 @@
1
+ import { Mix, Now, Obj, Arr } from "#src/index.esm.js";
2
+
3
+ /**
4
+ * @memberof PicoNow
5
+ * @extends {PicoNow}
6
+ */
7
+ export class PicoNowRangeInstance
8
+ {
9
+
10
+ /**
11
+ * Get range of dates
12
+ *
13
+ * @example Now.range("2026-01-31", "day") // => [Now, Now, ...]
14
+ *
15
+ * @param {any} [value] End date
16
+ * @param {string} [scope] Range scope
17
+ * @returns {Array<PicoNow>} Array of dates
18
+ */
19
+ range(value = null, scope = 'date')
20
+ {
21
+ let format = 'YYYYMMDD';
22
+
23
+ if ( /^months?$/.test(scope) ) {
24
+ format = 'YYYYMM';
25
+ }
26
+
27
+ if ( /^years?$/.test(scope) ) {
28
+ format = 'YYYY';
29
+ }
30
+
31
+ let range = [];
32
+
33
+ let dates = [
34
+ this.clone(), Now.make(value)
35
+ ];
36
+
37
+ if ( dates[0].afterDate(dates[1]) ) {
38
+ dates = dates.reverse();
39
+ }
40
+
41
+ dates[1].add(1, scope);
42
+
43
+ for ( let day = dates[0]; ! day.equal(dates[1], format); day = day.next(scope) ) {
44
+ Arr.append(range, day);
45
+ }
46
+
47
+ return range;
48
+ }
49
+
50
+ }
51
+
52
+ /**
53
+ * @see PicoNow.range
54
+ */
55
+ PicoNowRangeInstance.prototype.getDatesRange = function (...args) {
56
+ console.warn('NowRange.getDatesRange() is deprecated, use NowRange.range() instead.');
57
+ return this.range(...args);
58
+ }
59
+
60
+ /**
61
+ * @returns {typeof import('#src/utils/Now.js').PicoNow}
62
+ */
63
+ export const PicoNowRangePlugin = function (self) {
64
+
65
+ Obj.each(Mix.proto(PicoNowRangeInstance), (fn, id) => {
66
+ self.prototype[id] = fn;
67
+ });
68
+
69
+ return self;
70
+ }