@rzl-zone/utils-js 3.0.2-beta.2 → 3.1.1-beta.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 (164) hide show
  1. package/dist/NumberRangeUnion-DC-C3_Kq.d.ts +23 -23
  2. package/dist/any-BmdI8UbK.d.ts +56 -56
  3. package/dist/arrays-normalize-recursive-CnjYJ9xg.d.ts +66 -66
  4. package/dist/assertions/index.cjs +1 -1
  5. package/dist/assertions/index.d.ts +398 -418
  6. package/dist/assertions/index.js +1 -1
  7. package/dist/chunk-26W3VZIK.cjs +1 -0
  8. package/dist/chunk-2KRCHXFG.cjs +2 -0
  9. package/dist/chunk-33ZLH266.js +1 -0
  10. package/dist/{chunk-EXZ47NOW.js → chunk-4L4EJTNZ.js} +1 -1
  11. package/dist/chunk-5Q37AP7P.js +1 -0
  12. package/dist/chunk-7CHFAMS2.js +1 -0
  13. package/dist/chunk-7MMJZ6HS.js +1 -0
  14. package/dist/chunk-7TC6DE3J.cjs +1 -0
  15. package/dist/{chunk-XH6MCRLP.js → chunk-7VX33E3V.js} +1 -1
  16. package/dist/chunk-BEZPD44N.cjs +1 -0
  17. package/dist/chunk-BI263OHW.js +1 -0
  18. package/dist/chunk-CII6WWLO.cjs +1 -0
  19. package/dist/chunk-D5TYPCWU.cjs +1 -0
  20. package/dist/chunk-EEQY5QUG.js +1 -0
  21. package/dist/chunk-ESJYBIYH.js +1 -0
  22. package/dist/chunk-EWYPSKKM.js +1 -0
  23. package/dist/chunk-EXCOQLWX.cjs +1 -0
  24. package/dist/chunk-FWQVTMYA.cjs +1 -0
  25. package/dist/chunk-G4EWCRKS.js +1 -0
  26. package/dist/chunk-G7R5XZRM.cjs +1 -0
  27. package/dist/chunk-GGEV7LXX.cjs +1 -0
  28. package/dist/chunk-HJOZOENU.cjs +1 -0
  29. package/dist/{chunk-BYZAD3XN.cjs → chunk-IRDZVLNZ.cjs} +1 -1
  30. package/dist/chunk-IW73G523.cjs +1 -0
  31. package/dist/chunk-IY5OZAB3.cjs +1 -0
  32. package/dist/chunk-J4NCYYGS.js +1 -0
  33. package/dist/chunk-J7JAZAJD.js +1 -0
  34. package/dist/{chunk-FF76ISQ2.js → chunk-JYNSO7ZY.js} +1 -1
  35. package/dist/chunk-K3UVKYEU.js +1 -0
  36. package/dist/chunk-LQ76EDZG.js +1 -0
  37. package/dist/chunk-MROH35V3.cjs +1 -0
  38. package/dist/chunk-NJSAV73S.js +1 -0
  39. package/dist/chunk-NR44SNYE.js +1 -0
  40. package/dist/chunk-NXMTWY77.js +1 -0
  41. package/dist/chunk-OZCQZO2V.cjs +4 -0
  42. package/dist/chunk-Q3NTKN5I.cjs +1 -0
  43. package/dist/chunk-QDNSC57Z.js +4 -0
  44. package/dist/chunk-QGXTL5ZH.js +2 -0
  45. package/dist/{chunk-JWHM3WZQ.cjs → chunk-QSQDP7L2.cjs} +1 -1
  46. package/dist/{chunk-RN3TP3S3.js → chunk-S5M33A4O.js} +1 -1
  47. package/dist/chunk-SGTHOQQ2.js +1 -0
  48. package/dist/chunk-SL3RQOWA.js +1 -0
  49. package/dist/chunk-SZPWZZYG.cjs +1 -0
  50. package/dist/chunk-UA4B7JBO.cjs +1 -0
  51. package/dist/chunk-UQDJF5RR.cjs +1 -0
  52. package/dist/chunk-UTQUYABU.cjs +1 -0
  53. package/dist/chunk-VPW3DRV5.js +1 -0
  54. package/dist/chunk-W32WALNU.js +1 -0
  55. package/dist/chunk-XGZ6K753.cjs +1 -0
  56. package/dist/chunk-YFTR64N5.cjs +1 -0
  57. package/dist/chunk-ZFDS7W6B.cjs +1 -0
  58. package/dist/chunk-ZQOLZE6Z.cjs +1 -0
  59. package/dist/conversions/index.cjs +1 -1
  60. package/dist/conversions/index.d.ts +1307 -1504
  61. package/dist/conversions/index.js +1 -1
  62. package/dist/env/index.d.ts +14 -17
  63. package/dist/events/index.cjs +1 -1
  64. package/dist/events/index.d.ts +111 -108
  65. package/dist/events/index.js +1 -1
  66. package/dist/extends-Bk_SBGdT.d.ts +367 -0
  67. package/dist/formatting/index.cjs +1 -1
  68. package/dist/formatting/index.d.ts +878 -840
  69. package/dist/formatting/index.js +1 -1
  70. package/dist/generator/index.cjs +1 -1
  71. package/dist/generator/index.d.ts +173 -150
  72. package/dist/generator/index.js +1 -1
  73. package/dist/if-CvT4R7Kh.d.ts +16 -16
  74. package/dist/index.cjs +1 -1
  75. package/dist/index.d.ts +1 -1
  76. package/dist/index.js +1 -1
  77. package/dist/is-array--YjXV-Wx.d.ts +1207 -0
  78. package/dist/isPlainObject-BVhBAPHX.d.ts +169 -0
  79. package/dist/never-BfayMBF9.d.ts +64 -64
  80. package/dist/next/index.cjs +6 -6
  81. package/dist/next/index.d.ts +196 -176
  82. package/dist/next/index.js +5 -5
  83. package/dist/next/server/index.cjs +1 -1
  84. package/dist/next/server/index.d.ts +26 -40
  85. package/dist/next/server/index.js +1 -1
  86. package/dist/nils-DMz3kU7M.d.ts +155 -155
  87. package/dist/omit-VvmIsZmX.d.ts +25 -25
  88. package/dist/operations/index.cjs +1 -1
  89. package/dist/operations/index.d.ts +121 -176
  90. package/dist/operations/index.js +1 -1
  91. package/dist/parsers/index.cjs +1 -1
  92. package/dist/parsers/index.d.ts +35 -36
  93. package/dist/parsers/index.js +1 -1
  94. package/dist/predicates/index.cjs +1 -1
  95. package/dist/predicates/index.d.ts +1701 -1675
  96. package/dist/predicates/index.js +1 -1
  97. package/dist/prettify-C4xLcYOP.d.ts +328 -328
  98. package/dist/promise/index.cjs +1 -1
  99. package/dist/promise/index.d.ts +29 -38
  100. package/dist/promise/index.js +1 -1
  101. package/dist/rzl-utils.global.js +3 -3
  102. package/dist/string-XA-til3C.d.ts +351 -0
  103. package/dist/strings/index.cjs +1 -1
  104. package/dist/strings/index.d.ts +712 -787
  105. package/dist/strings/index.js +1 -1
  106. package/dist/stylings/index.cjs +1 -1
  107. package/dist/stylings/index.d.ts +37 -45
  108. package/dist/stylings/index.js +1 -1
  109. package/dist/type-data-DDs-u2kq.d.ts +241 -241
  110. package/dist/types/index.d.ts +3266 -3266
  111. package/dist/urls/index.cjs +1 -1
  112. package/dist/urls/index.d.ts +384 -409
  113. package/dist/urls/index.js +1 -1
  114. package/package.json +53 -11
  115. package/dist/array-CIZRbqTF.d.ts +0 -223
  116. package/dist/chunk-2TRAPBZ7.cjs +0 -1
  117. package/dist/chunk-3D74QO5D.cjs +0 -1
  118. package/dist/chunk-4DK3RCC4.js +0 -2
  119. package/dist/chunk-4JOQ45HL.js +0 -1
  120. package/dist/chunk-55CZALRS.js +0 -1
  121. package/dist/chunk-5JFV3GDE.cjs +0 -4
  122. package/dist/chunk-62HX5Z45.cjs +0 -1
  123. package/dist/chunk-7NA6DUHR.cjs +0 -2
  124. package/dist/chunk-BVPMMWDL.cjs +0 -1
  125. package/dist/chunk-CEFYHEM4.cjs +0 -1
  126. package/dist/chunk-CN53M4QZ.cjs +0 -1
  127. package/dist/chunk-D47MHBSD.cjs +0 -1
  128. package/dist/chunk-DGH75GJD.js +0 -1
  129. package/dist/chunk-E5NUI7PN.js +0 -1
  130. package/dist/chunk-FDITZ5C6.cjs +0 -1
  131. package/dist/chunk-FSSV24W7.cjs +0 -1
  132. package/dist/chunk-GCGU2WB7.js +0 -1
  133. package/dist/chunk-GECI2YBP.js +0 -1
  134. package/dist/chunk-GQE4OVHC.cjs +0 -1
  135. package/dist/chunk-GRVZXQXL.cjs +0 -1
  136. package/dist/chunk-I4AVNHPA.cjs +0 -1
  137. package/dist/chunk-JFRL7NKU.js +0 -4
  138. package/dist/chunk-KCQDDZJE.cjs +0 -1
  139. package/dist/chunk-L54ZPSYJ.js +0 -1
  140. package/dist/chunk-LVKAYEZ4.js +0 -1
  141. package/dist/chunk-MBDWTK54.cjs +0 -1
  142. package/dist/chunk-MNGGDB2G.js +0 -1
  143. package/dist/chunk-MY7BA4GI.cjs +0 -1
  144. package/dist/chunk-N2IJPIND.cjs +0 -1
  145. package/dist/chunk-NIMNTEGV.js +0 -1
  146. package/dist/chunk-PVJF2JHM.js +0 -1
  147. package/dist/chunk-QCFXEUKL.js +0 -1
  148. package/dist/chunk-QFCGBBSY.js +0 -1
  149. package/dist/chunk-QQYAUPSK.cjs +0 -1
  150. package/dist/chunk-TC4VBE4Y.cjs +0 -1
  151. package/dist/chunk-TUXDINHF.cjs +0 -1
  152. package/dist/chunk-U5Y2FXMN.cjs +0 -1
  153. package/dist/chunk-UUPQI6ND.cjs +0 -1
  154. package/dist/chunk-VYCGZ2S6.js +0 -1
  155. package/dist/chunk-W5EDKJK3.js +0 -1
  156. package/dist/chunk-WHAVUFEU.js +0 -1
  157. package/dist/chunk-XCFIOTCV.js +0 -1
  158. package/dist/chunk-XE27XPJR.js +0 -1
  159. package/dist/chunk-XVB3ZZEB.js +0 -1
  160. package/dist/chunk-ZBSIGJFO.cjs +0 -1
  161. package/dist/chunk-ZYAML74V.js +0 -1
  162. package/dist/extends-Mp81Hq9-.d.ts +0 -145
  163. package/dist/is-array-Ckm_47hw.d.ts +0 -1557
  164. package/dist/isPlainObject-BKYaI6a8.d.ts +0 -182
@@ -1,26 +1,26 @@
1
1
  type Enumerate<N extends number,Acc extends number[]=[]>=Acc["length"] extends N?Acc[number]:Enumerate<N,[...Acc,Acc["length"]]>;
2
2
  /** --------------------------------------------------
3
- * * ***Generate a union type of numbers from `From` to `To` using enumeration.***
4
- * --------------------------------------------------
5
- *
6
- * @template From - Starting number of the range (inclusive).
7
- * @template To - Ending number of the range (inclusive).
8
- *
9
- * @description
10
- * Produces a **numeric union type** from `From` to `To` (inclusive),
11
- * using a simpler approach based on `Enumerate<N>` helper type.
12
- *
13
- * - ✅ Straightforward & easy to reason about.
14
- * - ⚠️ Still limited by TypeScript recursion depth (safe up to `999`).
15
- * - ⚙️ Best used for **smaller ranges** or when readability matters.
16
- *
17
- * @example
18
- * ```ts
19
- * type RangeX = NumberRangeUnion<3, 6>;
20
- * // ^? 3 | 4 | 5 | 6
21
- *
22
- * type RangeY = NumberRangeUnion<0, 2>;
23
- * // ^? 0 | 1 | 2
24
- * ```
25
- */
3
+ * * ***Generate a union type of numbers from `From` to `To` using enumeration.***
4
+ * --------------------------------------------------
5
+ *
6
+ * @template From - Starting number of the range (inclusive).
7
+ * @template To - Ending number of the range (inclusive).
8
+ *
9
+ * @description
10
+ * Produces a **numeric union type** from `From` to `To` (inclusive),
11
+ * using a simpler approach based on `Enumerate<N>` helper type.
12
+ *
13
+ * - ✅ Straightforward & easy to reason about.
14
+ * - ⚠️ Still limited by TypeScript recursion depth (safe up to `999`).
15
+ * - ⚙️ Best used for **smaller ranges** or when readability matters.
16
+ *
17
+ * @example
18
+ * ```ts
19
+ * type RangeX = NumberRangeUnion<3, 6>;
20
+ * // ^? 3 | 4 | 5 | 6
21
+ *
22
+ * type RangeY = NumberRangeUnion<0, 2>;
23
+ * // ^? 0 | 1 | 2
24
+ * ```
25
+ */
26
26
  type NumberRangeUnion<From extends number,To extends number>=From extends To?From:Exclude<Enumerate<To>,Enumerate<From>>extends never?never:Exclude<Enumerate<To>,Enumerate<From>>|To;export type{NumberRangeUnion as N};
@@ -1,67 +1,67 @@
1
1
  import{I as If}from'./if-CvT4R7Kh.js';
2
2
  /** -------------------------------------------------------
3
- * * ***IsAny.***
4
- * -------------------------------------------------------
5
- * A type-level utility that checks whether a type is ***`any`***.
6
- * - Returns `true` if `T` is `any`.
7
- * - Returns `false` otherwise.
8
- *
9
- * @template T - The type to evaluate.
10
- * @example
11
- * ```ts
12
- * type A = IsAny<any>; // ➔ true
13
- * type B = IsAny<string>; // ➔ false
14
- * type C = IsAny<unknown>; // ➔ false
15
- * type D = IsAny<never>; // ➔ false
16
- * ```
17
- */
3
+ * * ***IsAny.***
4
+ * -------------------------------------------------------
5
+ * A type-level utility that checks whether a type is ***`any`***.
6
+ * - Returns `true` if `T` is `any`.
7
+ * - Returns `false` otherwise.
8
+ *
9
+ * @template T - The type to evaluate.
10
+ * @example
11
+ * ```ts
12
+ * type A = IsAny<any>; // ➔ true
13
+ * type B = IsAny<string>; // ➔ false
14
+ * type C = IsAny<unknown>; // ➔ false
15
+ * type D = IsAny<never>; // ➔ false
16
+ * ```
17
+ */
18
18
  type IsAny<T>=0 extends 1 & T?true:false;
19
19
  /** -------------------------------------------------------
20
- * * ***IfAny.***
21
- * -------------------------------------------------------
22
- *
23
- * A type-level conditional utility that returns one type if ***`T` is `any`***,
24
- * and another type otherwise.
25
- * - Defaults to `true` when `T` is `any`.
26
- * - Defaults to `false` otherwise.
27
- *
28
- * @template T - The type to check.
29
- * @template IfTrue - The type to return if `T` is `any`. *(default: `true`)*
30
- * @template IfFalse - The type to return if `T` is not `any`. *(default: `false`)*
31
- *
32
- * @example
33
- * ```ts
34
- * type A = IfAny<any, string, number>;
35
- * // ➔ string
36
- * type B = IfAny<string, string, number>;
37
- * // ➔ number
38
- * ```
39
- */
20
+ * * ***IfAny.***
21
+ * -------------------------------------------------------
22
+ *
23
+ * A type-level conditional utility that returns one type if ***`T` is `any`***,
24
+ * and another type otherwise.
25
+ * - Defaults to `true` when `T` is `any`.
26
+ * - Defaults to `false` otherwise.
27
+ *
28
+ * @template T - The type to check.
29
+ * @template IfTrue - The type to return if `T` is `any`. *(default: `true`)*
30
+ * @template IfFalse - The type to return if `T` is not `any`. *(default: `false`)*
31
+ *
32
+ * @example
33
+ * ```ts
34
+ * type A = IfAny<any, string, number>;
35
+ * // ➔ string
36
+ * type B = IfAny<string, string, number>;
37
+ * // ➔ number
38
+ * ```
39
+ */
40
40
  type IfAny<T,IfTrue=true,IfFalse=false>=If<IsAny<T>,IfTrue,IfFalse>;
41
41
  /** Configuration options for a type-level utility `AnifyProperties`. */
42
42
  type AnifyPropertiesOptions={
43
43
  /** If `makeOptional: true`, all properties become optional, otherwise, all properties are required and typed as `any`, defaultValue: `false`.
44
- *
45
- * @default false
46
- */
44
+ *
45
+ * @default false
46
+ */
47
47
  makeOptional:boolean;};
48
48
  /** -------------------------------------------------------
49
- * * ***AnifyProperties.***
50
- * -------------------------------------------------------
51
- *
52
- * A type-level utility that transforms all properties of an object into ***`any`***.
53
- * - If `makeOptional: true`, all properties become optional.
54
- * - Otherwise, all properties are required and typed as `any`.
55
- *
56
- * @template T - The object type to transform.
57
- * @template Options - Configuration options. Defaults to `{ makeOptional: false }`.
58
- * @example
59
- * ```ts
60
- * type A = AnifyProperties<{a: string; b: number}>;
61
- * // ➔ { a: any; b: any }
62
- *
63
- * type B = AnifyProperties<{a: string; b: number}, { makeOptional: true }>;
64
- * // ➔ { a?: any; b?: any }
65
- * ```
66
- */
49
+ * * ***AnifyProperties.***
50
+ * -------------------------------------------------------
51
+ *
52
+ * A type-level utility that transforms all properties of an object into ***`any`***.
53
+ * - If `makeOptional: true`, all properties become optional.
54
+ * - Otherwise, all properties are required and typed as `any`.
55
+ *
56
+ * @template T - The object type to transform.
57
+ * @template Options - Configuration options. Defaults to `{ makeOptional: false }`.
58
+ * @example
59
+ * ```ts
60
+ * type A = AnifyProperties<{a: string; b: number}>;
61
+ * // ➔ { a: any; b: any }
62
+ *
63
+ * type B = AnifyProperties<{a: string; b: number}, { makeOptional: true }>;
64
+ * // ➔ { a?: any; b?: any }
65
+ * ```
66
+ */
67
67
  type AnifyProperties<T extends object,Options extends AnifyPropertiesOptions={makeOptional:false;}>={[K in keyof T]:any;}extends infer Result?If<Options["makeOptional"],Partial<Result>,Result>:never;export type{AnifyProperties as A,IsAny as I,AnifyPropertiesOptions as a,IfAny as b};
@@ -1,72 +1,72 @@
1
1
  /** -------------------------------------------------------
2
- * * ***FixNeverArrayRecursive.***
3
- * -------------------------------------------------------
4
- * A type-level utility that **recursively transforms arrays of type `never[]` into empty arrays**.
5
- * - Preserves `readonly` modifiers.
6
- * - Applies recursively for nested arrays.
7
- * - Leaves other types unchanged.
8
- *
9
- * @template T - The input type to recursively fix.
10
- * @example
11
- * ```ts
12
- * type A = FixNeverArrayRecursive<never[]>;
13
- * // ➔ []
14
- * type B = FixNeverArrayRecursive<readonly never[]>;
15
- * // ➔ readonly []
16
- * type C = FixNeverArrayRecursive<string[]>;
17
- * // ➔ string[]
18
- * type D = FixNeverArrayRecursive<(never | string)[]>;
19
- * // ➔ (never | string)[]
20
- * type E = FixNeverArrayRecursive<(never[])[]>;
21
- * // ➔ [][]
22
- * ```
23
- */
2
+ * * ***FixNeverArrayRecursive.***
3
+ * -------------------------------------------------------
4
+ * A type-level utility that **recursively transforms arrays of type `never[]` into empty arrays**.
5
+ * - Preserves `readonly` modifiers.
6
+ * - Applies recursively for nested arrays.
7
+ * - Leaves other types unchanged.
8
+ *
9
+ * @template T - The input type to recursively fix.
10
+ * @example
11
+ * ```ts
12
+ * type A = FixNeverArrayRecursive<never[]>;
13
+ * // ➔ []
14
+ * type B = FixNeverArrayRecursive<readonly never[]>;
15
+ * // ➔ readonly []
16
+ * type C = FixNeverArrayRecursive<string[]>;
17
+ * // ➔ string[]
18
+ * type D = FixNeverArrayRecursive<(never | string)[]>;
19
+ * // ➔ (never | string)[]
20
+ * type E = FixNeverArrayRecursive<(never[])[]>;
21
+ * // ➔ [][]
22
+ * ```
23
+ */
24
24
  type FixNeverArrayRecursive<T>=T extends readonly never[]?T extends never[]?[]:readonly []:T extends(infer U)[]?FixNeverArrayRecursive<U>[]:T extends readonly(infer U)[]?readonly FixNeverArrayRecursive<U>[]:T;
25
25
  /** -------------------------------------------------------
26
- * * ***NormalizeEmptyArraysRecursive.***
27
- * -------------------------------------------------------
28
- * A type-level utility that **recursively normalizes empty array types** by converting arrays whose element type is `never`, `null`, or `undefined` into empty tuple types (`[]`).
29
- * - Preserves `readonly` modifiers.
30
- * - Recurses into nested arrays.
31
- * - Leaves other array types unchanged.
32
- *
33
- * @template T - The input type to normalize.
34
- * @example
35
- * ```ts
36
- * type A = NormalizeEmptyArraysRecursive<never[]>;
37
- * // ➔ []
38
- * type B = NormalizeEmptyArraysRecursive<readonly never[]>;
39
- * // ➔ readonly []
40
- * type C = NormalizeEmptyArraysRecursive<null[]>;
41
- * // ➔ []
42
- * type D = NormalizeEmptyArraysRecursive<(null[] | string[])[]>;
43
- * // ➔ ([] | string[])[]
44
- * type E = NormalizeEmptyArraysRecursive<string[]>;
45
- * // ➔ string[]
46
- * ```
47
- */
26
+ * * ***NormalizeEmptyArraysRecursive.***
27
+ * -------------------------------------------------------
28
+ * A type-level utility that **recursively normalizes empty array types** by converting arrays whose element type is `never`, `null`, or `undefined` into empty tuple types (`[]`).
29
+ * - Preserves `readonly` modifiers.
30
+ * - Recurses into nested arrays.
31
+ * - Leaves other array types unchanged.
32
+ *
33
+ * @template T - The input type to normalize.
34
+ * @example
35
+ * ```ts
36
+ * type A = NormalizeEmptyArraysRecursive<never[]>;
37
+ * // ➔ []
38
+ * type B = NormalizeEmptyArraysRecursive<readonly never[]>;
39
+ * // ➔ readonly []
40
+ * type C = NormalizeEmptyArraysRecursive<null[]>;
41
+ * // ➔ []
42
+ * type D = NormalizeEmptyArraysRecursive<(null[] | string[])[]>;
43
+ * // ➔ ([] | string[])[]
44
+ * type E = NormalizeEmptyArraysRecursive<string[]>;
45
+ * // ➔ string[]
46
+ * ```
47
+ */
48
48
  type NormalizeEmptyArraysRecursive<T>=T extends readonly(infer U)[]?U extends never|null|undefined?T extends readonly unknown[]?T extends(infer E)[]?[]:readonly []:never:T extends(infer E)[]?NormalizeEmptyArraysRecursive<U>[]:readonly NormalizeEmptyArraysRecursive<U>[]:T;
49
49
  /** -------------------------------------------------------
50
- * * ***RemoveEmptyArrayElements.***
51
- * -------------------------------------------------------
52
- * A type-level utility that **recursively removes empty array elements (`[]`) from a tuple type**.
53
- * - If `T` is a tuple, checks the first element:
54
- * - If `Head` is an empty array type (`[]`), it is removed.
55
- * - Otherwise, `Head` is preserved.
56
- * - Repeats recursively on the rest of the tuple.
57
- * - Leaves non-tuple types unchanged.
58
- *
59
- * @template T - The tuple type to process.
60
- * @example
61
- * ```ts
62
- * type A = RemoveEmptyArrayElements<[[], 1, [], 2]>;
63
- * // ➔ [1, 2]
64
- * type B = RemoveEmptyArrayElements<[]>;
65
- * // ➔ []
66
- * type C = RemoveEmptyArrayElements<[[], [], []]>;
67
- * // ➔ []
68
- * type D = RemoveEmptyArrayElements<[1, 2, 3]>;
69
- * // ➔ [1, 2, 3]
70
- * ```
71
- */
50
+ * * ***RemoveEmptyArrayElements.***
51
+ * -------------------------------------------------------
52
+ * A type-level utility that **recursively removes empty array elements (`[]`) from a tuple type**.
53
+ * - If `T` is a tuple, checks the first element:
54
+ * - If `Head` is an empty array type (`[]`), it is removed.
55
+ * - Otherwise, `Head` is preserved.
56
+ * - Repeats recursively on the rest of the tuple.
57
+ * - Leaves non-tuple types unchanged.
58
+ *
59
+ * @template T - The tuple type to process.
60
+ * @example
61
+ * ```ts
62
+ * type A = RemoveEmptyArrayElements<[[], 1, [], 2]>;
63
+ * // ➔ [1, 2]
64
+ * type B = RemoveEmptyArrayElements<[]>;
65
+ * // ➔ []
66
+ * type C = RemoveEmptyArrayElements<[[], [], []]>;
67
+ * // ➔ []
68
+ * type D = RemoveEmptyArrayElements<[1, 2, 3]>;
69
+ * // ➔ [1, 2, 3]
70
+ * ```
71
+ */
72
72
  type RemoveEmptyArrayElements<T>=T extends [infer Head,...infer Tail]?Head extends []?RemoveEmptyArrayElements<Tail>:[Head,...RemoveEmptyArrayElements<Tail>]:T extends []?[]:T;export type{FixNeverArrayRecursive as F,NormalizeEmptyArraysRecursive as N,RemoveEmptyArrayElements as R};
@@ -1 +1 @@
1
- 'use strict';var chunkI4AVNHPA_cjs=require('../chunk-I4AVNHPA.cjs'),chunk62HX5Z45_cjs=require('../chunk-62HX5Z45.cjs'),chunkBVPMMWDL_cjs=require('../chunk-BVPMMWDL.cjs');require('../chunk-7YWAQOA4.cjs');var chunkCN53M4QZ_cjs=require('../chunk-CN53M4QZ.cjs');Object.defineProperty(exports,"assertIsBigInt",{enumerable:true,get:function(){return chunkI4AVNHPA_cjs.a}});Object.defineProperty(exports,"assertIsNumber",{enumerable:true,get:function(){return chunkI4AVNHPA_cjs.b}});Object.defineProperty(exports,"assertIsArray",{enumerable:true,get:function(){return chunk62HX5Z45_cjs.a}});Object.defineProperty(exports,"assertIsString",{enumerable:true,get:function(){return chunkBVPMMWDL_cjs.a}});Object.defineProperty(exports,"assertIsBoolean",{enumerable:true,get:function(){return chunkCN53M4QZ_cjs.G}});Object.defineProperty(exports,"assertIsPlainObject",{enumerable:true,get:function(){return chunkCN53M4QZ_cjs.m}});
1
+ 'use strict';var chunkIY5OZAB3_cjs=require('../chunk-IY5OZAB3.cjs'),chunkUQDJF5RR_cjs=require('../chunk-UQDJF5RR.cjs'),chunkBEZPD44N_cjs=require('../chunk-BEZPD44N.cjs');require('../chunk-7YWAQOA4.cjs');var chunkCII6WWLO_cjs=require('../chunk-CII6WWLO.cjs');Object.defineProperty(exports,"assertIsBigInt",{enumerable:true,get:function(){return chunkIY5OZAB3_cjs.a}});Object.defineProperty(exports,"assertIsNumber",{enumerable:true,get:function(){return chunkIY5OZAB3_cjs.b}});Object.defineProperty(exports,"assertIsArray",{enumerable:true,get:function(){return chunkUQDJF5RR_cjs.a}});Object.defineProperty(exports,"assertIsString",{enumerable:true,get:function(){return chunkBEZPD44N_cjs.a}});Object.defineProperty(exports,"assertIsBoolean",{enumerable:true,get:function(){return chunkCII6WWLO_cjs.G}});Object.defineProperty(exports,"assertIsPlainObject",{enumerable:true,get:function(){return chunkCII6WWLO_cjs.j}});