@rzl-zone/utils-js 3.2.6-beta.0 → 3.3.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 (173) hide show
  1. package/README.md +82 -51
  2. package/dist/NumberRangeUnion-B6bhM2s7.d.ts +33 -0
  3. package/dist/{any-BmdI8UbK.d.ts → any-v4TsK9ES.d.ts} +25 -26
  4. package/dist/{arrays-normalize-recursive-CnjYJ9xg.d.ts → arrays-normalize-recursive-BqmVuFlD.d.ts} +20 -20
  5. package/dist/assertions/index.cjs +1 -1
  6. package/dist/assertions/index.d.ts +96 -70
  7. package/dist/assertions/index.js +1 -1
  8. package/dist/chunk-2CQX5CBG.js +1 -0
  9. package/dist/chunk-2IOOEY45.cjs +1 -0
  10. package/dist/chunk-3IBQ5MOM.js +1 -0
  11. package/dist/{chunk-OGPPP2S3.js → chunk-3VA554KW.js} +1 -1
  12. package/dist/{chunk-FV7SEBKD.cjs → chunk-5757UBXJ.cjs} +1 -1
  13. package/dist/{chunk-MTUBDVJ2.js → chunk-5IGC6PBH.js} +1 -1
  14. package/dist/{chunk-O7UT5AN3.cjs → chunk-5KJFVIQT.cjs} +1 -1
  15. package/dist/chunk-6JFCSH7J.js +1 -0
  16. package/dist/{chunk-VHAPTHEA.cjs → chunk-6JFZL7YE.cjs} +1 -1
  17. package/dist/chunk-7ODAAXX5.cjs +1 -0
  18. package/dist/{chunk-6C3ATUGM.cjs → chunk-CAH33WOQ.cjs} +1 -1
  19. package/dist/{chunk-ECRNH4FW.js → chunk-CKTLUNWX.js} +1 -1
  20. package/dist/chunk-CMW2TBOQ.js +1 -0
  21. package/dist/chunk-D3ENH7H6.cjs +1 -0
  22. package/dist/{chunk-3YCFMGRB.js → chunk-DEZZUYE2.js} +1 -1
  23. package/dist/chunk-DWF2R5GD.cjs +1 -0
  24. package/dist/chunk-E55EQK2U.cjs +1 -0
  25. package/dist/chunk-E74U6CYP.cjs +1 -0
  26. package/dist/{chunk-XC3QHAK2.cjs → chunk-EL6A35UR.cjs} +1 -1
  27. package/dist/chunk-F6IPNNSJ.cjs +1 -0
  28. package/dist/chunk-FJZGG54N.cjs +1 -0
  29. package/dist/chunk-FWCKOJZM.js +1 -0
  30. package/dist/{chunk-IMCLPT5V.cjs → chunk-FWHNWL2P.cjs} +1 -1
  31. package/dist/chunk-GGEADHZO.js +1 -0
  32. package/dist/{chunk-IRGE5W7L.js → chunk-GQR4R5WY.js} +1 -1
  33. package/dist/chunk-H66AC7GK.cjs +1 -0
  34. package/dist/{chunk-M47QIBXI.cjs → chunk-HQWOFR56.cjs} +1 -1
  35. package/dist/{chunk-VCFXNV3Q.cjs → chunk-HYRQMTRH.cjs} +1 -1
  36. package/dist/{chunk-EUANTHVN.js → chunk-IRFL4MAX.js} +1 -1
  37. package/dist/{chunk-GGWPB23G.cjs → chunk-IVL7CKVH.cjs} +1 -1
  38. package/dist/chunk-IZPBKKPO.js +1 -0
  39. package/dist/chunk-JBQMXC5I.cjs +1 -0
  40. package/dist/chunk-JEQEF5WD.js +1 -0
  41. package/dist/chunk-JMJQCN74.js +1 -0
  42. package/dist/chunk-JYQTCICM.js +1 -0
  43. package/dist/chunk-KVAL5PAG.cjs +1 -0
  44. package/dist/chunk-LS6U7FAY.cjs +1 -0
  45. package/dist/chunk-NBZWMBO6.js +1 -0
  46. package/dist/chunk-NRF6LWBC.cjs +1 -0
  47. package/dist/chunk-OI5XKNZO.js +1 -0
  48. package/dist/chunk-OYTYSY7G.js +1 -0
  49. package/dist/chunk-PET42Z7W.js +1 -0
  50. package/dist/chunk-PZQ6I4JJ.cjs +1 -0
  51. package/dist/chunk-QBKAEVYG.js +1 -0
  52. package/dist/{chunk-YV3K2EKJ.js → chunk-RIPKY4RU.js} +1 -1
  53. package/dist/chunk-RZW35UN5.cjs +1 -0
  54. package/dist/chunk-SBFNXGTJ.js +1 -0
  55. package/dist/{chunk-T4CIAKEK.js → chunk-SBKGWRS5.js} +1 -1
  56. package/dist/{chunk-5Z2G23WP.js → chunk-SIM77PU4.js} +1 -1
  57. package/dist/chunk-T2T7K3KR.js +1 -0
  58. package/dist/chunk-T7PU2V7X.cjs +1 -0
  59. package/dist/chunk-V45XJKHW.cjs +1 -0
  60. package/dist/chunk-W2WNBUDE.js +1 -0
  61. package/dist/chunk-XABCB3Y7.cjs +1 -0
  62. package/dist/chunk-XEDXFSGI.js +1 -0
  63. package/dist/chunk-YKPSRP5G.js +1 -0
  64. package/dist/chunk-YLA3DURS.cjs +1 -0
  65. package/dist/chunk-ZETAZZLD.cjs +1 -0
  66. package/dist/conversions/index.cjs +1 -1
  67. package/dist/conversions/index.d.ts +515 -321
  68. package/dist/conversions/index.js +1 -1
  69. package/dist/events/index.cjs +1 -1
  70. package/dist/events/index.d.ts +25 -20
  71. package/dist/events/index.js +1 -1
  72. package/dist/{extends-Bk_SBGdT.d.ts → extends-DtdRjDyU.d.ts} +63 -87
  73. package/dist/{formatting → formatters}/index.cjs +1 -1
  74. package/dist/formatters/index.d.ts +2106 -0
  75. package/dist/formatters/index.js +1 -0
  76. package/dist/generators/index.cjs +1 -0
  77. package/dist/{generator → generators}/index.d.ts +57 -59
  78. package/dist/generators/index.js +1 -0
  79. package/dist/{if-CvT4R7Kh.d.ts → if-ChM35c_q.d.ts} +6 -5
  80. package/dist/index.d.ts +14 -0
  81. package/dist/{is-array--YjXV-Wx.d.ts → is-array-BJeHxPM3.d.ts} +287 -542
  82. package/dist/{isPlainObject-BVhBAPHX.d.ts → isPlainObject-DGJkcFYw.d.ts} +6 -6
  83. package/dist/{never-BfayMBF9.d.ts → never-D89PbPh5.d.ts} +10 -19
  84. package/dist/next/index.cjs +1 -1
  85. package/dist/next/index.d.ts +15 -12
  86. package/dist/next/index.js +1 -1
  87. package/dist/next/server/index.cjs +1 -1
  88. package/dist/next/server/index.d.ts +1 -1
  89. package/dist/next/server/index.js +1 -1
  90. package/dist/{nils-DMz3kU7M.d.ts → nils-CO8zLHSB.d.ts} +39 -65
  91. package/dist/operations/index.cjs +1 -1
  92. package/dist/operations/index.d.ts +4 -4
  93. package/dist/operations/index.js +1 -1
  94. package/dist/or-C6qzKt2I.d.ts +82 -0
  95. package/dist/override-CL2olHE5.d.ts +59 -0
  96. package/dist/parsers/index.cjs +1 -1
  97. package/dist/parsers/index.js +1 -1
  98. package/dist/pick-BSMX6Xe2.d.ts +15 -0
  99. package/dist/predicates/index.cjs +1 -1
  100. package/dist/predicates/index.d.ts +425 -106
  101. package/dist/predicates/index.js +1 -1
  102. package/dist/prettify-3o8_Kw6b.d.ts +564 -0
  103. package/dist/promises/index.cjs +1 -0
  104. package/dist/promises/index.d.ts +107 -0
  105. package/dist/promises/index.js +1 -0
  106. package/dist/promises-LU7K00H0.d.ts +72 -0
  107. package/dist/rzl-utils.global.js +1 -1
  108. package/dist/{string-XA-til3C.d.ts → string-B1jlOnws.d.ts} +82 -121
  109. package/dist/strings/index.cjs +1 -1
  110. package/dist/strings/index.d.ts +209 -210
  111. package/dist/strings/index.js +1 -1
  112. package/dist/tailwind/index.cjs +1 -1
  113. package/dist/tailwind/index.d.ts +23 -17
  114. package/dist/tailwind/index.js +1 -1
  115. package/dist/types/index.d.ts +899 -1181
  116. package/dist/urls/index.cjs +1 -1
  117. package/dist/urls/index.d.ts +113 -108
  118. package/dist/urls/index.js +1 -1
  119. package/package.json +33 -40
  120. package/dist/NumberRangeUnion-DC-C3_Kq.d.ts +0 -26
  121. package/dist/chunk-2HSNUPEO.cjs +0 -1
  122. package/dist/chunk-4Z75R3IT.cjs +0 -1
  123. package/dist/chunk-AJ25PWXX.cjs +0 -1
  124. package/dist/chunk-BHIBDDQF.js +0 -1
  125. package/dist/chunk-CE4JI2YB.js +0 -1
  126. package/dist/chunk-CMJ6UYWW.cjs +0 -1
  127. package/dist/chunk-D3VSHABU.cjs +0 -1
  128. package/dist/chunk-DG2GWBTS.cjs +0 -1
  129. package/dist/chunk-EKS4IZJR.cjs +0 -1
  130. package/dist/chunk-EOZKYR5S.cjs +0 -1
  131. package/dist/chunk-EW3I4O7X.js +0 -1
  132. package/dist/chunk-F3E77L46.js +0 -1
  133. package/dist/chunk-G5LXIEFO.js +0 -0
  134. package/dist/chunk-GVWGQNLF.js +0 -1
  135. package/dist/chunk-H3FXL4DU.cjs +0 -1
  136. package/dist/chunk-HHPDLSX2.cjs +0 -1
  137. package/dist/chunk-JARPXKBM.cjs +0 -1
  138. package/dist/chunk-JFJUPYDT.cjs +0 -1
  139. package/dist/chunk-JLP56WSM.js +0 -1
  140. package/dist/chunk-K3MV4AIN.cjs +0 -1
  141. package/dist/chunk-KOVO72OM.js +0 -1
  142. package/dist/chunk-LJ4M3VGE.js +0 -1
  143. package/dist/chunk-LJVGJLP4.js +0 -1
  144. package/dist/chunk-MISCBZJC.js +0 -1
  145. package/dist/chunk-MMSYCIJ2.cjs +0 -1
  146. package/dist/chunk-OLPKAX7F.cjs +0 -1
  147. package/dist/chunk-ORZFHBEY.js +0 -1
  148. package/dist/chunk-OWV2P376.js +0 -1
  149. package/dist/chunk-RV2WK5E6.js +0 -1
  150. package/dist/chunk-SBF43G3B.cjs +0 -1
  151. package/dist/chunk-X74TUJSE.cjs +0 -1
  152. package/dist/chunk-XLDAIZRK.js +0 -1
  153. package/dist/chunk-XZJ7C4N6.js +0 -1
  154. package/dist/chunk-ZHV5ZYVN.cjs +0 -1
  155. package/dist/chunk-ZL7J6GTP.js +0 -1
  156. package/dist/chunk-ZTCLKKMB.js +0 -1
  157. package/dist/env/index.cjs +0 -1
  158. package/dist/env/index.d.ts +0 -16
  159. package/dist/env/index.js +0 -1
  160. package/dist/formatting/index.d.ts +0 -950
  161. package/dist/formatting/index.js +0 -1
  162. package/dist/generator/index.cjs +0 -1
  163. package/dist/generator/index.js +0 -1
  164. package/dist/omit-VvmIsZmX.d.ts +0 -28
  165. package/dist/prettify-C4xLcYOP.d.ts +0 -353
  166. package/dist/promise/index.cjs +0 -1
  167. package/dist/promise/index.d.ts +0 -31
  168. package/dist/promise/index.js +0 -1
  169. package/dist/type-data-DDs-u2kq.d.ts +0 -261
  170. /package/dist/{chunk-5C2SMIGX.cjs → chunk-BAV5T2E3.cjs} +0 -0
  171. /package/dist/{chunk-MC3LXMCQ.js → chunk-L5RDAVVH.js} +0 -0
  172. /package/dist/{chunk-J2RGTPGK.cjs → chunk-VJDDGRIK.cjs} +0 -0
  173. /package/dist/{chunk-FIAAX3UE.js → chunk-YWHHVDT4.js} +0 -0
@@ -1 +1 @@
1
- export{convertType,removeObjectPaths,toBooleanContent,toBooleanContentDeep,toBooleanExplicit,toBooleanLoose,toNumberArrayUnRecursive,toNumberDeep,toStringDeep}from"../chunk-LJ4M3VGE.js";export{cleanParsedData,extractDigits,parseCustomDate,safeJsonParse}from"../chunk-XLDAIZRK.js";import"../chunk-MTUBDVJ2.js";export{dedupeArray,filterNilArray,toStringArrayUnRecursive,toStringDeepForce}from"../chunk-ORZFHBEY.js";import"../chunk-IRGE5W7L.js";import"../chunk-ZTCLKKMB.js";import"../chunk-ECRNH4FW.js";export{parseCurrencyString}from"../chunk-EUANTHVN.js";import"../chunk-OWV2P376.js";import"../chunk-FIAAX3UE.js";import"../chunk-KOVO72OM.js";import"../chunk-T4CIAKEK.js";export{safeStableStringify}from"../chunk-BHIBDDQF.js";import"../chunk-QNKGP5DY.js";import"../chunk-EW3I4O7X.js";
1
+ export{convertType,dedupeArray,removeObjectPaths,toBooleanContent,toBooleanContentDeep,toBooleanExplicit,toBooleanLoose,toNumberArrayUnRecursive,toNumberDeep,toStringDeep,toStringDeepForce}from"../chunk-FWCKOJZM.js";import"../chunk-5IGC6PBH.js";export{filterNilArray,toStringArrayUnRecursive}from"../chunk-OI5XKNZO.js";import"../chunk-GQR4R5WY.js";export{parseCurrencyString}from"../chunk-IRFL4MAX.js";import"../chunk-3IBQ5MOM.js";import"../chunk-W2WNBUDE.js";import"../chunk-SBKGWRS5.js";export{cleanParsedData,extractDigits,parseCustomDate,safeJsonParse}from"../chunk-2CQX5CBG.js";import"../chunk-NBZWMBO6.js";import"../chunk-6JFCSH7J.js";import"../chunk-CKTLUNWX.js";import"../chunk-YWHHVDT4.js";export{safeStableStringify}from"../chunk-PET42Z7W.js";import"../chunk-QNKGP5DY.js";import"../chunk-CMW2TBOQ.js";
@@ -1 +1 @@
1
- "use strict";var e=require("../chunk-XC3QHAK2.cjs");require("../chunk-J2RGTPGK.cjs"),require("../chunk-VCFXNV3Q.cjs"),require("../chunk-D3VSHABU.cjs"),Object.defineProperty(exports,"disableUserInteraction",{enumerable:!0,get:function(){return e.disableUserInteraction}}),Object.defineProperty(exports,"enableUserInteraction",{enumerable:!0,get:function(){return e.enableUserInteraction}}),Object.defineProperty(exports,"removeElementFocus",{enumerable:!0,get:function(){return e.removeElementFocus}}),Object.defineProperty(exports,"scrollToTop",{enumerable:!0,get:function(){return e.scrollToTop}});
1
+ "use strict";var e=require("../chunk-EL6A35UR.cjs");require("../chunk-VJDDGRIK.cjs"),require("../chunk-HYRQMTRH.cjs"),require("../chunk-PZQ6I4JJ.cjs"),Object.defineProperty(exports,"disableUserInteraction",{enumerable:!0,get:function(){return e.disableUserInteraction}}),Object.defineProperty(exports,"enableUserInteraction",{enumerable:!0,get:function(){return e.enableUserInteraction}}),Object.defineProperty(exports,"removeElementFocus",{enumerable:!0,get:function(){return e.removeElementFocus}}),Object.defineProperty(exports,"scrollToTop",{enumerable:!0,get:function(){return e.scrollToTop}});
@@ -1,23 +1,3 @@
1
- type ScrollToTopOptions={
2
- /** Scroll animation type.
3
- *
4
- * - Valid values: `"auto"`, `"instant"`, `"smooth"`.
5
- * - Default force to `"smooth"` if missing or invalid.
6
- *
7
- * @default "smooth"
8
- */
9
- behavior?:ScrollBehavior|undefined;
10
- /** Delay before scrolling (in milliseconds).
11
- *
12
- * - Default value is `1`.
13
- * - Valid values: any number `≥` `1`.
14
- * - Non-integer number are truncated to an integer.
15
- * - Force to `2147483647` if number is larger than `2147483647`.
16
- * - Default force to `1` if `missing`, `NaN`, `invalid-type`, or `less-than` `1`.
17
- *
18
- * @default 1
19
- */
20
- timeout?:number|undefined;};
21
1
  /** ----------------------------------------------------------
22
2
  * * ***Utility: `disableUserInteraction`.***
23
3
  * ----------------------------------------------------------
@@ -83,6 +63,31 @@ declare const enableUserInteraction:(className?:string)=>void;
83
63
  * removeElementFocus(); // ➔ Removes focus from the currently active element
84
64
  */
85
65
  declare const removeElementFocus:()=>void;
66
+ /** @private ***Types options for {@link scrollToTop | `scrollToTop`}.*** */
67
+ type ScrollToTopOptions={
68
+ /** ----------------------------------------------------------
69
+ * * ***Scroll animation type.***
70
+ * ----------------------------------------------------------
71
+ * - ***Behavior:***
72
+ * - Valid values: `"auto"`, `"instant"`, `"smooth"`.
73
+ * - Default force to `"smooth"` if missing or invalid.
74
+ *
75
+ * @default "smooth"
76
+ */
77
+ behavior?:ScrollBehavior|undefined;
78
+ /** ----------------------------------------------------------
79
+ * * ***Delay before scrolling (in milliseconds).***
80
+ * ----------------------------------------------------------
81
+ * - ***Behavior:***
82
+ * - Default value is `1`.
83
+ * - Valid values: any number `≥` `1`.
84
+ * - Non-integer number are truncated to an integer.
85
+ * - Force to `2147483647` if number is larger than `2147483647`.
86
+ * - Default force to `1` if `missing`, `NaN`, `invalid-type`, or `less-than` `1`.
87
+ *
88
+ * @default 1
89
+ */
90
+ timeout?:number|undefined;};
86
91
  /** ----------------------------------------------------------
87
92
  * * ***Utility: `scrollToTop`.***
88
93
  * ----------------------------------------------------------
@@ -1 +1 @@
1
- export{disableUserInteraction,enableUserInteraction,removeElementFocus,scrollToTop}from"../chunk-5Z2G23WP.js";import"../chunk-MC3LXMCQ.js";import"../chunk-T4CIAKEK.js";import"../chunk-EW3I4O7X.js";
1
+ export{disableUserInteraction,enableUserInteraction,removeElementFocus,scrollToTop}from"../chunk-SIM77PU4.js";import"../chunk-L5RDAVVH.js";import"../chunk-SBKGWRS5.js";import"../chunk-CMW2TBOQ.js";
@@ -1,15 +1,11 @@
1
- import{I as If}from'./if-CvT4R7Kh.js';import{I as IsNever}from'./never-BfayMBF9.js';
1
+ import{I as If}from'./if-ChM35c_q.js';import{I as IsNever}from'./never-D89PbPh5.js';
2
2
  /** -------------------------------------------------------
3
- * * ***Arrayable.***
3
+ * * ***Utility Type: `Arrayable`.***
4
4
  * -------------------------------------------------------
5
- * Represents a type that can be either:
6
- * - a single value of type `T`, or
7
- * - an array of values of type `T`.
8
- *
9
- * Useful when a function or API accepts **either one item or multiple items**.
10
- *
5
+ * **Useful when a function or API accepts **either one item or multiple items**.**
6
+ * - **Represents a type that can be either:**
7
+ * - a single value of type `T`, or an array of values of type `T`.
11
8
  * @template T - The element type.
12
- *
13
9
  * @example
14
10
  * ```ts
15
11
  * function toArray<T>(input: Arrayable<T>): T[] {
@@ -25,20 +21,18 @@ import{I as If}from'./if-CvT4R7Kh.js';import{I as IsNever}from'./never-BfayMBF9.
25
21
  */
26
22
  type Arrayable<T>=T|Array<T>;
27
23
  /** -------------------------------------------------------
28
- * * ***MutableArray.***
24
+ * * ***Utility Type: `MutableArray`.***
29
25
  * -------------------------------------------------------
30
- * Recursively creates a **mutable version** of a readonly array, tuple, or object type.
31
- *
26
+ * **Recursively creates a **mutable version** of a readonly array, tuple, or object type.**
27
+ * @description
32
28
  * By default, TypeScript infers tuple/array literals as `readonly` (especially with `as const`).
33
29
  * This utility removes the `readonly` modifier from all elements recursively,
34
30
  * turning a readonly tuple, array, or object into a mutable one.
35
- *
36
- * Optionally, if `Widen` is `true`, literal types (`1`, `'foo'`, `true`) are widened to
37
- * their primitive equivalents (`number`, `string`, `boolean`) for easier assignment.
38
- *
31
+ * - **Behavior:**
32
+ * - Optionally, if `Widen` is `true`, literal types (`1`, `'foo'`, `true`) are widened to
33
+ * their primitive equivalents (`number`, `string`, `boolean`) for easier assignment.
39
34
  * @template T - The readonly array, tuple, or object type to make mutable.
40
35
  * @template Widen - Whether to widen literal primitive types to their base types (default: `false`).
41
- *
42
36
  * @example
43
37
  * ```ts
44
38
  * type A = readonly [1, 2, 3];
@@ -59,14 +53,11 @@ type Arrayable<T>=T|Array<T>;
59
53
  */
60
54
  type MutableArray<T,Widen extends boolean=false>=T extends(...args:any)=>any?T:T extends readonly any[]?{-readonly [K in keyof T]:MutableArray<T[K],Widen>;}:T extends object?{-readonly [K in keyof T]:MutableArray<T[K],Widen>;}:Widen extends true?T extends number?number:T extends string?string:T extends boolean?boolean:T extends bigint?bigint:T extends symbol?symbol:T:T;
61
55
  /** --------------------------------------------------
62
- * * ***GetArrayElementType.***
56
+ * * ***Utility Type: `GetArrayElementType`.***
63
57
  * --------------------------------------------------
64
- * Gets the element type from a readonly array or tuple.
65
- *
66
- * ✅ Useful when working with `as const` arrays to extract the union of literal types.
67
- *
58
+ * **Gets the element type from a readonly array or tuple.**
59
+ * - ✅ Useful when working with `as const` arrays to extract the union of literal types.
68
60
  * @template T - A readonly array or tuple type.
69
- *
70
61
  * @example
71
62
  * ```ts
72
63
  * const roles = ['admin', 'user'] as const;
@@ -76,11 +67,10 @@ type MutableArray<T,Widen extends boolean=false>=T extends(...args:any)=>any?T:T
76
67
  */
77
68
  type GetArrayElementType<T extends readonly any[]>=T extends readonly(infer U)[]?U:never;
78
69
  /** -------------------------------------------------------
79
- * * ***EmptyArray.***
70
+ * * ***Utility Type: `EmptyArray`.***
80
71
  * -------------------------------------------------------
81
- * A type-level utility that returns `T` if it is an ***empty array***,
82
- * otherwise returns `never`.
83
- *
72
+ * **A type-level utility that returns `T` if it is an ***empty array***,
73
+ * otherwise returns `never`.**
84
74
  * @template T - The array type to check.
85
75
  * @example
86
76
  * ```ts
@@ -98,11 +88,10 @@ type GetArrayElementType<T extends readonly any[]>=T extends readonly(infer U)[]
98
88
  */
99
89
  type EmptyArray<T extends readonly unknown[]>=T extends readonly [ unknown,...unknown[]]?never:T;
100
90
  /** -------------------------------------------------------
101
- * * ***NonEmptyArray.***
91
+ * * ***Utility Type: `NonEmptyArray`.***
102
92
  * -------------------------------------------------------
103
- * A type-level utility that returns `T` if it is a ***non-empty array***,
104
- * otherwise returns `never`.
105
- *
93
+ * **A type-level utility that returns `T` if it is a ***non-empty array***,
94
+ * otherwise returns `never`.**
106
95
  * @template T - The array type to check.
107
96
  * @example
108
97
  * ```ts
@@ -120,11 +109,10 @@ type EmptyArray<T extends readonly unknown[]>=T extends readonly [ unknown,...un
120
109
  */
121
110
  type NonEmptyArray<T extends readonly unknown[]>=If<IsNever<EmptyArray<T>>,T,never>;
122
111
  /** -------------------------------------------------------
123
- * * ***IsEmptyArray.***
112
+ * * ***Utility Type: `IsEmptyArray`.***
124
113
  * -------------------------------------------------------
125
- * A type-level utility that evaluates to `true` if `T` is an ***empty array.***
126
- * (or can be empty per this definition), otherwise `false`.
127
- *
114
+ * **A type-level utility that evaluates to `true` if `T` is an ***empty array.***
115
+ * (or can be empty per this definition), otherwise `false`.**
128
116
  * @template T - The array type to check.
129
117
  * @example
130
118
  * ```ts
@@ -142,11 +130,10 @@ type NonEmptyArray<T extends readonly unknown[]>=If<IsNever<EmptyArray<T>>,T,nev
142
130
  */
143
131
  type IsEmptyArray<T extends readonly unknown[]>=If<IsNever<EmptyArray<T>>,false,true>;
144
132
  /** -------------------------------------------------------
145
- * * ***IsNonEmptyArray.***
133
+ * * ***Utility Type: `IsNonEmptyArray`.***
146
134
  * -------------------------------------------------------
147
- * A type-level utility that evaluates to `true` if `T` is a ***non-empty array.***
148
- * (strictly a non-empty tuple), otherwise `false`.
149
- *
135
+ * **A type-level utility that evaluates to `true` if `T` is a ***non-empty array.***
136
+ * (strictly a non-empty tuple), otherwise `false`.**
150
137
  * @template T - The array type to check.
151
138
  * @example
152
139
  * ```ts
@@ -164,12 +151,11 @@ type IsEmptyArray<T extends readonly unknown[]>=If<IsNever<EmptyArray<T>>,false,
164
151
  */
165
152
  type IsNonEmptyArray<T extends readonly unknown[]>=If<IsNever<EmptyArray<T>>,true,false>;
166
153
  /** -------------------------------------------------------
167
- * * ***IfEmptyArray.***
154
+ * * ***Utility Type: `IfEmptyArray`.***
168
155
  * -------------------------------------------------------
169
- * Returns the second argument if `T` is an ***empty array*** (per this utility),
170
- * otherwise returns the third argument.
156
+ * **Returns the second argument if `T` is an ***empty array*** (per this utility),
157
+ * otherwise returns the third argument.**
171
158
  * - Defaults: `IfTrue = true`, `IfFalse = false`.
172
- *
173
159
  * @template T - The array type to check.
174
160
  * @template IfTrue - Returned type if `T` is empty by this definition.
175
161
  * @template IfFalse - Returned type if `T` is not empty by this definition.
@@ -193,12 +179,11 @@ type IsNonEmptyArray<T extends readonly unknown[]>=If<IsNever<EmptyArray<T>>,tru
193
179
  */
194
180
  type IfEmptyArray<T extends readonly unknown[],IfTrue=true,IfFalse=false>=If<IsEmptyArray<T>,IfTrue,IfFalse>;
195
181
  /** -------------------------------------------------------
196
- * * ***IfNonEmptyArray.***
182
+ * * ***Utility Type: `IfNonEmptyArray`.***
197
183
  * -------------------------------------------------------
198
- * Returns the second argument if `T` is a ***non-empty array*** (strict tuple),
199
- * otherwise returns the third argument.
184
+ * **Returns the second argument if `T` is a ***non-empty array*** (strict tuple),
185
+ * otherwise returns the third argument.**
200
186
  * - Defaults: `IfTrue = true`, `IfFalse = false`.
201
- *
202
187
  * @template T - The array type to check.
203
188
  * @template IfTrue - Returned type if `T` is non-empty by this definition.
204
189
  * @template IfFalse - Returned type if `T` is not non-empty by this definition.
@@ -222,12 +207,10 @@ type IfEmptyArray<T extends readonly unknown[],IfTrue=true,IfFalse=false>=If<IsE
222
207
  */
223
208
  type IfNonEmptyArray<T extends readonly unknown[],IfTrue=true,IfFalse=false>=If<IsNonEmptyArray<T>,IfTrue,IfFalse>;
224
209
  /** -------------------------------------------------------
225
- * * ***Not.***
210
+ * * ***Utility Type: `Not`.***
226
211
  * -------------------------------------------------------
227
- * Accepts a boolean type `T` and returns its negation.
228
- *
212
+ * **Accepts a boolean type `T` and returns its negation.**
229
213
  * @template T - Boolean type to negate.
230
- *
231
214
  * @example
232
215
  * ```ts
233
216
  * type A = Not<true>; // ➔ false
@@ -235,18 +218,15 @@ type IfNonEmptyArray<T extends readonly unknown[],IfTrue=true,IfFalse=false>=If<
235
218
  * ```
236
219
  */
237
220
  type Not<T extends boolean>=T extends true?false:true;
238
- /** -------------------------------------------------------
239
- * * ***PopOptions.***
240
- * -------------------------------------------------------
241
- *
242
- * Configuration options for the {@link Pop} type utility.
221
+ /** ---------------------------------------------------------------------------
222
+ * * ***Options for {@link Pop|`Pop`}.***
223
+ * ---------------------------------------------------------------------------
224
+ * **Configuration options for the {@link Pop | **`Pop`**} type utility.**
243
225
  */
244
226
  type PopOptions={
245
227
  /**
246
- * If `true`, {@link Pop} will return a tuple `[Rest, Removed]`
247
- * instead of just the remaining array.
248
- *
249
- * Default: `false`.
228
+ * If `true`, {@link Pop | **`Pop`**} will return a tuple `[Rest, Removed]`
229
+ * instead of just the remaining array, default: `false`.
250
230
  *
251
231
  * @example
252
232
  * ```ts
@@ -256,17 +236,14 @@ type PopOptions={
256
236
  */
257
237
  includeRemoved:boolean;};
258
238
  /** -------------------------------------------------------
259
- * * ***Pop.***
239
+ * * ***Utility Type: `Pop`.***
260
240
  * -------------------------------------------------------
261
- *
262
- * Removes the last element from a tuple/array type.
263
- *
264
- * If the `includeRemoved` option is `true`, it returns a tuple `[Rest, Removed]`
265
- * where `Rest` is the array without the last element, and `Removed` is the last element.
266
- *
241
+ * **Removes the last element from a tuple/array type.**
242
+ * - If the `includeRemoved` option is `true`, it returns a tuple `[Rest, Removed]`
243
+ * where `Rest` is the array without the last element, and `Removed` is the last
244
+ * element.
267
245
  * @template T - The tuple or array to pop from.
268
246
  * @template Options - Configuration object. Default `{ includeRemoved: false }`.
269
- *
270
247
  * @example
271
248
  * ```ts
272
249
  * // Removes last element
@@ -284,10 +261,9 @@ includeRemoved:boolean;};
284
261
  */
285
262
  type Pop<T extends readonly unknown[],Options extends PopOptions={includeRemoved:false;}>=IsEmptyArray<T>extends true?never:T extends readonly [...infer Rest extends readonly unknown[],infer Removed]?If<Options["includeRemoved"],[Rest,Removed],Rest>:never;
286
263
  /** -------------------------------------------------------
287
- * * ***Extends.***
264
+ * * ***Utility Type: `Extends`.***
288
265
  * -------------------------------------------------------
289
- * Returns a boolean indicating whether the first argument ***extends*** the second argument.
290
- *
266
+ * **Returns a boolean indicating whether the first argument ***extends*** the second argument.**
291
267
  * @template T - The type to check.
292
268
  * @template Base - The type to compare against.
293
269
  * @example
@@ -298,10 +274,9 @@ type Pop<T extends readonly unknown[],Options extends PopOptions={includeRemoved
298
274
  */
299
275
  type Extends<T,Base>=[T] extends [Base]?true:false;
300
276
  /** -------------------------------------------------------
301
- * * ***NotExtends.***
277
+ * * ***Utility Type: `NotExtends`.***
302
278
  * -------------------------------------------------------
303
- * Returns a boolean indicating whether the first argument does ***not extend*** the second argument.
304
- *
279
+ * **Returns a boolean indicating whether the first argument does ***not extend*** the second argument.**
305
280
  * @template T - The type to check.
306
281
  * @template Base - The type to compare against.
307
282
  * @example
@@ -312,15 +287,16 @@ type Extends<T,Base>=[T] extends [Base]?true:false;
312
287
  */
313
288
  type NotExtends<T,Base>=Not<Extends<T,Base>>;
314
289
  /** -------------------------------------------------------
315
- * * ***IfExtends.***
290
+ * * ***Utility Type: `IfExtends`.***
316
291
  * -------------------------------------------------------
317
- * Conditional: returns the third argument if the first argument ***extends*** the second argument, otherwise returns the fourth argument.
292
+ * - **Conditional:**
293
+ * - Returns the third argument if the first argument ***extends*** the secon
294
+ * argument, otherwise returns the fourth argument.
318
295
  * - Defaults: `IfTrue = true`, `IfFalse = false`.
319
- *
320
296
  * @template T - The type to check.
321
297
  * @template Base - The type to compare against.
322
- * @template IfTrue - The branch type if condition is met. (default: `true`)
323
- * @template IfFalse - The branch type if condition is not met. (default: `false`)
298
+ * @template IfTrue - The branch type if condition is met, (default: `true`).
299
+ * @template IfFalse - The branch type if condition is not met, (default: `false`).
324
300
  * @example
325
301
  * ```ts
326
302
  * type A = IfExtends<1, number, "valid">;
@@ -331,15 +307,16 @@ type NotExtends<T,Base>=Not<Extends<T,Base>>;
331
307
  */
332
308
  type IfExtends<T,Base,IfTrue=true,IfFalse=false>=If<Extends<T,Base>,IfTrue,IfFalse>;
333
309
  /** -------------------------------------------------------
334
- * * ***IfNotExtends.***
310
+ * * ***Utility Type: `IfNotExtends`.***
335
311
  * -------------------------------------------------------
336
- * Conditional: returns the third argument if the first argument does ***not extend*** the second argument, otherwise returns the fourth argument.
312
+ * - **Conditional:**
313
+ * - Returns the third argument if the first argument does ***not extend*** the
314
+ * second argument, otherwise returns the fourth argument.
337
315
  * - Defaults: `IfTrue = true`, `IfFalse = false`.
338
- *
339
316
  * @template T - The type to check.
340
317
  * @template Base - The type to compare against.
341
- * @template IfTrue - The branch type if condition is met. (default: `true`)
342
- * @template IfFalse - The branch type if condition is not met. (default: `false`)
318
+ * @template IfTrue - The branch type if condition is met, (default: `true`).
319
+ * @template IfFalse - The branch type if condition is not met, (default: `false`).
343
320
  * @example
344
321
  * ```ts
345
322
  * type A = IfNotExtends<1, string, "valid">;
@@ -350,10 +327,9 @@ type IfExtends<T,Base,IfTrue=true,IfFalse=false>=If<Extends<T,Base>,IfTrue,IfFal
350
327
  */
351
328
  type IfNotExtends<T,Base,IfTrue=true,IfFalse=false>=If<NotExtends<T,Base>,IfTrue,IfFalse>;
352
329
  /** -------------------------------------------------------
353
- * * ***ExtendsArr.***
330
+ * * ***Utility Type: `ExtendsArr`.***
354
331
  * -------------------------------------------------------
355
- * Returns a boolean indicating whether every element of the first array argument ***extends*** the second argument.
356
- *
332
+ * **Returns a boolean indicating whether every element of the first array argument ***extends*** the second argument.**
357
333
  * @template T - The array to check.
358
334
  * @template Base - The type to compare each element against.
359
335
  * @example
@@ -1 +1 @@
1
- "use strict";var e=require("../chunk-HHPDLSX2.cjs");require("../chunk-O7UT5AN3.cjs"),require("../chunk-CMJ6UYWW.cjs"),require("../chunk-2HSNUPEO.cjs"),require("../chunk-4Z75R3IT.cjs"),require("../chunk-VCFXNV3Q.cjs"),require("../chunk-DVMHRLKP.cjs"),require("../chunk-ZHV5ZYVN.cjs"),require("../chunk-UDA26MCU.cjs"),require("../chunk-D3VSHABU.cjs"),Object.defineProperty(exports,"censorEmail",{enumerable:!0,get:function(){return e.censorEmail}}),Object.defineProperty(exports,"chunkString",{enumerable:!0,get:function(){return e.chunkString}}),Object.defineProperty(exports,"formatCurrency",{enumerable:!0,get:function(){return e.formatCurrency}}),Object.defineProperty(exports,"formatDateFns",{enumerable:!0,get:function(){return e.formatDateFns}}),Object.defineProperty(exports,"formatDateIntl",{enumerable:!0,get:function(){return e.formatDateIntl}}),Object.defineProperty(exports,"formatDateTime",{enumerable:!0,get:function(){return e.formatDateTime}}),Object.defineProperty(exports,"formatNumber",{enumerable:!0,get:function(){return e.formatNumber}}),Object.defineProperty(exports,"formatPhoneNumber",{enumerable:!0,get:function(){return e.formatPhoneNumber}}),Object.defineProperty(exports,"getGMTOffset",{enumerable:!0,get:function(){return e.getGMTOffset}}),Object.defineProperty(exports,"truncateString",{enumerable:!0,get:function(){return e.truncateString}});
1
+ "use strict";var e=require("../chunk-XABCB3Y7.cjs");require("../chunk-2IOOEY45.cjs"),require("../chunk-5KJFVIQT.cjs"),require("../chunk-V45XJKHW.cjs"),require("../chunk-DVMHRLKP.cjs"),require("../chunk-E55EQK2U.cjs"),require("../chunk-HYRQMTRH.cjs"),require("../chunk-T7PU2V7X.cjs"),require("../chunk-UDA26MCU.cjs"),require("../chunk-PZQ6I4JJ.cjs"),Object.defineProperty(exports,"censorEmail",{enumerable:!0,get:function(){return e.censorEmail}}),Object.defineProperty(exports,"chunkString",{enumerable:!0,get:function(){return e.chunkString}}),Object.defineProperty(exports,"formatCurrency",{enumerable:!0,get:function(){return e.formatCurrency}}),Object.defineProperty(exports,"formatDateFns",{enumerable:!0,get:function(){return e.formatDateFns}}),Object.defineProperty(exports,"formatDateIntl",{enumerable:!0,get:function(){return e.formatDateIntl}}),Object.defineProperty(exports,"formatDateTime",{enumerable:!0,get:function(){return e.formatDateTime}}),Object.defineProperty(exports,"formatNumber",{enumerable:!0,get:function(){return e.formatNumber}}),Object.defineProperty(exports,"formatPhoneNumber",{enumerable:!0,get:function(){return e.formatPhoneNumber}}),Object.defineProperty(exports,"getGMTOffset",{enumerable:!0,get:function(){return e.getGMTOffset}}),Object.defineProperty(exports,"truncateString",{enumerable:!0,get:function(){return e.truncateString}});