@rzl-zone/utils-js 3.1.0-beta.2 → 3.1.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 (195) hide show
  1. package/README.md +56 -27
  2. package/dist/NumberRangeUnion-DC-C3_Kq.d.ts +23 -23
  3. package/dist/any-BmdI8UbK.d.ts +56 -56
  4. package/dist/arrays-normalize-recursive-CnjYJ9xg.d.ts +66 -66
  5. package/dist/assertions/index.cjs +1 -1
  6. package/dist/assertions/index.d.ts +396 -396
  7. package/dist/assertions/index.js +1 -1
  8. package/dist/chunk-26XIKDJI.cjs +1 -0
  9. package/dist/chunk-2NWHDDM5.js +1 -0
  10. package/dist/chunk-2UIRWYE3.js +1 -0
  11. package/dist/chunk-3KBHD3BS.cjs +1 -0
  12. package/dist/chunk-4HD2O5A4.js +1 -0
  13. package/dist/chunk-5C2SMIGX.cjs +1 -0
  14. package/dist/chunk-5I2B5DOG.js +1 -0
  15. package/dist/chunk-6HQDHIOD.js +1 -0
  16. package/dist/chunk-735HJXBT.cjs +1 -0
  17. package/dist/chunk-7BXIZM57.cjs +1 -0
  18. package/dist/chunk-7KJBDGEP.js +1 -0
  19. package/dist/chunk-7U44T63D.cjs +1 -0
  20. package/dist/chunk-AJ65QFV2.js +1 -0
  21. package/dist/chunk-APHDUCVQ.js +1 -0
  22. package/dist/chunk-BSVZRN7C.js +1 -0
  23. package/dist/chunk-C6JFHUR2.cjs +1 -0
  24. package/dist/chunk-CPLBRGST.js +1 -0
  25. package/dist/chunk-CTBRLEOG.js +1 -0
  26. package/dist/chunk-DUK2K4FB.js +1 -0
  27. package/dist/chunk-DVMHRLKP.cjs +1 -0
  28. package/dist/chunk-E63WVPZE.cjs +1 -0
  29. package/dist/chunk-EBMHQW7X.cjs +1 -0
  30. package/dist/chunk-EGNZCW4K.js +1 -0
  31. package/dist/chunk-FEKDB32T.js +1 -0
  32. package/dist/chunk-FIAAX3UE.js +1 -0
  33. package/dist/chunk-FUS3DVLB.cjs +1 -0
  34. package/dist/chunk-GGRMHIFJ.cjs +1 -0
  35. package/dist/chunk-HQ5GQTEE.js +1 -0
  36. package/dist/chunk-I5X5IN4H.js +1 -0
  37. package/dist/chunk-I7YGXQPI.cjs +1 -0
  38. package/dist/chunk-INUFZJLX.cjs +1 -0
  39. package/dist/chunk-IREHUBF7.js +1 -0
  40. package/dist/chunk-J2RGTPGK.cjs +1 -0
  41. package/dist/chunk-KHO2SBNA.cjs +1 -0
  42. package/dist/chunk-KXIXXSWX.cjs +1 -0
  43. package/dist/chunk-LBMEEJWA.js +1 -0
  44. package/dist/chunk-MC3LXMCQ.js +1 -0
  45. package/dist/chunk-MMSYCIJ2.cjs +1 -1
  46. package/dist/chunk-NU3N4WHD.cjs +1 -0
  47. package/dist/chunk-ODZQXH7E.cjs +1 -0
  48. package/dist/chunk-ONZFBJVW.js +1 -0
  49. package/dist/chunk-PXDRHFIE.js +1 -0
  50. package/dist/chunk-Q6NHYWVX.js +1 -0
  51. package/dist/chunk-QNKGP5DY.js +1 -0
  52. package/dist/chunk-S6Z6I2EG.cjs +1 -0
  53. package/dist/chunk-SMADKXZE.js +1 -0
  54. package/dist/chunk-TSLYDPBJ.js +1 -0
  55. package/dist/chunk-TVXADXCC.cjs +1 -0
  56. package/dist/chunk-UDA26MCU.cjs +1 -0
  57. package/dist/chunk-UET567YM.cjs +1 -0
  58. package/dist/chunk-VEYMQ3UA.js +1 -0
  59. package/dist/chunk-W2W3L2M5.js +1 -0
  60. package/dist/chunk-WBWTXKMC.cjs +1 -0
  61. package/dist/chunk-WVSPXFTY.js +1 -0
  62. package/dist/chunk-XC2PYCT4.cjs +1 -0
  63. package/dist/chunk-XIXA5KDF.cjs +1 -0
  64. package/dist/chunk-Y4O5KZF6.cjs +1 -0
  65. package/dist/chunk-YRM7IJLX.js +1 -0
  66. package/dist/chunk-YT3MSZKK.cjs +1 -0
  67. package/dist/chunk-YXHCULSO.cjs +1 -0
  68. package/dist/chunk-YZR5OGJA.cjs +1 -0
  69. package/dist/chunk-Z4DXK7A6.cjs +1 -0
  70. package/dist/chunk-ZXIWDFEQ.js +1 -0
  71. package/dist/conversions/index.cjs +1 -1
  72. package/dist/conversions/index.d.ts +1347 -1297
  73. package/dist/conversions/index.js +1 -1
  74. package/dist/env/index.cjs +1 -1
  75. package/dist/env/index.d.ts +14 -14
  76. package/dist/env/index.js +1 -1
  77. package/dist/events/index.cjs +1 -1
  78. package/dist/events/index.d.ts +109 -109
  79. package/dist/events/index.js +1 -1
  80. package/dist/extends-Bk_SBGdT.d.ts +330 -330
  81. package/dist/formatting/index.cjs +1 -1
  82. package/dist/formatting/index.d.ts +855 -855
  83. package/dist/formatting/index.js +1 -1
  84. package/dist/generator/index.cjs +1 -1
  85. package/dist/generator/index.d.ts +155 -155
  86. package/dist/generator/index.js +1 -1
  87. package/dist/if-CvT4R7Kh.d.ts +16 -16
  88. package/dist/is-array-Cymwrsmm.d.ts +1119 -0
  89. package/dist/isPlainObject-BVhBAPHX.d.ts +154 -154
  90. package/dist/never-BfayMBF9.d.ts +64 -64
  91. package/dist/next/index.cjs +1 -8
  92. package/dist/next/index.d.ts +183 -183
  93. package/dist/next/index.js +1 -8
  94. package/dist/next/server/index.cjs +1 -2
  95. package/dist/next/server/index.d.ts +25 -25
  96. package/dist/next/server/index.js +1 -2
  97. package/dist/nils-DMz3kU7M.d.ts +155 -155
  98. package/dist/omit-VvmIsZmX.d.ts +25 -25
  99. package/dist/operations/index.cjs +1 -1
  100. package/dist/operations/index.d.ts +120 -120
  101. package/dist/operations/index.js +1 -1
  102. package/dist/or-DyZCRvaU.d.ts +89 -0
  103. package/dist/parsers/index.cjs +1 -1
  104. package/dist/parsers/index.d.ts +34 -34
  105. package/dist/parsers/index.js +1 -1
  106. package/dist/predicates/index.cjs +1 -1
  107. package/dist/predicates/index.d.ts +1774 -1680
  108. package/dist/predicates/index.js +1 -1
  109. package/dist/prettify-C4xLcYOP.d.ts +328 -328
  110. package/dist/promise/index.cjs +1 -1
  111. package/dist/promise/index.d.ts +29 -29
  112. package/dist/promise/index.js +1 -1
  113. package/dist/rzl-utils.global.js +1 -4
  114. package/dist/string-XA-til3C.d.ts +318 -318
  115. package/dist/strings/index.cjs +1 -1
  116. package/dist/strings/index.d.ts +690 -690
  117. package/dist/strings/index.js +1 -1
  118. package/dist/tailwind/index.cjs +1 -0
  119. package/dist/tailwind/index.d.ts +565 -0
  120. package/dist/tailwind/index.js +1 -0
  121. package/dist/type-data-DDs-u2kq.d.ts +241 -241
  122. package/dist/types/index.d.ts +3266 -3266
  123. package/dist/urls/index.cjs +1 -1
  124. package/dist/urls/index.d.ts +373 -373
  125. package/dist/urls/index.js +1 -1
  126. package/package.json +24 -23
  127. package/dist/chunk-25G6B35W.js +0 -1
  128. package/dist/chunk-2AUUPGMN.js +0 -1
  129. package/dist/chunk-2JQQQ625.js +0 -1
  130. package/dist/chunk-445TAVT4.cjs +0 -1
  131. package/dist/chunk-467VEMJH.js +0 -1
  132. package/dist/chunk-56QBKKRE.js +0 -1
  133. package/dist/chunk-5SZUSNGZ.js +0 -1
  134. package/dist/chunk-6Q4I2RPC.cjs +0 -1
  135. package/dist/chunk-6SMJMZ7G.cjs +0 -1
  136. package/dist/chunk-7YWAQOA4.cjs +0 -1
  137. package/dist/chunk-BLCANGFS.js +0 -1
  138. package/dist/chunk-CK3BZGEU.js +0 -1
  139. package/dist/chunk-D43GV6EF.cjs +0 -1
  140. package/dist/chunk-DFSTVQFI.cjs +0 -1
  141. package/dist/chunk-DYRDBYPF.cjs +0 -1
  142. package/dist/chunk-ELDDNERR.js +0 -1
  143. package/dist/chunk-EXXLUO7L.cjs +0 -1
  144. package/dist/chunk-FIEZKTAZ.cjs +0 -1
  145. package/dist/chunk-G72VSVGO.js +0 -1
  146. package/dist/chunk-GAJTFCUA.js +0 -1
  147. package/dist/chunk-GOJNH55O.cjs +0 -1
  148. package/dist/chunk-HXST7RJB.js +0 -1
  149. package/dist/chunk-HXTACM3O.cjs +0 -1
  150. package/dist/chunk-IJTZWWRJ.cjs +0 -1
  151. package/dist/chunk-ISJ33O2J.cjs +0 -1
  152. package/dist/chunk-JISH2VGG.js +0 -1
  153. package/dist/chunk-JQZUWBIX.js +0 -1
  154. package/dist/chunk-K4PLGD7C.js +0 -1
  155. package/dist/chunk-KZQB7H4E.cjs +0 -1
  156. package/dist/chunk-LUVV5KSD.cjs +0 -2
  157. package/dist/chunk-LVUSFXQS.cjs +0 -1
  158. package/dist/chunk-ME5OV5HN.js +0 -1
  159. package/dist/chunk-MF5Y5K4N.cjs +0 -1
  160. package/dist/chunk-MJAW5RAK.js +0 -1
  161. package/dist/chunk-MWLEM7ED.js +0 -1
  162. package/dist/chunk-NNM7QCNB.js +0 -1
  163. package/dist/chunk-NSVLG7NY.js +0 -4
  164. package/dist/chunk-NUHOOAUN.cjs +0 -1
  165. package/dist/chunk-NUVGETPD.js +0 -2
  166. package/dist/chunk-O5VXBNUQ.cjs +0 -4
  167. package/dist/chunk-O7SJR4CY.cjs +0 -1
  168. package/dist/chunk-OX6RLS2F.cjs +0 -1
  169. package/dist/chunk-PFLNHD4B.cjs +0 -1
  170. package/dist/chunk-PSWITZK5.js +0 -1
  171. package/dist/chunk-PUQXRLZH.cjs +0 -1
  172. package/dist/chunk-PYUVKHUF.cjs +0 -1
  173. package/dist/chunk-REFMEB4A.js +0 -1
  174. package/dist/chunk-RHE3M2NJ.cjs +0 -1
  175. package/dist/chunk-RHIBYOFQ.js +0 -1
  176. package/dist/chunk-RV2VULM7.cjs +0 -1
  177. package/dist/chunk-S7GMG4TB.js +0 -1
  178. package/dist/chunk-SW6HYEW7.cjs +0 -1
  179. package/dist/chunk-SYJC7UAW.js +0 -1
  180. package/dist/chunk-TQMZ2LPI.js +0 -1
  181. package/dist/chunk-U4TZO7WV.js +0 -1
  182. package/dist/chunk-UUMKL74S.js +0 -1
  183. package/dist/chunk-VQLAPEL3.js +0 -1
  184. package/dist/chunk-VTR75UID.cjs +0 -1
  185. package/dist/chunk-XFCJDSB2.cjs +0 -1
  186. package/dist/chunk-XOYX4PLZ.cjs +0 -1
  187. package/dist/chunk-Z6FLCEN6.js +0 -1
  188. package/dist/chunk-ZO5364A6.cjs +0 -1
  189. package/dist/index.cjs +0 -1
  190. package/dist/index.d.ts +0 -1
  191. package/dist/index.js +0 -1
  192. package/dist/is-array--YjXV-Wx.d.ts +0 -1207
  193. package/dist/stylings/index.cjs +0 -1
  194. package/dist/stylings/index.d.ts +0 -41
  195. package/dist/stylings/index.js +0 -1
@@ -1,177 +1,177 @@
1
1
  /** --------------------------------------------------
2
- * * ***Nullish.***
3
- * --------------------------------------------------
4
- * Represents all values considered **"nullish"**:
5
- * - `null`
6
- * - `undefined`
7
- *
8
- * Useful as a shorthand when working with optional or missing values.
9
- */
2
+ * * ***Nullish.***
3
+ * --------------------------------------------------
4
+ * Represents all values considered **"nullish"**:
5
+ * - `null`
6
+ * - `undefined`
7
+ *
8
+ * Useful as a shorthand when working with optional or missing values.
9
+ */
10
10
  type Nullish=null|undefined;
11
11
  /** --------------------------------------------------
12
- * * ***Nullable.***
13
- * --------------------------------------------------
14
- * Represents a type that can be either `T` or `null`.
15
- *
16
- * @template T - The base type.
17
- *
18
- * @example
19
- * ```ts
20
- * type A = Nullable<string>; // ➔ string | null
21
- * ```
22
- */
12
+ * * ***Nullable.***
13
+ * --------------------------------------------------
14
+ * Represents a type that can be either `T` or `null`.
15
+ *
16
+ * @template T - The base type.
17
+ *
18
+ * @example
19
+ * ```ts
20
+ * type A = Nullable<string>; // ➔ string | null
21
+ * ```
22
+ */
23
23
  type Nullable<T>=T|null;
24
24
  /** --------------------------------------------------
25
- * * ***Nilable.***
26
- * --------------------------------------------------
27
- * Represents a type that can be either `T`, `null`, or `undefined`.
28
- *
29
- * @template T - The base type.
30
- *
31
- * @example
32
- * ```ts
33
- * type A = Nilable<number>; // ➔ number | null | undefined
34
- * ```
35
- */
25
+ * * ***Nilable.***
26
+ * --------------------------------------------------
27
+ * Represents a type that can be either `T`, `null`, or `undefined`.
28
+ *
29
+ * @template T - The base type.
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * type A = Nilable<number>; // ➔ number | null | undefined
34
+ * ```
35
+ */
36
36
  type Nilable<T>=T|null|undefined;
37
37
  /** --------------------------------------------------
38
- * * ***Undefinedable.***
39
- * --------------------------------------------------
40
- * Represents a type that can be either `T` or `undefined`.
41
- *
42
- * @template T - The base type.
43
- *
44
- * @example
45
- * ```ts
46
- * type A = Undefinedable<boolean>; // ➔ boolean | undefined
47
- * ```
48
- */
38
+ * * ***Undefinedable.***
39
+ * --------------------------------------------------
40
+ * Represents a type that can be either `T` or `undefined`.
41
+ *
42
+ * @template T - The base type.
43
+ *
44
+ * @example
45
+ * ```ts
46
+ * type A = Undefinedable<boolean>; // ➔ boolean | undefined
47
+ * ```
48
+ */
49
49
  type Undefinedable<T>=T|undefined;
50
50
  /** -------------------------------------------------------
51
- * * ***NonNil.***
52
- * -------------------------------------------------------
53
- * Removes both `null` and `undefined` from the given type `T`.
54
- *
55
- * @template T - The type to filter.
56
- *
57
- * @example
58
- * ```ts
59
- * type A = NonNil<string | null | undefined>;
60
- * // ➔ string
61
- *
62
- * type B = NonNil<number | null>;
63
- * // ➔ number
64
- *
65
- * type C = NonNil<undefined | null>;
66
- * // ➔ never
67
- *
68
- * type D = NonNil<boolean | undefined>;
69
- * // ➔ boolean
70
- * ```
71
- */
51
+ * * ***NonNil.***
52
+ * -------------------------------------------------------
53
+ * Removes both `null` and `undefined` from the given type `T`.
54
+ *
55
+ * @template T - The type to filter.
56
+ *
57
+ * @example
58
+ * ```ts
59
+ * type A = NonNil<string | null | undefined>;
60
+ * // ➔ string
61
+ *
62
+ * type B = NonNil<number | null>;
63
+ * // ➔ number
64
+ *
65
+ * type C = NonNil<undefined | null>;
66
+ * // ➔ never
67
+ *
68
+ * type D = NonNil<boolean | undefined>;
69
+ * // ➔ boolean
70
+ * ```
71
+ */
72
72
  type NonNil<T>=T extends null|undefined?never:T;
73
73
  /** -------------------------------------------------------
74
- * * ***NonNull.***
75
- * -------------------------------------------------------
76
- * Removes `null` from the given type `T`.
77
- *
78
- * @template T - The type to filter.
79
- *
80
- * @example
81
- * ```ts
82
- * type A = NonNull<string | null>;
83
- * // ➔ string
84
- *
85
- * type B = NonNull<number | null | undefined>;
86
- * // ➔ number | undefined
87
- *
88
- * type C = NonNull<null>;
89
- * // ➔ never
90
- * ```
91
- */
74
+ * * ***NonNull.***
75
+ * -------------------------------------------------------
76
+ * Removes `null` from the given type `T`.
77
+ *
78
+ * @template T - The type to filter.
79
+ *
80
+ * @example
81
+ * ```ts
82
+ * type A = NonNull<string | null>;
83
+ * // ➔ string
84
+ *
85
+ * type B = NonNull<number | null | undefined>;
86
+ * // ➔ number | undefined
87
+ *
88
+ * type C = NonNull<null>;
89
+ * // ➔ never
90
+ * ```
91
+ */
92
92
  type NonNull<T>=T extends null?never:T;
93
93
  /** -------------------------------------------------------
94
- * * ***NonUndefined.***
95
- * -------------------------------------------------------
96
- * Remove `undefined` from the given type `T`.
97
- *
98
- * @template T - The type to filter.
99
- *
100
- * @example
101
- * ```ts
102
- * type A = NonUndefined<string | undefined>;
103
- * // ➔ string
104
- *
105
- * type B = NonUndefined<number | null | undefined>;
106
- * // ➔ number | null
107
- *
108
- * type C = NonUndefined<undefined>;
109
- * // ➔ never
110
- * ```
111
- */
94
+ * * ***NonUndefined.***
95
+ * -------------------------------------------------------
96
+ * Remove `undefined` from the given type `T`.
97
+ *
98
+ * @template T - The type to filter.
99
+ *
100
+ * @example
101
+ * ```ts
102
+ * type A = NonUndefined<string | undefined>;
103
+ * // ➔ string
104
+ *
105
+ * type B = NonUndefined<number | null | undefined>;
106
+ * // ➔ number | null
107
+ *
108
+ * type C = NonUndefined<undefined>;
109
+ * // ➔ never
110
+ * ```
111
+ */
112
112
  type NonUndefined<T>=T extends undefined?never:T;
113
113
  /** --------------------------------------------------
114
- * * ***KeepNil.***
115
- * --------------------------------------------------
116
- *
117
- * Keeps `null` and/or `undefined` in the output type
118
- * **only if** they exist in the input type `T`.
119
- * Otherwise, resolves to `never`.
120
- *
121
- * @template T - Input type to check for `null` and `undefined`.
122
- *
123
- * @example
124
- * ```ts
125
- * type A = KeepNil<string | null>; // ➔ null
126
- * type B = KeepNil<number | undefined>; // ➔ undefined
127
- * type C = KeepNil<string | null | undefined>; // ➔ null | undefined
128
- * type D = KeepNil<boolean>; // ➔ never
129
- * ```
130
- */
114
+ * * ***KeepNil.***
115
+ * --------------------------------------------------
116
+ *
117
+ * Keeps `null` and/or `undefined` in the output type
118
+ * **only if** they exist in the input type `T`.
119
+ * Otherwise, resolves to `never`.
120
+ *
121
+ * @template T - Input type to check for `null` and `undefined`.
122
+ *
123
+ * @example
124
+ * ```ts
125
+ * type A = KeepNil<string | null>; // ➔ null
126
+ * type B = KeepNil<number | undefined>; // ➔ undefined
127
+ * type C = KeepNil<string | null | undefined>; // ➔ null | undefined
128
+ * type D = KeepNil<boolean>; // ➔ never
129
+ * ```
130
+ */
131
131
  type KeepNil<T>=(null extends T?null:never)|(undefined extends T?undefined:never);
132
132
  /** --------------------------------------------------
133
- * * ***KeepNull.***
134
- * --------------------------------------------------
135
- * Keeps `null` in the output type **only if** the input type `T` includes `null`.
136
- * Otherwise resolves to `never`.
137
- *
138
- * @template T - Input type to check for `null`.
139
- *
140
- * @example
141
- * ```ts
142
- * type A = KeepNull<string | null>; // ➔ null
143
- * type B = KeepNull<string>; // ➔ never
144
- * ```
145
- */
133
+ * * ***KeepNull.***
134
+ * --------------------------------------------------
135
+ * Keeps `null` in the output type **only if** the input type `T` includes `null`.
136
+ * Otherwise resolves to `never`.
137
+ *
138
+ * @template T - Input type to check for `null`.
139
+ *
140
+ * @example
141
+ * ```ts
142
+ * type A = KeepNull<string | null>; // ➔ null
143
+ * type B = KeepNull<string>; // ➔ never
144
+ * ```
145
+ */
146
146
  type KeepNull<T>=null extends T?null:never;
147
147
  /** --------------------------------------------------
148
- * * ***KeepUndef.***
149
- * --------------------------------------------------
150
- * Keeps `undefined` in the output type **only if** the input type `T` includes `undefined`.
151
- * Otherwise resolves to `never`.
152
- *
153
- * @template T - Input type to check for `undefined`.
154
- *
155
- * @example
156
- * ```ts
157
- * type A = KeepUndef<number | undefined>; // ➔ undefined
158
- * type B = KeepUndef<number>; // ➔ never
159
- * ```
160
- */
148
+ * * ***KeepUndef.***
149
+ * --------------------------------------------------
150
+ * Keeps `undefined` in the output type **only if** the input type `T` includes `undefined`.
151
+ * Otherwise resolves to `never`.
152
+ *
153
+ * @template T - Input type to check for `undefined`.
154
+ *
155
+ * @example
156
+ * ```ts
157
+ * type A = KeepUndef<number | undefined>; // ➔ undefined
158
+ * type B = KeepUndef<number>; // ➔ never
159
+ * ```
160
+ */
161
161
  type KeepUndef<T>=undefined extends T?undefined:never;
162
162
  /** -------------------------------------------------------
163
- * * ***NullToUndefined.***
164
- * -------------------------------------------------------
165
- * Transforms `null` or `undefined` types into `undefined`, otherwise, returns the original type `T` unchanged.
166
- *
167
- * @template T - The input type to transform.
168
- * @example
169
- * ```ts
170
- * type A = NullToUndefined<null>; // ➔ undefined
171
- * type B = NullToUndefined<undefined>; // ➔ undefined
172
- * type C = NullToUndefined<string>; // ➔ string
173
- * type D = NullToUndefined<null[]>; // ➔ null[]
174
- * type E = NullToUndefined<(string | null)[]>; // ➔ (string | null)[]
175
- * ```
176
- */
163
+ * * ***NullToUndefined.***
164
+ * -------------------------------------------------------
165
+ * Transforms `null` or `undefined` types into `undefined`, otherwise, returns the original type `T` unchanged.
166
+ *
167
+ * @template T - The input type to transform.
168
+ * @example
169
+ * ```ts
170
+ * type A = NullToUndefined<null>; // ➔ undefined
171
+ * type B = NullToUndefined<undefined>; // ➔ undefined
172
+ * type C = NullToUndefined<string>; // ➔ string
173
+ * type D = NullToUndefined<null[]>; // ➔ null[]
174
+ * type E = NullToUndefined<(string | null)[]>; // ➔ (string | null)[]
175
+ * ```
176
+ */
177
177
  type NullToUndefined<T>=T extends null?undefined:T extends undefined?undefined:T;export type{KeepNil as K,NonUndefined as N,Undefinedable as U,KeepNull as a,KeepUndef as b,Nilable as c,NonNil as d,NonNull as e,Nullable as f,NullToUndefined as g,Nullish as h};
@@ -1,28 +1,28 @@
1
1
  import{P as Prettify}from'./prettify-C4xLcYOP.js';
2
2
  /** --------------------------------------------------
3
- * * ***OmitStrict.***
4
- * --------------------------------------------------
5
- * Strictly omits keys `K` from type `T`, with optional flattening for readability using `Prettify`.
6
- *
7
- * ✅ Enhances autocomplete and type inspection clarity in editors.
8
- * ✅ Optionally flattens nested intersections or mapped types into a cleaner shape.
9
- *
10
- * @template T - The original object type.
11
- * @template K - The keys to omit from `T`.
12
- * @template WithPrettify - Whether to prettify the result (default is `true`).
13
- * @template WithPrettifyRecursive - Whether to prettify nested object properties recursively (default is `true`).
14
- *
15
- * @example
16
- * ```ts
17
- * type A = { a: number; b: string; c: boolean };
18
- * type B = OmitStrict<A, 'b'>;
19
- * // ➔ { a: number; c: boolean }
20
- *
21
- * type C = OmitStrict<A, 'b', false>;
22
- * // ➔ Omit without prettifying, keeps intersection structure
23
- *
24
- * type D = OmitStrict<A, 'b', true, false>;
25
- * // ➔ Prettifies only top level, does not recurse into nested objects
26
- * ```
27
- */
3
+ * * ***OmitStrict.***
4
+ * --------------------------------------------------
5
+ * Strictly omits keys `K` from type `T`, with optional flattening for readability using `Prettify`.
6
+ *
7
+ * ✅ Enhances autocomplete and type inspection clarity in editors.
8
+ * ✅ Optionally flattens nested intersections or mapped types into a cleaner shape.
9
+ *
10
+ * @template T - The original object type.
11
+ * @template K - The keys to omit from `T`.
12
+ * @template WithPrettify - Whether to prettify the result (default is `true`).
13
+ * @template WithPrettifyRecursive - Whether to prettify nested object properties recursively (default is `true`).
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * type A = { a: number; b: string; c: boolean };
18
+ * type B = OmitStrict<A, 'b'>;
19
+ * // ➔ { a: number; c: boolean }
20
+ *
21
+ * type C = OmitStrict<A, 'b', false>;
22
+ * // ➔ Omit without prettifying, keeps intersection structure
23
+ *
24
+ * type D = OmitStrict<A, 'b', true, false>;
25
+ * // ➔ Prettifies only top level, does not recurse into nested objects
26
+ * ```
27
+ */
28
28
  type OmitStrict<T,K extends keyof T,WithPrettify extends boolean=true,WithPrettifyRecursive extends boolean=true>=WithPrettify extends true?Prettify<Omit<T,K>,{recursive:WithPrettifyRecursive;}>:WithPrettify extends false?Omit<T,K>:never;export type{OmitStrict as O};
@@ -1 +1 @@
1
- 'use strict';var chunkPYUVKHUF_cjs=require('../chunk-PYUVKHUF.cjs');require('../chunk-IJTZWWRJ.cjs'),require('../chunk-PFLNHD4B.cjs'),require('../chunk-ISJ33O2J.cjs'),require('../chunk-RV2VULM7.cjs'),require('../chunk-O7SJR4CY.cjs'),require('../chunk-7YWAQOA4.cjs'),require('../chunk-LVUSFXQS.cjs');Object.defineProperty(exports,"findDuplicates",{enumerable:true,get:function(){return chunkPYUVKHUF_cjs.a}});Object.defineProperty(exports,"omitKeys",{enumerable:true,get:function(){return chunkPYUVKHUF_cjs.b}});Object.defineProperty(exports,"omitKeysDeep",{enumerable:true,get:function(){return chunkPYUVKHUF_cjs.c}});
1
+ "use strict";var e=require("../chunk-C6JFHUR2.cjs");require("../chunk-NU3N4WHD.cjs"),require("../chunk-Z4DXK7A6.cjs"),require("../chunk-YT3MSZKK.cjs"),require("../chunk-5C2SMIGX.cjs"),require("../chunk-E63WVPZE.cjs"),require("../chunk-UDA26MCU.cjs"),require("../chunk-INUFZJLX.cjs"),Object.defineProperty(exports,"findDuplicates",{enumerable:!0,get:function(){return e.findDuplicates}}),Object.defineProperty(exports,"omitKeys",{enumerable:!0,get:function(){return e.omitKeys}}),Object.defineProperty(exports,"omitKeysDeep",{enumerable:!0,get:function(){return e.omitKeysDeep}});
@@ -1,127 +1,127 @@
1
1
  import{N as NumberRangeUnion}from'../NumberRangeUnion-DC-C3_Kq.js';
2
2
  /** ----------------------------------------------------------------------
3
- * * ***Utility: `findDuplicates`.***
4
- * ----------------------------------------------------------------------
5
- * **Finds duplicate values in an array by deep equality comparison.**
6
- * - **Behavior:**
7
- * - Uses ***{@link isEqual | `isEqual`}*** to compare elements
8
- * (handles objects, arrays, dates, NaN, etc.).
9
- * - Returns a new array containing only the *first occurrences* of duplicated values.
10
- * - Does **not mutate** the original array.
11
- * - Throws ***{@link TypeError | `TypeError`}*** if input is not an array.
12
- * @template T Type of elements in the input array.
13
- * @param {T[]} values - The array to check for duplicates.
14
- * @returns {T[]} An array of the duplicate values found in the input,
15
- * preserving order of their first duplicate appearance.
16
- * @throws {TypeError} If the provided `values` argument is not an array.
17
- * @example
18
- * findDuplicates([1, 2, 2, 3, 4, 4]);
19
- * // ➔ [2, 4]
20
- * findDuplicates(["apple", "banana", "apple", "orange"]);
21
- * // ➔ ["apple"]
22
- * findDuplicates([{ a: 1 }, { a: 1 }, { a: 2 }]);
23
- * // ➔ [{ a: 1 }]
24
- * findDuplicates([NaN, NaN, 1]);
25
- * // ➔ [NaN]
26
- * findDuplicates([true, false, true]);
27
- * // ➔ [true]
28
- * findDuplicates([1, 2, 3]);
29
- * // ➔ []
30
- */
3
+ * * ***Utility: `findDuplicates`.***
4
+ * ----------------------------------------------------------------------
5
+ * **Finds duplicate values in an array by deep equality comparison.**
6
+ * - **Behavior:**
7
+ * - Uses ***{@link isEqual | `isEqual`}*** to compare elements
8
+ * (handles objects, arrays, dates, NaN, etc.).
9
+ * - Returns a new array containing only the *first occurrences* of duplicated values.
10
+ * - Does **not mutate** the original array.
11
+ * - Throws ***{@link TypeError | `TypeError`}*** if input is not an array.
12
+ * @template T Type of elements in the input array.
13
+ * @param {T[]} values - The array to check for duplicates.
14
+ * @returns {T[]} An array of the duplicate values found in the input,
15
+ * preserving order of their first duplicate appearance.
16
+ * @throws {TypeError} If the provided `values` argument is not an array.
17
+ * @example
18
+ * findDuplicates([1, 2, 2, 3, 4, 4]);
19
+ * // ➔ [2, 4]
20
+ * findDuplicates(["apple", "banana", "apple", "orange"]);
21
+ * // ➔ ["apple"]
22
+ * findDuplicates([{ a: 1 }, { a: 1 }, { a: 2 }]);
23
+ * // ➔ [{ a: 1 }]
24
+ * findDuplicates([NaN, NaN, 1]);
25
+ * // ➔ [NaN]
26
+ * findDuplicates([true, false, true]);
27
+ * // ➔ [true]
28
+ * findDuplicates([1, 2, 3]);
29
+ * // ➔ []
30
+ */
31
31
  declare const findDuplicates:<T>(values:T[])=>T[];
32
32
  /** --------------------------------
33
- * * ***Utility: `omitKeys`.***
34
- * --------------------------------
35
- * **This function creates a shallow copy of the given object omitting the
36
- * specified keys.**
37
- * - **Behavior:**
38
- * - It will return a new object without mutating the original.
39
- * - It also validates that ***`keysToOmit`*** does not contain duplicate keys.
40
- * - **ℹ️ Internally:**
41
- * - It uses ***{@link isEqual | `isEqual`}*** to check for duplicates in
42
- * the ***`keysToOmit`*** array.
43
- * @template I The type of the input object.
44
- * @template K The keys to omit from the object.
45
- * @param {I} object - The source object to omit keys from.
46
- * @param {K[]} keysToOmit - An array of keys to exclude from the returned object.
47
- * @returns {Omit<I, K>} A new object without the specified keys.
48
- * @throws {TypeError} If `keysToOmit` is not an array.
49
- * @throws {Error} If duplicate keys are found in `keysToOmit`.
50
- * @example
51
- * omitKeys({ a: 1, b: 2, c: 3 }, ["b", "c"]);
52
- * //➔ { a: 1 }
53
- * omitKeys({ name: "John", age: 30 }, ["age"]);
54
- * //➔ { name: "John" }
55
- * omitKeys({ a: 1, b: 2 }, []);
56
- * //➔ { a: 1, b: 2 } (no changes)
57
- */
33
+ * * ***Utility: `omitKeys`.***
34
+ * --------------------------------
35
+ * **This function creates a shallow copy of the given object omitting the
36
+ * specified keys.**
37
+ * - **Behavior:**
38
+ * - It will return a new object without mutating the original.
39
+ * - It also validates that ***`keysToOmit`*** does not contain duplicate keys.
40
+ * - **ℹ️ Internally:**
41
+ * - It uses ***{@link isEqual | `isEqual`}*** to check for duplicates in
42
+ * the ***`keysToOmit`*** array.
43
+ * @template I The type of the input object.
44
+ * @template K The keys to omit from the object.
45
+ * @param {I} object - The source object to omit keys from.
46
+ * @param {K[]} keysToOmit - An array of keys to exclude from the returned object.
47
+ * @returns {Omit<I, K>} A new object without the specified keys.
48
+ * @throws {TypeError} If `keysToOmit` is not an array.
49
+ * @throws {Error} If duplicate keys are found in `keysToOmit`.
50
+ * @example
51
+ * omitKeys({ a: 1, b: 2, c: 3 }, ["b", "c"]);
52
+ * //➔ { a: 1 }
53
+ * omitKeys({ name: "John", age: 30 }, ["age"]);
54
+ * //➔ { name: "John" }
55
+ * omitKeys({ a: 1, b: 2 }, []);
56
+ * //➔ { a: 1, b: 2 } (no changes)
57
+ */
58
58
  declare const omitKeys:<I extends Record<string,unknown>,K extends keyof I>(object:I,keysToOmit:K[])=>Omit<I,K>;type IndexArray=NumberRangeUnion<0,30>;type DotPath<T,Prev extends string="">=T extends Array<infer U>?DotPath<U,`${Prev}${Prev extends "" ? "" : "."}${IndexArray}`>:T extends object?{[K in keyof T & string]:`${Prev}${Prev extends "" ? "" : "."}${K}`|DotPath<T[K],`${Prev}${Prev extends "" ? "" : "."}${K}`>;}[keyof T & string]:never;
59
59
  /** ------------------------------------------------------
60
- * * ***Utility: `omitKeysDeep`.***
61
- * ------------------------------------------------------
62
- * **Recursively omits properties from an object using dot notation paths.**
63
- * - **Behavior:**
64
- * - Also removes resulting empty objects (`{}`) and arrays (`[]`),
65
- * - cascading upwards to remove empty parents until root if needed.
66
- * - **⚠️ Be careful:**
67
- * - If after omission an object or array becomes empty, it will be removed entirely
68
- * including all the way up to the root if necessary, resulting in `{}`.
69
- * - **ℹ️ Note:**
70
- * - For array indices, TypeScript autocomplete only suggests `0`–`30`
71
- * (to prevent editor lag on large unions).
72
- * However, higher indices are still fully supported at runtime — you can
73
- * manually type `"arr.99.key"` and it will work the same.
74
- * @template I - Type of the input object
75
- * @param {I} object
76
- * The object to process. Should be a plain nested object or array structure.
77
- * @param {DotPath<I>[]} keysToOmit
78
- * An array of string paths in dot notation indicating the properties to remove, paths
79
- * can include numeric indices to target array elements, e.g. `"arr.0.x"` to
80
- * remove `x` from the first object inside the `arr` array.
81
- * @returns {Partial<I>}
82
- * A new deeply cloned object with the specified keys omitted, with resulting
83
- * empty objects or arrays fully removed (even if it collapses to `{}`).
84
- * @throws {TypeError}
85
- * If `keysToOmit` is not an array will throw TypeError.
86
- * @throws {Error} If `keysToOmit` contains duplicate paths will throw Error.
87
- * @example
88
- * omitKeysDeep({ arr: [{ a: 1 }] }, ["arr.0.a"]);
89
- * // ➔ {} (array becomes empty and removed)
90
- * omitKeysDeep({ a: { b: { c: 1 }, d: 2 }, e: 3 }, ["a.b.c"]);
91
- * // ➔ { a: { d: 2 }, e: 3 }
92
- * omitKeysDeep({ a: [{ b: 1 }, { c: 2 }] }, ["a.0.b"]);
93
- * // ➔ { a: [{ c: 2 }] }
94
- * omitKeysDeep({ a: [{ b: 1 }] }, ["a.0.b"]);
95
- * // ➔ {} (array becomes empty and removed)
96
- * omitKeysDeep({ complex: [{ deep: [{ x: 1, y: 2 }] }] }, ["complex.0.deep.0.x"]);
97
- * // ➔ { complex: [{ deep: [{ y: 2 }] }] }
98
- * omitKeysDeep({ complex: [{ deep: [{ x: 1 }] }] }, ["complex.0.deep.0.x"]);
99
- * // ➔ {} (deep chain emptied and collapsed)
100
- * omitKeysDeep({ data: [[{ foo: 1, bar: 2 }]] }, ["data.0.0.foo"]);
101
- * // ➔ { data: [[{ bar: 2 }]] }
102
- * omitKeysDeep({ data: [[{ foo: 1 }]] }, ["data.0.0.foo"]);
103
- * // ➔ {} (nested arrays emptied completely)
104
- * omitKeysDeep({ x: [{ y: [{ z: 1 }, { w: 2 }] }] }, ["x.0.y.0.z"]);
105
- * // ➔ { x: [{ y: [{ w: 2 }] }] }
106
- * omitKeysDeep({ x: [{ y: [{ z: 1 }] }] }, ["x.0.y.0.z"]);
107
- * // ➔ {} (entire nested arrays removed)
108
- * omitKeysDeep({ p: { q: { r: 5 } }, s: 6 }, ["p.q.r"]);
109
- * // ➔ { s: 6 } (`p` removed because it becomes empty)
110
- * omitKeysDeep({ arr: [{ a: 1, b: 2 }, { c: 3 }] }, ["arr.0.a"]);
111
- * // ➔ { arr: [{ b: 2 }, { c: 3 }] }
112
- * omitKeysDeep({ root: [{ sub: [{ leaf: 10 }] }] }, ["root.0.sub.0.leaf"]);
113
- * // ➔ {} (deep nested arrays emptied to root)
114
- * omitKeysDeep({ meta: { tags: ["x", "y"], count: 2 } }, ["meta.count"]);
115
- * // ➔ { meta: { tags: ["x", "y"] } }
116
- * omitKeysDeep({ arr: [[{ a: 1 }, { b: 2 }]] }, ["arr.0.0.a"]);
117
- * // ➔ { arr: [[{ b: 2 }]] }
118
- * omitKeysDeep({ arr: [[{ a: 1 }]] }, ["arr.0.0.a"]);
119
- * // ➔ {} (double nested emptied)
120
- * omitKeysDeep({ nested: [{ list: [{ id: 1, val: 2 }] }] }, ["nested.0.list.0.val"]);
121
- * // ➔ { nested: [{ list: [{ id: 1 }] }] }
122
- * omitKeysDeep({ nested: [{ list: [{ id: 1 }] }] }, ["nested.0.list.0.id"]);
123
- * // ➔ {} (full collapse to empty)
124
- * omitKeysDeep({ mixed: { a: [1, 2, 3], b: { c: 4 } } }, ["mixed.b.c"]);
125
- * // ➔ { mixed: { a: [1, 2, 3] } }
126
- */
60
+ * * ***Utility: `omitKeysDeep`.***
61
+ * ------------------------------------------------------
62
+ * **Recursively omits properties from an object using dot notation paths.**
63
+ * - **Behavior:**
64
+ * - Also removes resulting empty objects (`{}`) and arrays (`[]`),
65
+ * - cascading upwards to remove empty parents until root if needed.
66
+ * - **⚠️ Be careful:**
67
+ * - If after omission an object or array becomes empty, it will be removed entirely
68
+ * including all the way up to the root if necessary, resulting in `{}`.
69
+ * - **ℹ️ Note:**
70
+ * - For array indices, TypeScript autocomplete only suggests `0`–`30`
71
+ * (to prevent editor lag on large unions).
72
+ * However, higher indices are still fully supported at runtime — you can
73
+ * manually type `"arr.99.key"` and it will work the same.
74
+ * @template I - Type of the input object
75
+ * @param {I} object
76
+ * The object to process. Should be a plain nested object or array structure.
77
+ * @param {DotPath<I>[]} keysToOmit
78
+ * An array of string paths in dot notation indicating the properties to remove, paths
79
+ * can include numeric indices to target array elements, e.g. `"arr.0.x"` to
80
+ * remove `x` from the first object inside the `arr` array.
81
+ * @returns {Partial<I>}
82
+ * A new deeply cloned object with the specified keys omitted, with resulting
83
+ * empty objects or arrays fully removed (even if it collapses to `{}`).
84
+ * @throws {TypeError}
85
+ * If `keysToOmit` is not an array will throw TypeError.
86
+ * @throws {Error} If `keysToOmit` contains duplicate paths will throw Error.
87
+ * @example
88
+ * omitKeysDeep({ arr: [{ a: 1 }] }, ["arr.0.a"]);
89
+ * // ➔ {} (array becomes empty and removed)
90
+ * omitKeysDeep({ a: { b: { c: 1 }, d: 2 }, e: 3 }, ["a.b.c"]);
91
+ * // ➔ { a: { d: 2 }, e: 3 }
92
+ * omitKeysDeep({ a: [{ b: 1 }, { c: 2 }] }, ["a.0.b"]);
93
+ * // ➔ { a: [{ c: 2 }] }
94
+ * omitKeysDeep({ a: [{ b: 1 }] }, ["a.0.b"]);
95
+ * // ➔ {} (array becomes empty and removed)
96
+ * omitKeysDeep({ complex: [{ deep: [{ x: 1, y: 2 }] }] }, ["complex.0.deep.0.x"]);
97
+ * // ➔ { complex: [{ deep: [{ y: 2 }] }] }
98
+ * omitKeysDeep({ complex: [{ deep: [{ x: 1 }] }] }, ["complex.0.deep.0.x"]);
99
+ * // ➔ {} (deep chain emptied and collapsed)
100
+ * omitKeysDeep({ data: [[{ foo: 1, bar: 2 }]] }, ["data.0.0.foo"]);
101
+ * // ➔ { data: [[{ bar: 2 }]] }
102
+ * omitKeysDeep({ data: [[{ foo: 1 }]] }, ["data.0.0.foo"]);
103
+ * // ➔ {} (nested arrays emptied completely)
104
+ * omitKeysDeep({ x: [{ y: [{ z: 1 }, { w: 2 }] }] }, ["x.0.y.0.z"]);
105
+ * // ➔ { x: [{ y: [{ w: 2 }] }] }
106
+ * omitKeysDeep({ x: [{ y: [{ z: 1 }] }] }, ["x.0.y.0.z"]);
107
+ * // ➔ {} (entire nested arrays removed)
108
+ * omitKeysDeep({ p: { q: { r: 5 } }, s: 6 }, ["p.q.r"]);
109
+ * // ➔ { s: 6 } (`p` removed because it becomes empty)
110
+ * omitKeysDeep({ arr: [{ a: 1, b: 2 }, { c: 3 }] }, ["arr.0.a"]);
111
+ * // ➔ { arr: [{ b: 2 }, { c: 3 }] }
112
+ * omitKeysDeep({ root: [{ sub: [{ leaf: 10 }] }] }, ["root.0.sub.0.leaf"]);
113
+ * // ➔ {} (deep nested arrays emptied to root)
114
+ * omitKeysDeep({ meta: { tags: ["x", "y"], count: 2 } }, ["meta.count"]);
115
+ * // ➔ { meta: { tags: ["x", "y"] } }
116
+ * omitKeysDeep({ arr: [[{ a: 1 }, { b: 2 }]] }, ["arr.0.0.a"]);
117
+ * // ➔ { arr: [[{ b: 2 }]] }
118
+ * omitKeysDeep({ arr: [[{ a: 1 }]] }, ["arr.0.0.a"]);
119
+ * // ➔ {} (double nested emptied)
120
+ * omitKeysDeep({ nested: [{ list: [{ id: 1, val: 2 }] }] }, ["nested.0.list.0.val"]);
121
+ * // ➔ { nested: [{ list: [{ id: 1 }] }] }
122
+ * omitKeysDeep({ nested: [{ list: [{ id: 1 }] }] }, ["nested.0.list.0.id"]);
123
+ * // ➔ {} (full collapse to empty)
124
+ * omitKeysDeep({ mixed: { a: [1, 2, 3], b: { c: 4 } } }, ["mixed.b.c"]);
125
+ * // ➔ { mixed: { a: [1, 2, 3] } }
126
+ */
127
127
  declare const omitKeysDeep:<I extends Record<string,unknown>>(object:I,keysToOmit:DotPath<I>[])=>Partial<I>;export{findDuplicates,omitKeys,omitKeysDeep};
@@ -1 +1 @@
1
- export{a as findDuplicates,b as omitKeys,c as omitKeysDeep}from'../chunk-UUMKL74S.js';import'../chunk-MWLEM7ED.js';import'../chunk-ME5OV5HN.js';import'../chunk-2JQQQ625.js';import'../chunk-SYJC7UAW.js';import'../chunk-467VEMJH.js';import'../chunk-5SZUSNGZ.js';import'../chunk-MJAW5RAK.js';
1
+ export{findDuplicates,omitKeys,omitKeysDeep}from"../chunk-SMADKXZE.js";import"../chunk-LBMEEJWA.js";import"../chunk-BSVZRN7C.js";import"../chunk-ZXIWDFEQ.js";import"../chunk-FIAAX3UE.js";import"../chunk-AJ65QFV2.js";import"../chunk-QNKGP5DY.js";import"../chunk-2UIRWYE3.js";