@dereekb/util 13.11.2 → 13.11.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.
Files changed (102) hide show
  1. package/eslint/index.cjs.default.js +1 -0
  2. package/eslint/index.cjs.js +687 -0
  3. package/eslint/index.cjs.mjs +2 -0
  4. package/eslint/index.d.ts +1 -0
  5. package/eslint/index.esm.js +683 -0
  6. package/eslint/package.json +23 -0
  7. package/eslint/src/index.d.ts +1 -0
  8. package/eslint/src/lib/comments.d.ts +101 -0
  9. package/eslint/src/lib/index.d.ts +3 -0
  10. package/eslint/src/lib/plugin.d.ts +18 -0
  11. package/eslint/src/lib/prefer-no-side-effects-in-jsdoc.rule.d.ts +50 -0
  12. package/eslint/src/lib/require-no-side-effects.rule.d.ts +67 -0
  13. package/fetch/package.json +2 -2
  14. package/index.cjs.js +1421 -23
  15. package/index.esm.js +1421 -24
  16. package/package.json +7 -1
  17. package/src/lib/array/array.factory.d.ts +2 -0
  18. package/src/lib/array/array.filter.d.ts +50 -17
  19. package/src/lib/array/array.find.d.ts +1 -0
  20. package/src/lib/array/array.index.d.ts +7 -0
  21. package/src/lib/array/array.indexed.d.ts +21 -0
  22. package/src/lib/array/array.make.d.ts +7 -0
  23. package/src/lib/array/array.random.d.ts +1 -0
  24. package/src/lib/array/array.unique.d.ts +3 -0
  25. package/src/lib/array/array.value.d.ts +7 -0
  26. package/src/lib/auth/auth.role.claims.d.ts +7 -0
  27. package/src/lib/boolean.d.ts +1 -0
  28. package/src/lib/contact/random.d.ts +14 -0
  29. package/src/lib/date/date.d.ts +229 -0
  30. package/src/lib/date/time.d.ts +7 -0
  31. package/src/lib/date/week.d.ts +7 -0
  32. package/src/lib/error/error.d.ts +7 -0
  33. package/src/lib/filter/filter.d.ts +7 -0
  34. package/src/lib/function/function.boolean.d.ts +7 -0
  35. package/src/lib/function/function.forward.d.ts +14 -0
  36. package/src/lib/getter/getter.cache.d.ts +7 -0
  37. package/src/lib/getter/getter.d.ts +34 -0
  38. package/src/lib/getter/getter.map.d.ts +7 -0
  39. package/src/lib/getter/getter.util.d.ts +7 -0
  40. package/src/lib/grouping.d.ts +8 -0
  41. package/src/lib/hash.d.ts +1 -0
  42. package/src/lib/key.d.ts +16 -0
  43. package/src/lib/map/map.key.d.ts +14 -0
  44. package/src/lib/model/id.batch.d.ts +7 -0
  45. package/src/lib/model/id.factory.d.ts +7 -0
  46. package/src/lib/model/model.conversion.d.ts +35 -0
  47. package/src/lib/model/model.copy.d.ts +7 -0
  48. package/src/lib/model/model.d.ts +19 -0
  49. package/src/lib/model/model.modify.d.ts +14 -0
  50. package/src/lib/nodejs/stream.d.ts +7 -0
  51. package/src/lib/number/bound.d.ts +3 -0
  52. package/src/lib/number/dollar.d.ts +7 -0
  53. package/src/lib/number/factory.d.ts +7 -0
  54. package/src/lib/number/random.d.ts +1 -0
  55. package/src/lib/number/round.d.ts +22 -0
  56. package/src/lib/number/sort.d.ts +7 -0
  57. package/src/lib/number/transform.d.ts +7 -0
  58. package/src/lib/object/object.array.delta.d.ts +7 -0
  59. package/src/lib/object/object.equal.d.ts +7 -0
  60. package/src/lib/object/object.filter.pojo.d.ts +87 -0
  61. package/src/lib/object/object.filter.tuple.d.ts +16 -0
  62. package/src/lib/object/object.key.d.ts +14 -0
  63. package/src/lib/object/object.map.d.ts +14 -0
  64. package/src/lib/path/path.d.ts +9 -0
  65. package/src/lib/promise/promise.d.ts +21 -0
  66. package/src/lib/promise/promise.factory.d.ts +7 -0
  67. package/src/lib/promise/promise.task.d.ts +7 -0
  68. package/src/lib/service/handler.config.d.ts +28 -0
  69. package/src/lib/service/handler.d.ts +14 -0
  70. package/src/lib/set/set.d.ts +21 -0
  71. package/src/lib/set/set.decision.d.ts +7 -0
  72. package/src/lib/set/set.delta.d.ts +7 -0
  73. package/src/lib/set/set.selection.d.ts +7 -0
  74. package/src/lib/sort.d.ts +8 -0
  75. package/src/lib/string/char.d.ts +7 -0
  76. package/src/lib/string/dencoder.d.ts +35 -0
  77. package/src/lib/string/factory.d.ts +22 -1
  78. package/src/lib/string/replace.d.ts +78 -0
  79. package/src/lib/string/search.d.ts +7 -0
  80. package/src/lib/string/sort.d.ts +7 -0
  81. package/src/lib/string/string.d.ts +1 -0
  82. package/src/lib/string/transform.d.ts +53 -0
  83. package/src/lib/string/tree.d.ts +7 -0
  84. package/src/lib/string/url.d.ts +7 -0
  85. package/src/lib/tree/tree.array.d.ts +1 -0
  86. package/src/lib/tree/tree.explore.d.ts +3 -0
  87. package/src/lib/type.d.ts +3 -2
  88. package/src/lib/value/bound.d.ts +28 -0
  89. package/src/lib/value/comparator.d.ts +16 -0
  90. package/src/lib/value/decision.d.ts +5 -0
  91. package/src/lib/value/equal.d.ts +2 -0
  92. package/src/lib/value/indexed.d.ts +127 -0
  93. package/src/lib/value/map.d.ts +22 -0
  94. package/src/lib/value/maybe.type.d.ts +2 -2
  95. package/src/lib/value/modifier.d.ts +13 -0
  96. package/src/lib/value/point.d.ts +56 -0
  97. package/src/lib/value/use.d.ts +37 -0
  98. package/src/lib/value/vector.d.ts +7 -0
  99. package/test/index.cjs.js +17 -4
  100. package/test/index.esm.js +17 -4
  101. package/test/package.json +2 -2
  102. package/test/src/lib/shared/shared.fail.d.ts +24 -5
@@ -33,11 +33,22 @@ export type ISO8601DateString = string;
33
33
  * Regular expression for validating ISO8601 date strings.
34
34
  *
35
35
  * TODO(FUTURE): Need to improve to support negative years.
36
+ *
37
+ * @dbxUtil
38
+ * @dbxUtilCategory date
39
+ * @dbxUtilKind const
40
+ * @dbxUtilTags date, iso8601, regex, string, validate
41
+ * @dbxUtilRelated is-iso8601-date-string, iso8601-day-string-regex
36
42
  */
37
43
  export declare const ISO_8601_DATE_STRING_REGEX: RegExp;
38
44
  /**
39
45
  * Determines if a string is a valid ISO8601 date string.
40
46
  *
47
+ * @dbxUtil
48
+ * @dbxUtilCategory date
49
+ * @dbxUtilTags date, iso8601, string, predicate, validate
50
+ * @dbxUtilRelated is-iso8601-day-string, is-utc-date-string, iso-8601-date-string-regex
51
+ *
41
52
  * @param input - The string to test
42
53
  * @returns True if the input is a valid ISO8601 date string
43
54
  */
@@ -58,11 +69,22 @@ export type UTCDateString = string;
58
69
  * Sat, 03 Feb 2001 04:05:06 GMT
59
70
  * Tue, 14 Mar 2023 12:34:56 UTC
60
71
  * Wed, 25 May 2024 20:45:07 EST
72
+ *
73
+ * @dbxUtil
74
+ * @dbxUtilCategory date
75
+ * @dbxUtilKind const
76
+ * @dbxUtilTags date, utc, regex, string, validate
77
+ * @dbxUtilRelated is-utc-date-string
61
78
  */
62
79
  export declare const UTC_DATE_STRING_REGEX: RegExp;
63
80
  /**
64
81
  * Determines if a string is a valid UTC date string.
65
82
  *
83
+ * @dbxUtil
84
+ * @dbxUtilCategory date
85
+ * @dbxUtilTags date, utc, string, predicate, validate
86
+ * @dbxUtilRelated is-iso8601-date-string, utc-date-string-regex
87
+ *
66
88
  * @param input - The string to test
67
89
  * @returns True if the input is a valid UTC date string
68
90
  */
@@ -104,6 +126,11 @@ export interface TimezoneStringRef {
104
126
  /**
105
127
  * Returns true only if the inputs have the same timezone, or both do not have a timezone set.
106
128
  *
129
+ * @dbxUtil
130
+ * @dbxUtilCategory date
131
+ * @dbxUtilTags date, timezone, compare, equal, predicate
132
+ * @dbxUtilRelated is-considered-utc-timezone-string
133
+ *
107
134
  * @param a - First object that may contain a timezone reference
108
135
  * @param b - Second object that may contain a timezone reference
109
136
  * @returns True if both objects have the same timezone or neither has a timezone set
@@ -111,6 +138,12 @@ export interface TimezoneStringRef {
111
138
  export declare function hasSameTimezone(a: Maybe<Partial<TimezoneStringRef>>, b: Maybe<Partial<TimezoneStringRef>>): boolean;
112
139
  /**
113
140
  * Constant for the UTC timezone string, "UTC".
141
+ *
142
+ * @dbxUtil
143
+ * @dbxUtilCategory date
144
+ * @dbxUtilKind const
145
+ * @dbxUtilTags date, timezone, utc, string, constant
146
+ * @dbxUtilRelated is-considered-utc-timezone-string
114
147
  */
115
148
  export declare const UTC_TIMEZONE_STRING = "UTC";
116
149
  /**
@@ -121,6 +154,11 @@ export type UTCTimezoneAbbreviation = typeof UTC_TIMEZONE_STRING;
121
154
  * Determines whether the input timezone string is considered UTC.
122
155
  * Returns true for null, undefined, or the string 'UTC'.
123
156
  *
157
+ * @dbxUtil
158
+ * @dbxUtilCategory date
159
+ * @dbxUtilTags date, timezone, utc, predicate
160
+ * @dbxUtilRelated has-same-timezone, utc-timezone-string
161
+ *
124
162
  * @param timezone - The timezone string to check
125
163
  * @returns True if the timezone is considered UTC
126
164
  */
@@ -153,10 +191,22 @@ export type ISO8601DayString = string;
153
191
  export type DateOrDayString = Date | ISO8601DayString;
154
192
  /**
155
193
  * Regex for an ISO8601DayString.
194
+ *
195
+ * @dbxUtil
196
+ * @dbxUtilCategory date
197
+ * @dbxUtilKind const
198
+ * @dbxUtilTags date, iso8601, day, regex, string, validate
199
+ * @dbxUtilRelated is-iso8601-day-string, iso8601-day-string-start-regex
156
200
  */
157
201
  export declare const ISO8601_DAY_STRING_REGEX: RegExp;
158
202
  /**
159
203
  * Regex for a string that starts as an ISO8601DayString.
204
+ *
205
+ * @dbxUtil
206
+ * @dbxUtilCategory date
207
+ * @dbxUtilKind const
208
+ * @dbxUtilTags date, iso8601, day, regex, prefix
209
+ * @dbxUtilRelated is-iso8601-day-string-start, iso8601-day-string-regex
160
210
  */
161
211
  export declare const ISO8601_DAY_STRING_START_REGEX: RegExp;
162
212
  /**
@@ -164,6 +214,11 @@ export declare const ISO8601_DAY_STRING_START_REGEX: RegExp;
164
214
  *
165
215
  * I.E. 2022-01-02T04:00:00.000Z in GMT-6 returns 2022-01-02
166
216
  *
217
+ * @dbxUtil
218
+ * @dbxUtilCategory date
219
+ * @dbxUtilTags date, utc, start-of-day, day, normalize
220
+ * @dbxUtilRelated start-of-day-for-system-date-in-utc, parse-iso8601-day-string-to-utc-date
221
+ *
167
222
  * @param date - The date to get the start of day for
168
223
  * @returns A new Date set to midnight UTC of the input date's UTC day
169
224
  */
@@ -173,6 +228,11 @@ export declare function startOfDayForUTCDateInUTC(date: Date): Date;
173
228
  *
174
229
  * I.E. 2022-01-02T04:00:00.000Z in GMT-6 (10PM Jan 1st CST) returns 2022-01-01
175
230
  *
231
+ * @dbxUtil
232
+ * @dbxUtilCategory date
233
+ * @dbxUtilTags date, utc, start-of-day, system, local
234
+ * @dbxUtilRelated start-of-day-for-utc-date-in-utc
235
+ *
176
236
  * @param date - The date to get the start of local day for
177
237
  * @returns A new Date set to midnight UTC of the input date's local day
178
238
  */
@@ -180,6 +240,11 @@ export declare function startOfDayForSystemDateInUTC(date: Date): Date;
180
240
  /**
181
241
  * Parses an ISO8601DayString (YYYY-MM-DD) to a UTC Date at midnight.
182
242
  *
243
+ * @dbxUtil
244
+ * @dbxUtilCategory date
245
+ * @dbxUtilTags date, iso8601, day, parse, utc, convert
246
+ * @dbxUtilRelated is-iso8601-day-string, start-of-day-for-utc-date-in-utc
247
+ *
183
248
  * @param inputDateString - The ISO8601 day string to parse (e.g., '2022-01-15')
184
249
  * @returns A Date object set to midnight UTC on the specified day
185
250
  */
@@ -187,6 +252,11 @@ export declare function parseISO8601DayStringToUTCDate(inputDateString: ISO8601D
187
252
  /**
188
253
  * Determines if a string is a valid ISO8601 day string (YYYY-MM-DD format).
189
254
  *
255
+ * @dbxUtil
256
+ * @dbxUtilCategory date
257
+ * @dbxUtilTags date, iso8601, day, string, predicate, validate
258
+ * @dbxUtilRelated is-iso8601-day-string-start, parse-iso8601-day-string-to-utc-date, iso8601-day-string-regex
259
+ *
190
260
  * @param input - The string to test
191
261
  * @returns True if the input is a valid ISO8601 day string
192
262
  */
@@ -194,6 +264,11 @@ export declare function isISO8601DayString(input: string): input is ISO8601DaySt
194
264
  /**
195
265
  * Determines if a string starts with a valid ISO8601 day string pattern (YYYY-MM-DD).
196
266
  *
267
+ * @dbxUtil
268
+ * @dbxUtilCategory date
269
+ * @dbxUtilTags date, iso8601, day, string, predicate, prefix
270
+ * @dbxUtilRelated is-iso8601-day-string, iso8601-day-string-start-regex
271
+ *
197
272
  * @param input - The string to test
198
273
  * @returns True if the input starts with a valid ISO8601 day string pattern
199
274
  */
@@ -208,11 +283,22 @@ export declare function isISO8601DayStringStart(input: string): input is ISO8601
208
283
  export type MonthDaySlashDate = string;
209
284
  /**
210
285
  * Regex for a MonthDaySlashDate.
286
+ *
287
+ * @dbxUtil
288
+ * @dbxUtilCategory date
289
+ * @dbxUtilKind const
290
+ * @dbxUtilTags date, slash, month, day, regex, string, validate
291
+ * @dbxUtilRelated is-month-day-slash-date
211
292
  */
212
293
  export declare const MONTH_DAY_SLASH_DATE_STRING_REGEX: RegExp;
213
294
  /**
214
295
  * Determines if a string is a valid Month/Day/Year slash date format.
215
296
  *
297
+ * @dbxUtil
298
+ * @dbxUtilCategory date
299
+ * @dbxUtilTags date, slash, month, day, string, predicate, validate
300
+ * @dbxUtilRelated month-day-slash-date-to-date-string, month-day-slash-date-string-regex
301
+ *
216
302
  * @param input - The string to test
217
303
  * @returns True if the input is a valid Month/Day/Year slash date
218
304
  */
@@ -222,6 +308,11 @@ export declare function isMonthDaySlashDate(input: string): input is MonthDaySla
222
308
  * Handles single digit months and days by adding leading zeros.
223
309
  * If year is only 2 digits, prepends '20' to make a 4-digit year.
224
310
  *
311
+ * @dbxUtil
312
+ * @dbxUtilCategory date
313
+ * @dbxUtilTags date, slash, day, string, convert, parse
314
+ * @dbxUtilRelated is-month-day-slash-date
315
+ *
225
316
  * @param slashDate - The slash date string to convert (e.g., '1/1/20' or '11/15/2022')
226
317
  * @returns An ISO8601 formatted day string (YYYY-MM-DD)
227
318
  */
@@ -243,6 +334,11 @@ export type DateOrUnixDateTimeMillisecondsNumber = Date | UnixDateTimeMillisecon
243
334
  /**
244
335
  * Converts a Date object or unix timestamp (in milliseconds) to a Date object.
245
336
  *
337
+ * @dbxUtil
338
+ * @dbxUtilCategory date
339
+ * @dbxUtilTags date, milliseconds, unix, convert, normalize
340
+ * @dbxUtilRelated unix-milliseconds-number-to-date, date-or-milliseconds-to-date
341
+ *
246
342
  * @param input - Date object or unix timestamp (in milliseconds) to convert
247
343
  * @returns Date object if input is valid. Returns null/undefined if input is null/undefined
248
344
  */
@@ -252,6 +348,11 @@ export declare function dateFromDateOrTimeMillisecondsNumber(input: Maybe<DateOr
252
348
  /**
253
349
  * Converts a unix timestamp number to a Date object.
254
350
  *
351
+ * @dbxUtil
352
+ * @dbxUtilCategory date
353
+ * @dbxUtilTags date, milliseconds, unix, convert, parse
354
+ * @dbxUtilRelated date-from-date-or-time-milliseconds-number, unix-date-time-seconds-number-to-date
355
+ *
255
356
  * @param dateTimeNumber - Unix timestamp number to convert
256
357
  * @returns Date object if timestamp is valid, null/undefined if timestamp is null/undefined
257
358
  */
@@ -276,6 +377,11 @@ export type DateOrMilliseconds = Date | Milliseconds;
276
377
  *
277
378
  * If the input is a number of milliseconds, it is added to the current date.
278
379
  *
380
+ * @dbxUtil
381
+ * @dbxUtilCategory date
382
+ * @dbxUtilTags date, milliseconds, convert, normalize, offset
383
+ * @dbxUtilRelated add-milliseconds, date-from-date-or-time-milliseconds-number
384
+ *
279
385
  * @param dateOrMilliseconds - The date or milliseconds to convert to a Date.
280
386
  * @param now - The current date to use when adding milliseconds. Defaults to the current time.
281
387
  * @returns The Date representation of the input.
@@ -319,50 +425,132 @@ export type Hours = number;
319
425
  export type Days = number;
320
426
  /**
321
427
  * Number of days in a year (ignoring leap years, which are 366 days).
428
+ *
429
+ * @dbxUtil
430
+ * @dbxUtilCategory date
431
+ * @dbxUtilKind const
432
+ * @dbxUtilTags date, day, year, duration, constant
433
+ * @dbxUtilRelated days-in-week
322
434
  */
323
435
  export declare const DAYS_IN_YEAR: Days;
324
436
  /**
325
437
  * Number of hours in a day.
438
+ *
439
+ * @dbxUtil
440
+ * @dbxUtilCategory date
441
+ * @dbxUtilKind const
442
+ * @dbxUtilTags date, hour, day, duration, constant
443
+ * @dbxUtilRelated minutes-in-day, ms-in-day
326
444
  */
327
445
  export declare const HOURS_IN_DAY: Hours;
328
446
  /**
329
447
  * Number of seconds in a minute.
448
+ *
449
+ * @dbxUtil
450
+ * @dbxUtilCategory date
451
+ * @dbxUtilKind const
452
+ * @dbxUtilTags date, second, minute, duration, constant
453
+ * @dbxUtilRelated seconds-in-hour, ms-in-second
330
454
  */
331
455
  export declare const SECONDS_IN_MINUTE: Seconds;
332
456
  /**
333
457
  * Number of minutes in a day.
458
+ *
459
+ * @dbxUtil
460
+ * @dbxUtilCategory date
461
+ * @dbxUtilKind const
462
+ * @dbxUtilTags date, minute, day, duration, constant
463
+ * @dbxUtilRelated hours-in-day, minutes-in-hour
334
464
  */
335
465
  export declare const MINUTES_IN_DAY: Minutes;
336
466
  /**
337
467
  * Number of minutes in an hour.
468
+ *
469
+ * @dbxUtil
470
+ * @dbxUtilCategory date
471
+ * @dbxUtilKind const
472
+ * @dbxUtilTags date, minute, hour, duration, constant
473
+ * @dbxUtilRelated minutes-in-day, seconds-in-minute
338
474
  */
339
475
  export declare const MINUTES_IN_HOUR: Minutes;
340
476
  /**
341
477
  * Number of seconds in an hour.
478
+ *
479
+ * @dbxUtil
480
+ * @dbxUtilCategory date
481
+ * @dbxUtilKind const
482
+ * @dbxUtilTags date, second, hour, duration, constant
483
+ * @dbxUtilRelated seconds-in-minute, minutes-in-hour
342
484
  */
343
485
  export declare const SECONDS_IN_HOUR: Minutes;
344
486
  /**
345
487
  * Number of milliseconds in a second.
488
+ *
489
+ * @dbxUtil
490
+ * @dbxUtilCategory date
491
+ * @dbxUtilKind const
492
+ * @dbxUtilTags date, milliseconds, second, duration, constant
493
+ * @dbxUtilRelated ms-in-minute, seconds-in-minute
346
494
  */
347
495
  export declare const MS_IN_SECOND: Milliseconds;
348
496
  /**
349
497
  * Number of milliseconds in a minute.
498
+ *
499
+ * @dbxUtil
500
+ * @dbxUtilCategory date
501
+ * @dbxUtilKind const
502
+ * @dbxUtilTags date, milliseconds, minute, duration, constant
503
+ * @dbxUtilRelated ms-in-second, ms-in-hour
350
504
  */
351
505
  export declare const MS_IN_MINUTE: Milliseconds;
352
506
  /**
353
507
  * Number of milliseconds in an hour.
508
+ *
509
+ * @dbxUtil
510
+ * @dbxUtilCategory date
511
+ * @dbxUtilKind const
512
+ * @dbxUtilTags date, milliseconds, hour, duration, constant
513
+ * @dbxUtilRelated ms-in-minute, ms-in-day
354
514
  */
355
515
  export declare const MS_IN_HOUR: Milliseconds;
356
516
  /**
357
517
  * Number of milliseconds in a day.
518
+ *
519
+ * @dbxUtil
520
+ * @dbxUtilCategory date
521
+ * @dbxUtilKind const
522
+ * @dbxUtilTags date, milliseconds, day, duration, constant
523
+ * @dbxUtilRelated ms-in-hour, ms-in-week, hours-in-day
358
524
  */
359
525
  export declare const MS_IN_DAY: Milliseconds;
526
+ /**
527
+ * Number of seconds in a day.
528
+ *
529
+ * @dbxUtil
530
+ * @dbxUtilCategory date
531
+ * @dbxUtilKind const
532
+ * @dbxUtilTags date, seconds, day, duration, constant
533
+ * @dbxUtilRelated seconds-in-hour, seconds-in-week
534
+ */
535
+ export declare const SECONDS_IN_DAY: Seconds;
360
536
  /**
361
537
  * Number of days in a week.
538
+ *
539
+ * @dbxUtil
540
+ * @dbxUtilCategory date
541
+ * @dbxUtilKind const
542
+ * @dbxUtilTags date, day, week, duration, constant
543
+ * @dbxUtilRelated ms-in-week, days-in-year
362
544
  */
363
545
  export declare const DAYS_IN_WEEK: Days;
364
546
  /**
365
547
  * Number of milliseconds in a week.
548
+ *
549
+ * @dbxUtil
550
+ * @dbxUtilCategory date
551
+ * @dbxUtilKind const
552
+ * @dbxUtilTags date, milliseconds, week, duration, constant
553
+ * @dbxUtilRelated ms-in-day, days-in-week
366
554
  */
367
555
  export declare const MS_IN_WEEK: Milliseconds;
368
556
  /**
@@ -396,6 +584,11 @@ export type DateMonth = number;
396
584
  *
397
585
  * Converts JavaScript's 0-based month (0-11) to a 1-based month (1-12).
398
586
  *
587
+ * @dbxUtil
588
+ * @dbxUtilCategory date
589
+ * @dbxUtilTags date, month, year, accessor, system, local
590
+ * @dbxUtilRelated month-of-year-from-date-month, month-of-year-from-utc-date
591
+ *
399
592
  * @param date - The date to extract the month from
400
593
  * @returns The month of year as a number from 1-12
401
594
  */
@@ -405,6 +598,11 @@ export declare function monthOfYearFromDate(date: Date): MonthOfYear;
405
598
  *
406
599
  * Converts JavaScript's 0-based month (0-11) to a 1-based month (1-12).
407
600
  *
601
+ * @dbxUtil
602
+ * @dbxUtilCategory date
603
+ * @dbxUtilTags date, month, year, accessor, utc
604
+ * @dbxUtilRelated month-of-year-from-date, month-of-year-from-date-month
605
+ *
408
606
  * @param date - The date to extract the month from
409
607
  * @returns The month of year as a number from 1-12
410
608
  */
@@ -412,6 +610,11 @@ export declare function monthOfYearFromUTCDate(date: Date): MonthOfYear;
412
610
  /**
413
611
  * Converts a JavaScript Date month (0-11) to a MonthOfYear (1-12).
414
612
  *
613
+ * @dbxUtil
614
+ * @dbxUtilCategory date
615
+ * @dbxUtilTags date, month, year, convert, javascript
616
+ * @dbxUtilRelated make-date-month-for-month-of-year, month-of-year-from-date
617
+ *
415
618
  * @param dateMonth - JavaScript Date month (0-11)
416
619
  * @returns The month of year as a number from 1-12
417
620
  */
@@ -419,8 +622,14 @@ export declare function monthOfYearFromDateMonth(dateMonth: DateMonth): MonthOfY
419
622
  /**
420
623
  * Converts a MonthOfYear (1-12) to a JavaScript Date month (0-11).
421
624
  *
625
+ * @dbxUtil
626
+ * @dbxUtilCategory date
627
+ * @dbxUtilTags date, month, convert, javascript
628
+ * @dbxUtilRelated month-of-year-from-date-month, month-of-year-from-date
629
+ *
422
630
  * @param monthOfYear - Month of year (1-12)
423
631
  * @returns JavaScript Date month (0-11)
632
+ * @__NO_SIDE_EFFECTS__
424
633
  */
425
634
  export declare function makeDateMonthForMonthOfYear(monthOfYear: MonthOfYear): DateMonth;
426
635
  /**
@@ -439,6 +648,11 @@ export type DateRelativeState = DateRelativeDirection | 'present';
439
648
  * Returns true if the value is a Date object.
440
649
  * Uses both instanceof and Object.prototype.toString for reliable type checking.
441
650
  *
651
+ * @dbxUtil
652
+ * @dbxUtilCategory date
653
+ * @dbxUtilTags date, predicate, type-guard, validate
654
+ * @dbxUtilRelated is-equal-date, is-past
655
+ *
442
656
  * @param value - The value to check
443
657
  * @returns True if the value is a Date object
444
658
  */
@@ -447,6 +661,11 @@ export declare function isDate(value: unknown): value is Date;
447
661
  * Returns true if the two input dates represent the same point in time.
448
662
  * Compares the timestamp values rather than the object references.
449
663
  *
664
+ * @dbxUtil
665
+ * @dbxUtilCategory date
666
+ * @dbxUtilTags date, equal, compare, predicate
667
+ * @dbxUtilRelated is-date, is-past
668
+ *
450
669
  * @param a - First date to compare
451
670
  * @param b - Second date to compare
452
671
  * @returns True if the dates represent the same point in time
@@ -455,6 +674,11 @@ export declare function isEqualDate(a: Date, b: Date): boolean;
455
674
  /**
456
675
  * Returns true if the input date is in the past relative to the current time.
457
676
  *
677
+ * @dbxUtil
678
+ * @dbxUtilCategory date
679
+ * @dbxUtilTags date, past, compare, predicate, time
680
+ * @dbxUtilRelated is-equal-date, is-date
681
+ *
458
682
  * @param input - The date to check
459
683
  * @returns True if the date is in the past
460
684
  */
@@ -463,6 +687,11 @@ export declare function isPast(input: Date): boolean;
463
687
  * Adds milliseconds to the input date, returning a new Date object.
464
688
  * If no date is input, then returns the input unchanged.
465
689
  *
690
+ * @dbxUtil
691
+ * @dbxUtilCategory date
692
+ * @dbxUtilTags date, milliseconds, add, offset, time
693
+ * @dbxUtilRelated date-or-milliseconds-to-date, ms-in-second
694
+ *
466
695
  * @param input - The date to add milliseconds to
467
696
  * @param ms - The number of milliseconds to add (defaults to 0 if null or undefined)
468
697
  * @returns A new Date with the added milliseconds, or the original input if not a Date
@@ -104,9 +104,16 @@ export declare class TimerCancelledError extends BaseError {
104
104
  /**
105
105
  * Creates a new Timer from the input duration.
106
106
  *
107
+ * @dbxUtil
108
+ * @dbxUtilCategory date
109
+ * @dbxUtilKind factory
110
+ * @dbxUtilTags date, time, timer, factory, duration
111
+ * @dbxUtilRelated timer
112
+ *
107
113
  * @param duration - The duration of the timer.
108
114
  * @param startImmediately - Whether the timer should start immediately. Defaults to true.
109
115
  * @returns The new Timer.
116
+ * @__NO_SIDE_EFFECTS__
110
117
  */
111
118
  export declare function makeTimer(duration: Milliseconds, startImmediately?: boolean): Timer;
112
119
  /**
@@ -118,8 +118,15 @@ export type DayOfWeekNameFunction = (dayOfWeek: DayOfWeek) => string;
118
118
  /**
119
119
  * Creates a function that returns the name for a given DayOfWeek.
120
120
  *
121
+ * @dbxUtil
122
+ * @dbxUtilCategory date
123
+ * @dbxUtilKind factory
124
+ * @dbxUtilTags date, week, day-of-week, name, factory, format
125
+ * @dbxUtilRelated days-of-week-name-map
126
+ *
121
127
  * @param transform - Optional configuration for abbreviation and casing
122
128
  * @returns A function that maps DayOfWeek values to name strings
129
+ * @__NO_SIDE_EFFECTS__
123
130
  */
124
131
  export declare function daysOfWeekNameFunction(transform?: DayOfWeekNamesTransformConfig): DayOfWeekNameFunction;
125
132
  /**
@@ -90,8 +90,15 @@ export type ErrorMessageContainsStringFunction = (input: Maybe<ErrorInput | stri
90
90
  /**
91
91
  * Creates a function that checks if an error's message contains the target string.
92
92
  *
93
+ * @dbxUtil
94
+ * @dbxUtilCategory error
95
+ * @dbxUtilKind factory
96
+ * @dbxUtilTags error, message, contains, factory, predicate, regex
97
+ * @dbxUtilRelated escape-string-for-regex
98
+ *
93
99
  * @param target - The string to search for
94
100
  * @returns A function that checks error messages for the target string
101
+ * @__NO_SIDE_EFFECTS__
95
102
  */
96
103
  export declare function errorMessageContainsStringFunction(target: string): ErrorMessageContainsStringFunction;
97
104
  /**
@@ -18,8 +18,15 @@ export type FilterFunction<T = unknown> = (value: T, index: number) => boolean;
18
18
  * The merged function returns true only if all individual filters pass (AND logic).
19
19
  * Null/undefined filters are ignored.
20
20
  *
21
+ * @dbxUtil
22
+ * @dbxUtilCategory value
23
+ * @dbxUtilKind factory
24
+ * @dbxUtilTags filter, merge, compose, factory, and
25
+ * @dbxUtilRelated invert-filter, invert-boolean-return-function
26
+ *
21
27
  * @param inputFilters - The filter functions to merge
22
28
  * @returns A single FilterFunction that applies all filters
29
+ * @__NO_SIDE_EFFECTS__
23
30
  */
24
31
  export declare function mergeFilterFunctions<T>(...inputFilters: Maybe<FilterFunction<T>>[]): FilterFunction<T>;
25
32
  /**
@@ -5,8 +5,15 @@ export type BooleanReturnFunction = (...args: any[]) => boolean;
5
5
  /**
6
6
  * Inverts the output of an arbitrary boolean-returning function.
7
7
  *
8
+ * @dbxUtil
9
+ * @dbxUtilCategory function
10
+ * @dbxUtilKind factory
11
+ * @dbxUtilTags function, boolean, invert, predicate, factory
12
+ * @dbxUtilRelated decision-function, filter-function
13
+ *
8
14
  * @param decisionFn - The function whose boolean return value to invert
9
15
  * @param invert - Whether to apply the inversion (defaults to true)
10
16
  * @returns The inverted function, or the original if invert is false
17
+ * @__NO_SIDE_EFFECTS__
11
18
  */
12
19
  export declare function invertBooleanReturnFunction<F extends BooleanReturnFunction>(decisionFn: F, invert?: boolean): F;
@@ -10,8 +10,15 @@ export type ForwardFunction<I extends (...args: any[]) => O, O = unknown> = I;
10
10
  *
11
11
  * Useful for late-binding or circular dependency resolution.
12
12
  *
13
+ * @dbxUtil
14
+ * @dbxUtilCategory function
15
+ * @dbxUtilKind factory
16
+ * @dbxUtilTags function, forward, late-binding, factory, lazy
17
+ * @dbxUtilRelated default-forward-function-factory
18
+ *
13
19
  * @param getter - A Getter that provides the target function
14
20
  * @returns A forwarding function with the same signature as the target
21
+ * @__NO_SIDE_EFFECTS__
15
22
  */
16
23
  export declare function forwardFunction<I extends (...args: any[]) => O, O = unknown>(getter: Getter<I>): ForwardFunction<I>;
17
24
  /**
@@ -22,7 +29,14 @@ export type DefaultForwardFunctionFactory<I extends (...args: any[]) => O, O = u
22
29
  * Creates a factory that produces forwarding functions which use the provided function
23
30
  * or fall back to the default function when not provided.
24
31
  *
32
+ * @dbxUtil
33
+ * @dbxUtilCategory function
34
+ * @dbxUtilKind factory
35
+ * @dbxUtilTags function, forward, factory, default, fallback
36
+ * @dbxUtilRelated forward-function
37
+ *
25
38
  * @param defaultFn - The default function to use as fallback
26
39
  * @returns A factory that wraps optional functions with a default fallback
40
+ * @__NO_SIDE_EFFECTS__
27
41
  */
28
42
  export declare function defaultForwardFunctionFactory<I extends (...args: any[]) => O, O = unknown>(defaultFn: I): DefaultForwardFunctionFactory<I, O>;
@@ -39,8 +39,15 @@ export type CachedFactoryWithInput<T, A = unknown> = CachedGetter<T> & FactoryWi
39
39
  * The value is retrieved once on first call and cached permanently.
40
40
  * Use `reset()` to clear the cache and `init()` to reload.
41
41
  *
42
+ * @dbxUtil
43
+ * @dbxUtilCategory getter
44
+ * @dbxUtilKind factory
45
+ * @dbxUtilTags getter, cache, memoize, lazy, factory
46
+ * @dbxUtilRelated as-getter, make-getter
47
+ *
42
48
  * @param getter - the factory or getter function whose result will be cached
43
49
  * @returns A CachedFactoryWithInput that caches the first result
50
+ * @__NO_SIDE_EFFECTS__
44
51
  */
45
52
  export declare function cachedGetter<T>(getter: Getter<T>): CachedFactoryWithInput<T>;
46
53
  export declare function cachedGetter<T, A = unknown>(factory: FactoryWithInput<T, A>): CachedFactoryWithInput<T, A>;
@@ -100,22 +100,37 @@ export type ObjectCopyFactory<T> = Factory<T>;
100
100
  * @param value - The object to copy
101
101
  * @param copyFunction - Optional custom copy function (defaults to copyObject)
102
102
  * @returns A factory that produces copies of the value
103
+ * @__NO_SIDE_EFFECTS__
103
104
  */
104
105
  export declare function objectCopyFactory<T extends object>(value: T, copyFunction?: CopyObjectFunction<T>): ObjectCopyFactory<T>;
105
106
  /**
106
107
  * Converts the input to an ObjectCopyFactory. If the input is an object, wraps it with objectCopyFactory.
107
108
  * If it's already a function (Getter), it's returned directly.
108
109
  *
110
+ * @dbxUtil
111
+ * @dbxUtilCategory getter
112
+ * @dbxUtilKind factory
113
+ * @dbxUtilTags getter, factory, copy, clone, object, normalize
114
+ * @dbxUtilRelated object-copy-factory, as-getter
115
+ *
109
116
  * @param input - An object value or a getter function
110
117
  * @param copyFunction - Optional custom copy function
111
118
  * @returns An ObjectCopyFactory for the input
119
+ * @__NO_SIDE_EFFECTS__
112
120
  */
113
121
  export declare function asObjectCopyFactory<T>(input: T | ObjectCopyFactory<T>, copyFunction?: CopyObjectFunction<T>): ObjectCopyFactory<T>;
114
122
  /**
115
123
  * Wraps the input value in a Getter function that always returns it.
116
124
  *
125
+ * @dbxUtil
126
+ * @dbxUtilCategory getter
127
+ * @dbxUtilKind factory
128
+ * @dbxUtilTags getter, factory, wrap, constant
129
+ * @dbxUtilRelated as-getter, get-value-from-getter
130
+ *
117
131
  * @param input - The value to wrap
118
132
  * @returns A Getter that returns the input value
133
+ * @__NO_SIDE_EFFECTS__
119
134
  */
120
135
  export declare function makeGetter<T>(input: T): Getter<T>;
121
136
  /**
@@ -125,17 +140,29 @@ export type FactoryWithIndex<T> = FactoryWithInput<T, number> | FactoryWithRequi
125
140
  /**
126
141
  * Calls a factory function the specified number of times and returns the results as an array.
127
142
  *
143
+ * @dbxUtil
144
+ * @dbxUtilCategory getter
145
+ * @dbxUtilTags getter, factory, generate, array, count
146
+ * @dbxUtilRelated make-with-factory-input, array-factory
147
+ *
128
148
  * @param factory - The factory function to call (receives the current index as argument)
129
149
  * @param count - The number of items to create
130
150
  * @returns An array of produced values
151
+ * @__NO_SIDE_EFFECTS__
131
152
  */
132
153
  export declare function makeWithFactory<T>(factory: Factory<T> | FactoryWithIndex<T>, count: number): T[];
133
154
  /**
134
155
  * Maps an array of inputs through a factory function to produce an array of outputs.
135
156
  *
157
+ * @dbxUtil
158
+ * @dbxUtilCategory getter
159
+ * @dbxUtilTags getter, factory, map, array, transform
160
+ * @dbxUtilRelated make-with-factory
161
+ *
136
162
  * @param factory - The factory function to call with each input
137
163
  * @param input - The array of inputs to pass to the factory
138
164
  * @returns An array of produced values
165
+ * @__NO_SIDE_EFFECTS__
139
166
  */
140
167
  export declare function makeWithFactoryInput<T, A>(factory: FactoryWithInput<T, A>, input: Maybe<A>[]): T[];
141
168
  export declare function makeWithFactoryInput<T, A>(factory: FactoryWithRequiredInput<T, A>, input: A[]): T[];
@@ -143,7 +170,14 @@ export declare function makeWithFactoryInput<T, A>(factory: FactoryWithRequiredI
143
170
  * Wraps a factory so that no arguments are forwarded when it's called.
144
171
  * Useful for protecting a factory from accidentally receiving arguments.
145
172
  *
173
+ * @dbxUtil
174
+ * @dbxUtilCategory getter
175
+ * @dbxUtilKind factory
176
+ * @dbxUtilTags getter, factory, protect, wrap, no-args
177
+ * @dbxUtilRelated as-getter, make-getter
178
+ *
146
179
  * @param factory - The factory to wrap
147
180
  * @returns A new factory that calls the original with no arguments
181
+ * @__NO_SIDE_EFFECTS__
148
182
  */
149
183
  export declare function protectedFactory<T>(factory: Factory<T>): Factory<T>;
@@ -15,7 +15,14 @@ export declare function mapGetter<I, O>(input: Getter<I>, mapFn: MapFunction<I,
15
15
  /**
16
16
  * Creates a factory that wraps Getters with a mapping function.
17
17
  *
18
+ * @dbxUtil
19
+ * @dbxUtilCategory getter
20
+ * @dbxUtilKind factory
21
+ * @dbxUtilTags getter, map, transform, factory
22
+ * @dbxUtilRelated map-getter
23
+ *
18
24
  * @param mapFn - The mapping function to apply
19
25
  * @returns A factory that transforms Getters of type I to Getters of type O
26
+ * @__NO_SIDE_EFFECTS__
20
27
  */
21
28
  export declare function mapGetterFactory<I, O>(mapFn: MapFunction<I, O>): MapGetterFactory<I, O>;