@rzl-zone/utils-js 3.0.1-beta.0 → 3.1.0-beta.2

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 (152) hide show
  1. package/dist/assertions/index.cjs +1 -1
  2. package/dist/assertions/index.d.ts +96 -116
  3. package/dist/assertions/index.js +1 -1
  4. package/dist/chunk-25G6B35W.js +1 -0
  5. package/dist/chunk-2AUUPGMN.js +1 -0
  6. package/dist/chunk-2JQQQ625.js +1 -0
  7. package/dist/chunk-445TAVT4.cjs +1 -0
  8. package/dist/chunk-467VEMJH.js +1 -0
  9. package/dist/chunk-6Q4I2RPC.cjs +1 -0
  10. package/dist/chunk-6SMJMZ7G.cjs +1 -0
  11. package/dist/chunk-BLCANGFS.js +1 -0
  12. package/dist/chunk-CK3BZGEU.js +1 -0
  13. package/dist/{chunk-JWHM3WZQ.cjs → chunk-D43GV6EF.cjs} +1 -1
  14. package/dist/chunk-DFSTVQFI.cjs +1 -0
  15. package/dist/chunk-DYRDBYPF.cjs +1 -0
  16. package/dist/chunk-EXXLUO7L.cjs +1 -0
  17. package/dist/chunk-G72VSVGO.js +1 -0
  18. package/dist/chunk-GAJTFCUA.js +1 -0
  19. package/dist/chunk-GOJNH55O.cjs +1 -0
  20. package/dist/chunk-HXST7RJB.js +1 -0
  21. package/dist/{chunk-BYZAD3XN.cjs → chunk-HXTACM3O.cjs} +1 -1
  22. package/dist/chunk-IJTZWWRJ.cjs +1 -0
  23. package/dist/chunk-ISJ33O2J.cjs +1 -0
  24. package/dist/chunk-JISH2VGG.js +1 -0
  25. package/dist/{chunk-FF76ISQ2.js → chunk-JQZUWBIX.js} +1 -1
  26. package/dist/{chunk-XH6MCRLP.js → chunk-K4PLGD7C.js} +1 -1
  27. package/dist/chunk-KZQB7H4E.cjs +1 -0
  28. package/dist/chunk-LUVV5KSD.cjs +2 -0
  29. package/dist/chunk-LVUSFXQS.cjs +1 -0
  30. package/dist/chunk-ME5OV5HN.js +1 -0
  31. package/dist/chunk-MF5Y5K4N.cjs +1 -0
  32. package/dist/chunk-MJAW5RAK.js +1 -0
  33. package/dist/chunk-MWLEM7ED.js +1 -0
  34. package/dist/chunk-NSVLG7NY.js +4 -0
  35. package/dist/chunk-NUHOOAUN.cjs +1 -0
  36. package/dist/chunk-NUVGETPD.js +2 -0
  37. package/dist/chunk-O5VXBNUQ.cjs +4 -0
  38. package/dist/chunk-O7SJR4CY.cjs +1 -0
  39. package/dist/chunk-OX6RLS2F.cjs +1 -0
  40. package/dist/chunk-PFLNHD4B.cjs +1 -0
  41. package/dist/chunk-PSWITZK5.js +1 -0
  42. package/dist/chunk-PYUVKHUF.cjs +1 -0
  43. package/dist/chunk-REFMEB4A.js +1 -0
  44. package/dist/chunk-RHE3M2NJ.cjs +1 -0
  45. package/dist/chunk-RHIBYOFQ.js +1 -0
  46. package/dist/chunk-S7GMG4TB.js +1 -0
  47. package/dist/chunk-TQMZ2LPI.js +1 -0
  48. package/dist/{chunk-RN3TP3S3.js → chunk-U4TZO7WV.js} +1 -1
  49. package/dist/chunk-UUMKL74S.js +1 -0
  50. package/dist/{chunk-EXZ47NOW.js → chunk-VQLAPEL3.js} +1 -1
  51. package/dist/chunk-VTR75UID.cjs +1 -0
  52. package/dist/chunk-XFCJDSB2.cjs +1 -0
  53. package/dist/chunk-XOYX4PLZ.cjs +1 -0
  54. package/dist/chunk-Z6FLCEN6.js +1 -0
  55. package/dist/chunk-ZO5364A6.cjs +1 -0
  56. package/dist/conversions/index.cjs +1 -1
  57. package/dist/conversions/index.d.ts +396 -593
  58. package/dist/conversions/index.js +1 -1
  59. package/dist/env/index.d.ts +5 -8
  60. package/dist/events/index.cjs +1 -1
  61. package/dist/events/index.d.ts +80 -77
  62. package/dist/events/index.js +1 -1
  63. package/dist/{array-CIZRbqTF.d.ts → extends-Bk_SBGdT.d.ts} +145 -1
  64. package/dist/formatting/index.cjs +1 -1
  65. package/dist/formatting/index.d.ts +478 -440
  66. package/dist/formatting/index.js +1 -1
  67. package/dist/generator/index.cjs +1 -1
  68. package/dist/generator/index.d.ts +135 -112
  69. package/dist/generator/index.js +1 -1
  70. package/dist/index.cjs +1 -1
  71. package/dist/index.d.ts +1 -1
  72. package/dist/index.js +1 -1
  73. package/dist/{is-array-Ckm_47hw.d.ts → is-array--YjXV-Wx.d.ts} +2 -352
  74. package/dist/{isPlainObject-BKYaI6a8.d.ts → isPlainObject-BVhBAPHX.d.ts} +49 -62
  75. package/dist/next/index.cjs +6 -6
  76. package/dist/next/index.d.ts +125 -105
  77. package/dist/next/index.js +5 -5
  78. package/dist/next/server/index.cjs +1 -1
  79. package/dist/next/server/index.d.ts +8 -22
  80. package/dist/next/server/index.js +1 -1
  81. package/dist/operations/index.cjs +1 -1
  82. package/dist/operations/index.d.ts +72 -127
  83. package/dist/operations/index.js +1 -1
  84. package/dist/parsers/index.cjs +1 -1
  85. package/dist/parsers/index.d.ts +26 -27
  86. package/dist/parsers/index.js +1 -1
  87. package/dist/predicates/index.cjs +1 -1
  88. package/dist/predicates/index.d.ts +686 -660
  89. package/dist/predicates/index.js +1 -1
  90. package/dist/promise/index.cjs +1 -1
  91. package/dist/promise/index.d.ts +14 -23
  92. package/dist/promise/index.js +1 -1
  93. package/dist/rzl-utils.global.js +3 -3
  94. package/dist/string-XA-til3C.d.ts +351 -0
  95. package/dist/strings/index.cjs +1 -1
  96. package/dist/strings/index.d.ts +301 -376
  97. package/dist/strings/index.js +1 -1
  98. package/dist/stylings/index.cjs +1 -1
  99. package/dist/stylings/index.d.ts +15 -23
  100. package/dist/stylings/index.js +1 -1
  101. package/dist/types/index.d.ts +1 -1
  102. package/dist/urls/index.cjs +1 -1
  103. package/dist/urls/index.d.ts +279 -302
  104. package/dist/urls/index.js +1 -1
  105. package/package.json +53 -11
  106. package/dist/chunk-2TRAPBZ7.cjs +0 -1
  107. package/dist/chunk-4DK3RCC4.js +0 -2
  108. package/dist/chunk-4JOQ45HL.js +0 -1
  109. package/dist/chunk-55CZALRS.js +0 -1
  110. package/dist/chunk-62HX5Z45.cjs +0 -1
  111. package/dist/chunk-7NA6DUHR.cjs +0 -2
  112. package/dist/chunk-BVPMMWDL.cjs +0 -1
  113. package/dist/chunk-CEFYHEM4.cjs +0 -1
  114. package/dist/chunk-CN53M4QZ.cjs +0 -1
  115. package/dist/chunk-D47MHBSD.cjs +0 -1
  116. package/dist/chunk-DGH75GJD.js +0 -1
  117. package/dist/chunk-E5NUI7PN.js +0 -1
  118. package/dist/chunk-FDITZ5C6.cjs +0 -1
  119. package/dist/chunk-FSSV24W7.cjs +0 -1
  120. package/dist/chunk-GCGU2WB7.js +0 -1
  121. package/dist/chunk-GECI2YBP.js +0 -1
  122. package/dist/chunk-GQE4OVHC.cjs +0 -1
  123. package/dist/chunk-GRVZXQXL.cjs +0 -1
  124. package/dist/chunk-I4AVNHPA.cjs +0 -1
  125. package/dist/chunk-KBKYG3IY.cjs +0 -1
  126. package/dist/chunk-KCQDDZJE.cjs +0 -1
  127. package/dist/chunk-LVKAYEZ4.js +0 -1
  128. package/dist/chunk-MBDWTK54.cjs +0 -1
  129. package/dist/chunk-MNGGDB2G.js +0 -1
  130. package/dist/chunk-MY7BA4GI.cjs +0 -1
  131. package/dist/chunk-N2IJPIND.cjs +0 -1
  132. package/dist/chunk-NIMNTEGV.js +0 -1
  133. package/dist/chunk-POCPQYZS.js +0 -1
  134. package/dist/chunk-PVJF2JHM.js +0 -1
  135. package/dist/chunk-QCFXEUKL.js +0 -1
  136. package/dist/chunk-QFCGBBSY.js +0 -1
  137. package/dist/chunk-QQYAUPSK.cjs +0 -1
  138. package/dist/chunk-TC4VBE4Y.cjs +0 -1
  139. package/dist/chunk-TUXDINHF.cjs +0 -1
  140. package/dist/chunk-U5Y2FXMN.cjs +0 -1
  141. package/dist/chunk-UUPQI6ND.cjs +0 -1
  142. package/dist/chunk-VYCGZ2S6.js +0 -1
  143. package/dist/chunk-W5EDKJK3.js +0 -1
  144. package/dist/chunk-WHAVUFEU.js +0 -1
  145. package/dist/chunk-X3GTRVVK.cjs +0 -4
  146. package/dist/chunk-XCFIOTCV.js +0 -1
  147. package/dist/chunk-XE27XPJR.js +0 -1
  148. package/dist/chunk-XVB3ZZEB.js +0 -1
  149. package/dist/chunk-YEERJDOF.js +0 -4
  150. package/dist/chunk-ZBSIGJFO.cjs +0 -1
  151. package/dist/chunk-ZYAML74V.js +0 -1
  152. package/dist/extends-Mp81Hq9-.d.ts +0 -145
@@ -1,182 +1,127 @@
1
1
  import{N as NumberRangeUnion}from'../NumberRangeUnion-DC-C3_Kq.js';
2
2
  /** ----------------------------------------------------------------------
3
- * * ***Finds duplicate values in an array by deep equality comparison.***
3
+ * * ***Utility: `findDuplicates`.***
4
4
  * ----------------------------------------------------------------------
5
- *
6
- * - ✔ Uses `isEqual` to compare elements (handles objects, arrays, dates, NaN, etc.)
7
- * - Returns a new array containing only the *first occurrences* of duplicated values.
8
- * - Does **not mutate** the original array.
9
- * - Throws `TypeError` if input is not an array.
10
- *
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.
11
12
  * @template T Type of elements in the input array.
12
13
  * @param {T[]} values - The array to check for duplicates.
13
14
  * @returns {T[]} An array of the duplicate values found in the input,
14
15
  * preserving order of their first duplicate appearance.
15
- *
16
16
  * @throws {TypeError} If the provided `values` argument is not an array.
17
- *
18
17
  * @example
19
- * findDuplicates([1, 2, 2, 3, 4, 4]); // => [2, 4]
20
- * findDuplicates(["apple", "banana", "apple", "orange"]); // => ["apple"]
21
- * findDuplicates([{ a: 1 }, { a: 1 }, { a: 2 }]); // => [{ a: 1 }]
22
- * findDuplicates([NaN, NaN, 1]); // => [NaN]
23
- * findDuplicates([true, false, true]); // => [true]
24
- * findDuplicates([1, 2, 3]); // => []
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
+ * // ➔ []
25
30
  */
26
31
  declare const findDuplicates:<T>(values:T[])=>T[];
27
32
  /** --------------------------------
28
- * * ***Creates a new object excluding specified keys.***
33
+ * * ***Utility: `omitKeys`.***
29
34
  * --------------------------------
30
- * This function creates a shallow copy of the given object
31
- * omitting the specified keys. It will return a new object
32
- * without mutating the original.
33
- *
34
- * It also validates that `keysToOmit` does not contain duplicate keys.
35
- *
36
- * Internally, it uses `isEqual` to check for duplicates in the `keysToOmit` array.
37
- *
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.
38
43
  * @template I The type of the input object.
39
44
  * @template K The keys to omit from the object.
40
45
  * @param {I} object - The source object to omit keys from.
41
46
  * @param {K[]} keysToOmit - An array of keys to exclude from the returned object.
42
47
  * @returns {Omit<I, K>} A new object without the specified keys.
43
- *
44
48
  * @throws {TypeError} If `keysToOmit` is not an array.
45
49
  * @throws {Error} If duplicate keys are found in `keysToOmit`.
46
- *
47
50
  * @example
48
51
  * omitKeys({ a: 1, b: 2, c: 3 }, ["b", "c"]);
49
- * // => { a: 1 }
50
- *
51
- * @example
52
+ * //➔ { a: 1 }
52
53
  * omitKeys({ name: "John", age: 30 }, ["age"]);
53
- * // => { name: "John" }
54
- *
55
- * @example
54
+ * //➔ { name: "John" }
56
55
  * omitKeys({ a: 1, b: 2 }, []);
57
- * // => { a: 1, b: 2 } (no changes)
56
+ * //➔ { a: 1, b: 2 } (no changes)
58
57
  */
59
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;
60
59
  /** ------------------------------------------------------
61
- * * Recursively omits properties from an object using dot notation paths.
62
- * * Also removes resulting empty objects (`{}`) and arrays (`[]`),
63
- * * cascading upwards to remove empty parents until root if needed.
60
+ * * ***Utility: `omitKeysDeep`.***
64
61
  * ------------------------------------------------------
65
- *
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.
66
74
  * @template I - Type of the input object
67
- *
68
75
  * @param {I} object
69
- * The object to process. Should be a plain nested object or array structure.
70
- *
76
+ * The object to process. Should be a plain nested object or array structure.
71
77
  * @param {DotPath<I>[]} keysToOmit
72
- * An array of string paths in dot notation indicating the properties to remove.
73
- * Paths can include numeric indices to target array elements, e.g. `"arr.0.x"` to remove `x`
74
- * from the first object inside the `arr` array.
75
- *
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.
76
81
  * @returns {Partial<I>}
77
- * A new deeply cloned object with the specified keys omitted,
78
- * with resulting empty objects or arrays fully removed (even if it collapses to `{}`).
79
- *
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 `{}`).
80
84
  * @throws {TypeError}
81
85
  * If `keysToOmit` is not an array will throw TypeError.
82
- *
83
- * @throws {Error}
84
- * If `keysToOmit` contains duplicate paths will throw Error.
85
- *
86
- * @remarks
87
- * ⚠️ Be careful: if after omission an object or array becomes empty, it will be removed entirely
88
- * including all the way up to the root if necessary, resulting in `{}`.
89
- *
90
- * ⚠️ Note: For array indices, TypeScript autocomplete only suggests `0`–`30`
91
- * (to prevent editor lag on large unions).
92
- * However, higher indices are still fully supported at runtime — you can
93
- * manually type `"arr.99.key"` and it will work the same.
94
- *
86
+ * @throws {Error} If `keysToOmit` contains duplicate paths will throw Error.
95
87
  * @example
96
88
  * omitKeysDeep({ arr: [{ a: 1 }] }, ["arr.0.a"]);
97
- * // {} (array becomes empty and removed)
98
- *
99
- * @example
89
+ * // {} (array becomes empty and removed)
100
90
  * omitKeysDeep({ a: { b: { c: 1 }, d: 2 }, e: 3 }, ["a.b.c"]);
101
- * // { a: { d: 2 }, e: 3 }
102
- *
103
- * @example
91
+ * // { a: { d: 2 }, e: 3 }
104
92
  * omitKeysDeep({ a: [{ b: 1 }, { c: 2 }] }, ["a.0.b"]);
105
- * // { a: [{ c: 2 }] }
106
- *
107
- * @example
93
+ * // { a: [{ c: 2 }] }
108
94
  * omitKeysDeep({ a: [{ b: 1 }] }, ["a.0.b"]);
109
- * // {} (array becomes empty and removed)
110
- *
111
- * @example
95
+ * // {} (array becomes empty and removed)
112
96
  * omitKeysDeep({ complex: [{ deep: [{ x: 1, y: 2 }] }] }, ["complex.0.deep.0.x"]);
113
- * // { complex: [{ deep: [{ y: 2 }] }] }
114
- *
115
- * @example
97
+ * // { complex: [{ deep: [{ y: 2 }] }] }
116
98
  * omitKeysDeep({ complex: [{ deep: [{ x: 1 }] }] }, ["complex.0.deep.0.x"]);
117
- * // {} (deep chain emptied and collapsed)
118
- *
119
- * @example
99
+ * // {} (deep chain emptied and collapsed)
120
100
  * omitKeysDeep({ data: [[{ foo: 1, bar: 2 }]] }, ["data.0.0.foo"]);
121
- * // { data: [[{ bar: 2 }]] }
122
- *
123
- * @example
101
+ * // { data: [[{ bar: 2 }]] }
124
102
  * omitKeysDeep({ data: [[{ foo: 1 }]] }, ["data.0.0.foo"]);
125
- * // {} (nested arrays emptied completely)
126
- *
127
- * @example
103
+ * // {} (nested arrays emptied completely)
128
104
  * omitKeysDeep({ x: [{ y: [{ z: 1 }, { w: 2 }] }] }, ["x.0.y.0.z"]);
129
- * // { x: [{ y: [{ w: 2 }] }] }
130
- *
131
- * @example
105
+ * // { x: [{ y: [{ w: 2 }] }] }
132
106
  * omitKeysDeep({ x: [{ y: [{ z: 1 }] }] }, ["x.0.y.0.z"]);
133
- * // {} (entire nested arrays removed)
134
- *
135
- * @example
107
+ * // {} (entire nested arrays removed)
136
108
  * omitKeysDeep({ p: { q: { r: 5 } }, s: 6 }, ["p.q.r"]);
137
- * // { s: 6 } (`p` removed because it becomes empty)
138
- *
139
- * @example
109
+ * // { s: 6 } (`p` removed because it becomes empty)
140
110
  * omitKeysDeep({ arr: [{ a: 1, b: 2 }, { c: 3 }] }, ["arr.0.a"]);
141
- * // { arr: [{ b: 2 }, { c: 3 }] }
142
- *
143
- * @example
111
+ * // { arr: [{ b: 2 }, { c: 3 }] }
144
112
  * omitKeysDeep({ root: [{ sub: [{ leaf: 10 }] }] }, ["root.0.sub.0.leaf"]);
145
- * // {} (deep nested arrays emptied to root)
146
- *
147
- * @example
113
+ * // {} (deep nested arrays emptied to root)
148
114
  * omitKeysDeep({ meta: { tags: ["x", "y"], count: 2 } }, ["meta.count"]);
149
- * // { meta: { tags: ["x", "y"] } }
150
- *
151
- * @example
115
+ * // { meta: { tags: ["x", "y"] } }
152
116
  * omitKeysDeep({ arr: [[{ a: 1 }, { b: 2 }]] }, ["arr.0.0.a"]);
153
- * // { arr: [[{ b: 2 }]] }
154
- *
155
- * @example
117
+ * // { arr: [[{ b: 2 }]] }
156
118
  * omitKeysDeep({ arr: [[{ a: 1 }]] }, ["arr.0.0.a"]);
157
- * // {} (double nested emptied)
158
- *
159
- * @example
119
+ * // {} (double nested emptied)
160
120
  * omitKeysDeep({ nested: [{ list: [{ id: 1, val: 2 }] }] }, ["nested.0.list.0.val"]);
161
- * // { nested: [{ list: [{ id: 1 }] }] }
162
- *
163
- * @example
121
+ * // { nested: [{ list: [{ id: 1 }] }] }
164
122
  * omitKeysDeep({ nested: [{ list: [{ id: 1 }] }] }, ["nested.0.list.0.id"]);
165
- * // {} (full collapse to empty)
166
- *
167
- * @example
123
+ * // {} (full collapse to empty)
168
124
  * omitKeysDeep({ mixed: { a: [1, 2, 3], b: { c: 4 } } }, ["mixed.b.c"]);
169
- * // { mixed: { a: [1, 2, 3] } }
170
- */
171
- declare const omitKeysDeep:<I extends Record<string,unknown>>(object:I,keysToOmit:DotPath<I>[])=>Partial<I>;
172
- /** --------------------------------
173
- * * Removes Property from PROPS Collection
174
- * --------------------------------
175
- * @description Becarefull put array in arrayException, If array is duplicated it will be throw an exception error
176
- * @param object is Record as object (string,any)
177
- * @param arrayExcept is Array exception []
178
- * @returns
179
- *
180
- * @deprecated - Use `omitKeys` instead, this function will remove a next update.
125
+ * // { mixed: { a: [1, 2, 3] } }
181
126
  */
182
- declare const omitProps:<I extends Record<string,unknown>,S extends(keyof I)[]>(object:I,arrayExcept:S)=>Omit<I,S[number]>|undefined;export{findDuplicates,omitKeys,omitKeysDeep,omitProps};
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,d as omitProps}from'../chunk-GCGU2WB7.js';import'../chunk-PVJF2JHM.js';import'../chunk-W5EDKJK3.js';import'../chunk-QFCGBBSY.js';import'../chunk-SYJC7UAW.js';import'../chunk-MNGGDB2G.js';import'../chunk-5SZUSNGZ.js';import'../chunk-XCFIOTCV.js';
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 +1 @@
1
- 'use strict';var chunkBYZAD3XN_cjs=require('../chunk-BYZAD3XN.cjs');require('../chunk-CN53M4QZ.cjs');Object.defineProperty(exports,"extractFileName",{enumerable:true,get:function(){return chunkBYZAD3XN_cjs.a}});
1
+ 'use strict';var chunkHXTACM3O_cjs=require('../chunk-HXTACM3O.cjs');require('../chunk-LVUSFXQS.cjs');Object.defineProperty(exports,"extractFileName",{enumerable:true,get:function(){return chunkHXTACM3O_cjs.a}});
@@ -1,37 +1,36 @@
1
1
  /** ----------------------------------------------------------
2
- * * ***Extracts the base file name (without extension) from a given URL, file path, or file name.***
2
+ * * ***Utility: `extractFileName`.***
3
3
  * ----------------------------------------------------------
4
- *
5
- * - ✅ Strips known extensions (including multi-part extensions such as `.tar.gz`, `.tar.bz2`, etc.).
6
- * - Handles plain file names, local file paths, and full URLs seamlessly.
7
- * - If the path ends with a `/`, returns an empty string `""` (represents a directory or empty segment).
8
- * - If the input is empty, whitespace, or not a string, returns `undefined`.
9
- * - Leaves unknown or unrecognized extensions intact (does not attempt to strip unknown file extensions).
10
- *
11
- * Behavior summary:
12
- * - `extractFileName("https://example.com/file.txt")` `"file"`
13
- * - `extractFileName("/local/path/image.jpeg")` `"image"`
14
- * - `extractFileName("backup.archive.tar.gz")` `"backup.archive"`
15
- * - `extractFileName("folder/")` `""`
16
- * - `extractFileName("")` `undefined`
17
- * - `extractFileName("unknownfile.weirdext")` `"unknownfile.weirdext"` (keeps unknown extension)
18
- *
4
+ * **Extracts the base file name (without extension) from a given URL, file path, or file name.**
5
+ * - **Behavior:**
6
+ * - Strips known extensions (including multi-part extensions such as `.tar.gz`, `.tar.bz2`, etc.).
7
+ * - Handles plain file names, local file paths, and full URLs seamlessly.
8
+ * - If the path ends with a `/`, returns an empty string `""` (represents a directory or empty segment).
9
+ * - If the input is empty, whitespace, or not a string, returns `undefined`.
10
+ * - Leaves unknown or unrecognized extensions intact (does not attempt to strip unknown file extensions).
11
+ * - **Summary:**
12
+ * - `extractFileName("https://example.com/file.txt")` `"file"`.
13
+ * - `extractFileName("/local/path/image.jpeg")` `"image"`.
14
+ * - `extractFileName("backup.archive.tar.gz")` `"backup.archive"`.
15
+ * - `extractFileName("folder/")` `""`.
16
+ * - `extractFileName("")` `undefined`.
17
+ * - `extractFileName("unknownfile.weirdext")` `"unknownfile.weirdext"`
18
+ * ***(keeps unknown extension)***.
19
+ * @description
19
20
  * This is particularly useful for displaying or logging file names
20
21
  * without cluttering them with redundant extensions, while being careful
21
22
  * not to accidentally truncate unfamiliar formats.
22
- *
23
- * @param {string} url - The URL, file system path, or plain file name to process.
23
+ * @param {string | null | undefined} url - The URL, file system path, or plain file name to process.
24
24
  * @returns {string | undefined} The file name without its extension(s),
25
25
  * or `undefined` if input is invalid,
26
26
  * or an empty string `""` if the path ends with `/`.
27
- *
28
27
  * @example
29
- * extractFileName("document.pdf"); // "document"
30
- * extractFileName("/files/archive.tar.gz"); // "archive"
31
- * extractFileName("https://cdn.site.com/video.mp4"); // "video"
32
- * extractFileName("folder/"); // ""
33
- * extractFileName("strangefile.unknownext"); // "strangefile.unknownext"
34
- * extractFileName(""); // undefined
35
- * extractFileName(123); // undefined
28
+ * extractFileName("document.pdf"); // "document"
29
+ * extractFileName("/files/archive.tar.gz"); // "archive"
30
+ * extractFileName("https://cdn.site.com/video.mp4"); // "video"
31
+ * extractFileName("folder/"); // ""
32
+ * extractFileName("strangefile.unknownext"); // "strangefile.unknownext"
33
+ * extractFileName(""); // undefined
34
+ * extractFileName(123); // undefined
36
35
  */
37
- declare const extractFileName:(url?:string|null)=>string|undefined;export{extractFileName};
36
+ declare const extractFileName:(url:string|null|undefined)=>string|undefined;export{extractFileName};
@@ -1 +1 @@
1
- export{a as extractFileName}from'../chunk-EXZ47NOW.js';import'../chunk-XCFIOTCV.js';
1
+ export{a as extractFileName}from'../chunk-VQLAPEL3.js';import'../chunk-MJAW5RAK.js';
@@ -1 +1 @@
1
- 'use strict';var chunk7NA6DUHR_cjs=require('../chunk-7NA6DUHR.cjs'),chunkFIEZKTAZ_cjs=require('../chunk-FIEZKTAZ.cjs'),chunkD47MHBSD_cjs=require('../chunk-D47MHBSD.cjs'),chunkUUPQI6ND_cjs=require('../chunk-UUPQI6ND.cjs'),chunkKCQDDZJE_cjs=require('../chunk-KCQDDZJE.cjs');require('../chunk-JWHM3WZQ.cjs');var chunkFDITZ5C6_cjs=require('../chunk-FDITZ5C6.cjs'),chunk2TRAPBZ7_cjs=require('../chunk-2TRAPBZ7.cjs');require('../chunk-BVPMMWDL.cjs');var chunkPUQXRLZH_cjs=require('../chunk-PUQXRLZH.cjs'),chunkU5Y2FXMN_cjs=require('../chunk-U5Y2FXMN.cjs'),chunk7YWAQOA4_cjs=require('../chunk-7YWAQOA4.cjs'),chunkCN53M4QZ_cjs=require('../chunk-CN53M4QZ.cjs');Object.defineProperty(exports,"areArraysEqual",{enumerable:true,get:function(){return chunk7NA6DUHR_cjs.a}});Object.defineProperty(exports,"areObjectsEqual",{enumerable:true,get:function(){return chunk7NA6DUHR_cjs.b}});Object.defineProperty(exports,"areURLsEqualPath",{enumerable:true,get:function(){return chunk7NA6DUHR_cjs.c}});Object.defineProperty(exports,"areURLsIdentical",{enumerable:true,get:function(){return chunk7NA6DUHR_cjs.d}});Object.defineProperty(exports,"arrayHasAnyMatch",{enumerable:true,get:function(){return chunk7NA6DUHR_cjs.h}});Object.defineProperty(exports,"doesKeyExist",{enumerable:true,get:function(){return chunk7NA6DUHR_cjs.g}});Object.defineProperty(exports,"isArguments",{enumerable:true,get:function(){return chunk7NA6DUHR_cjs.i}});Object.defineProperty(exports,"isArrayLike",{enumerable:true,get:function(){return chunk7NA6DUHR_cjs.k}});Object.defineProperty(exports,"isArrayLikeObject",{enumerable:true,get:function(){return chunk7NA6DUHR_cjs.l}});Object.defineProperty(exports,"isCurrencyLike",{enumerable:true,get:function(){return chunk7NA6DUHR_cjs.m}});Object.defineProperty(exports,"isDeepEqual",{enumerable:true,get:function(){return chunk7NA6DUHR_cjs.n}});Object.defineProperty(exports,"isElement",{enumerable:true,get:function(){return chunk7NA6DUHR_cjs.o}});Object.defineProperty(exports,"isEmpty",{enumerable:true,get:function(){return chunk7NA6DUHR_cjs.p}});Object.defineProperty(exports,"isEmptyDeep",{enumerable:true,get:function(){return chunk7NA6DUHR_cjs.q}});Object.defineProperty(exports,"isEqualWith",{enumerable:true,get:function(){return chunk7NA6DUHR_cjs.r}});Object.defineProperty(exports,"isLength",{enumerable:true,get:function(){return chunk7NA6DUHR_cjs.j}});Object.defineProperty(exports,"isMatch",{enumerable:true,get:function(){return chunk7NA6DUHR_cjs.t}});Object.defineProperty(exports,"isMatchWith",{enumerable:true,get:function(){return chunk7NA6DUHR_cjs.s}});Object.defineProperty(exports,"isNative",{enumerable:true,get:function(){return chunk7NA6DUHR_cjs.u}});Object.defineProperty(exports,"isObjectLoose",{enumerable:true,get:function(){return chunk7NA6DUHR_cjs.v}});Object.defineProperty(exports,"isSafeInteger",{enumerable:true,get:function(){return chunk7NA6DUHR_cjs.w}});Object.defineProperty(exports,"isValidURL",{enumerable:true,get:function(){return chunk7NA6DUHR_cjs.x}});Object.defineProperty(exports,"isWeakMap",{enumerable:true,get:function(){return chunk7NA6DUHR_cjs.y}});Object.defineProperty(exports,"textContainsAll",{enumerable:true,get:function(){return chunk7NA6DUHR_cjs.e}});Object.defineProperty(exports,"textContainsAny",{enumerable:true,get:function(){return chunk7NA6DUHR_cjs.f}});Object.defineProperty(exports,"isURL",{enumerable:true,get:function(){return chunkFIEZKTAZ_cjs.a}});Object.defineProperty(exports,"isNonEmptyValue",{enumerable:true,get:function(){return chunkD47MHBSD_cjs.a}});Object.defineProperty(exports,"isTypedArray",{enumerable:true,get:function(){return chunkD47MHBSD_cjs.b}});Object.defineProperty(exports,"isEmptyValue",{enumerable:true,get:function(){return chunkUUPQI6ND_cjs.a}});Object.defineProperty(exports,"isArrayBuffer",{enumerable:true,get:function(){return chunkKCQDDZJE_cjs.b}});Object.defineProperty(exports,"isEmptyArray",{enumerable:true,get:function(){return chunkKCQDDZJE_cjs.e}});Object.defineProperty(exports,"isEmptyObject",{enumerable:true,get:function(){return chunkKCQDDZJE_cjs.f}});Object.defineProperty(exports,"isEqual",{enumerable:true,get:function(){return chunkKCQDDZJE_cjs.d}});Object.defineProperty(exports,"isRegExp",{enumerable:true,get:function(){return chunkKCQDDZJE_cjs.a}});Object.defineProperty(exports,"isFinite",{enumerable:true,get:function(){return chunkFDITZ5C6_cjs.a}});Object.defineProperty(exports,"isEmptyString",{enumerable:true,get:function(){return chunk2TRAPBZ7_cjs.a}});Object.defineProperty(exports,"isInteger",{enumerable:true,get:function(){return chunkPUQXRLZH_cjs.a}});Object.defineProperty(exports,"isDate",{enumerable:true,get:function(){return chunkU5Y2FXMN_cjs.b}});Object.defineProperty(exports,"isMap",{enumerable:true,get:function(){return chunkU5Y2FXMN_cjs.a}});Object.defineProperty(exports,"isBigInt",{enumerable:true,get:function(){return chunk7YWAQOA4_cjs.a}});Object.defineProperty(exports,"getPreciseType",{enumerable:true,get:function(){return chunkCN53M4QZ_cjs.E}});Object.defineProperty(exports,"hasOwnProp",{enumerable:true,get:function(){return chunkCN53M4QZ_cjs.o}});Object.defineProperty(exports,"isArray",{enumerable:true,get:function(){return chunkCN53M4QZ_cjs.d}});Object.defineProperty(exports,"isBoolean",{enumerable:true,get:function(){return chunkCN53M4QZ_cjs.a}});Object.defineProperty(exports,"isBuffer",{enumerable:true,get:function(){return chunkCN53M4QZ_cjs.C}});Object.defineProperty(exports,"isError",{enumerable:true,get:function(){return chunkCN53M4QZ_cjs.D}});Object.defineProperty(exports,"isFunction",{enumerable:true,get:function(){return chunkCN53M4QZ_cjs.b}});Object.defineProperty(exports,"isNaN",{enumerable:true,get:function(){return chunkCN53M4QZ_cjs.n}});Object.defineProperty(exports,"isNil",{enumerable:true,get:function(){return chunkCN53M4QZ_cjs.c}});Object.defineProperty(exports,"isNonEmptyArray",{enumerable:true,get:function(){return chunkCN53M4QZ_cjs.r}});Object.defineProperty(exports,"isNonEmptyString",{enumerable:true,get:function(){return chunkCN53M4QZ_cjs.p}});Object.defineProperty(exports,"isNull",{enumerable:true,get:function(){return chunkCN53M4QZ_cjs.g}});Object.defineProperty(exports,"isNumber",{enumerable:true,get:function(){return chunkCN53M4QZ_cjs.i}});Object.defineProperty(exports,"isObject",{enumerable:true,get:function(){return chunkCN53M4QZ_cjs.e}});Object.defineProperty(exports,"isObjectOrArray",{enumerable:true,get:function(){return chunkCN53M4QZ_cjs.l}});Object.defineProperty(exports,"isPlainObject",{enumerable:true,get:function(){return chunkCN53M4QZ_cjs.f}});Object.defineProperty(exports,"isSet",{enumerable:true,get:function(){return chunkCN53M4QZ_cjs.q}});Object.defineProperty(exports,"isString",{enumerable:true,get:function(){return chunkCN53M4QZ_cjs.h}});Object.defineProperty(exports,"isSymbol",{enumerable:true,get:function(){return chunkCN53M4QZ_cjs.j}});Object.defineProperty(exports,"isUndefined",{enumerable:true,get:function(){return chunkCN53M4QZ_cjs.k}});
1
+ 'use strict';var chunkLUVV5KSD_cjs=require('../chunk-LUVV5KSD.cjs'),chunkFIEZKTAZ_cjs=require('../chunk-FIEZKTAZ.cjs'),chunkRHE3M2NJ_cjs=require('../chunk-RHE3M2NJ.cjs'),chunk6SMJMZ7G_cjs=require('../chunk-6SMJMZ7G.cjs'),chunkPFLNHD4B_cjs=require('../chunk-PFLNHD4B.cjs');require('../chunk-D43GV6EF.cjs');var chunkMF5Y5K4N_cjs=require('../chunk-MF5Y5K4N.cjs'),chunk6Q4I2RPC_cjs=require('../chunk-6Q4I2RPC.cjs');require('../chunk-DYRDBYPF.cjs');var chunkPUQXRLZH_cjs=require('../chunk-PUQXRLZH.cjs'),chunkO7SJR4CY_cjs=require('../chunk-O7SJR4CY.cjs'),chunk7YWAQOA4_cjs=require('../chunk-7YWAQOA4.cjs'),chunkLVUSFXQS_cjs=require('../chunk-LVUSFXQS.cjs');Object.defineProperty(exports,"areArraysEqual",{enumerable:true,get:function(){return chunkLUVV5KSD_cjs.a}});Object.defineProperty(exports,"areObjectsEqual",{enumerable:true,get:function(){return chunkLUVV5KSD_cjs.b}});Object.defineProperty(exports,"areURLsEqualPath",{enumerable:true,get:function(){return chunkLUVV5KSD_cjs.c}});Object.defineProperty(exports,"areURLsIdentical",{enumerable:true,get:function(){return chunkLUVV5KSD_cjs.d}});Object.defineProperty(exports,"arrayHasAnyMatch",{enumerable:true,get:function(){return chunkLUVV5KSD_cjs.i}});Object.defineProperty(exports,"doesKeyExist",{enumerable:true,get:function(){return chunkLUVV5KSD_cjs.h}});Object.defineProperty(exports,"isArguments",{enumerable:true,get:function(){return chunkLUVV5KSD_cjs.j}});Object.defineProperty(exports,"isArrayLike",{enumerable:true,get:function(){return chunkLUVV5KSD_cjs.l}});Object.defineProperty(exports,"isArrayLikeObject",{enumerable:true,get:function(){return chunkLUVV5KSD_cjs.m}});Object.defineProperty(exports,"isCurrencyLike",{enumerable:true,get:function(){return chunkLUVV5KSD_cjs.n}});Object.defineProperty(exports,"isDeepEqual",{enumerable:true,get:function(){return chunkLUVV5KSD_cjs.o}});Object.defineProperty(exports,"isElement",{enumerable:true,get:function(){return chunkLUVV5KSD_cjs.p}});Object.defineProperty(exports,"isEmpty",{enumerable:true,get:function(){return chunkLUVV5KSD_cjs.q}});Object.defineProperty(exports,"isEmptyDeep",{enumerable:true,get:function(){return chunkLUVV5KSD_cjs.r}});Object.defineProperty(exports,"isEqualWith",{enumerable:true,get:function(){return chunkLUVV5KSD_cjs.s}});Object.defineProperty(exports,"isLength",{enumerable:true,get:function(){return chunkLUVV5KSD_cjs.k}});Object.defineProperty(exports,"isMatch",{enumerable:true,get:function(){return chunkLUVV5KSD_cjs.u}});Object.defineProperty(exports,"isMatchWith",{enumerable:true,get:function(){return chunkLUVV5KSD_cjs.t}});Object.defineProperty(exports,"isNative",{enumerable:true,get:function(){return chunkLUVV5KSD_cjs.v}});Object.defineProperty(exports,"isObjectLoose",{enumerable:true,get:function(){return chunkLUVV5KSD_cjs.w}});Object.defineProperty(exports,"isPropertyKey",{enumerable:true,get:function(){return chunkLUVV5KSD_cjs.g}});Object.defineProperty(exports,"isSafeInteger",{enumerable:true,get:function(){return chunkLUVV5KSD_cjs.x}});Object.defineProperty(exports,"isValidURL",{enumerable:true,get:function(){return chunkLUVV5KSD_cjs.y}});Object.defineProperty(exports,"isWeakMap",{enumerable:true,get:function(){return chunkLUVV5KSD_cjs.z}});Object.defineProperty(exports,"textContainsAll",{enumerable:true,get:function(){return chunkLUVV5KSD_cjs.e}});Object.defineProperty(exports,"textContainsAny",{enumerable:true,get:function(){return chunkLUVV5KSD_cjs.f}});Object.defineProperty(exports,"isURL",{enumerable:true,get:function(){return chunkFIEZKTAZ_cjs.a}});Object.defineProperty(exports,"isNonEmptyValue",{enumerable:true,get:function(){return chunkRHE3M2NJ_cjs.a}});Object.defineProperty(exports,"isTypedArray",{enumerable:true,get:function(){return chunkRHE3M2NJ_cjs.b}});Object.defineProperty(exports,"isEmptyValue",{enumerable:true,get:function(){return chunk6SMJMZ7G_cjs.a}});Object.defineProperty(exports,"isArrayBuffer",{enumerable:true,get:function(){return chunkPFLNHD4B_cjs.b}});Object.defineProperty(exports,"isEmptyArray",{enumerable:true,get:function(){return chunkPFLNHD4B_cjs.e}});Object.defineProperty(exports,"isEmptyObject",{enumerable:true,get:function(){return chunkPFLNHD4B_cjs.f}});Object.defineProperty(exports,"isEqual",{enumerable:true,get:function(){return chunkPFLNHD4B_cjs.d}});Object.defineProperty(exports,"isRegExp",{enumerable:true,get:function(){return chunkPFLNHD4B_cjs.a}});Object.defineProperty(exports,"isFinite",{enumerable:true,get:function(){return chunkMF5Y5K4N_cjs.a}});Object.defineProperty(exports,"isEmptyString",{enumerable:true,get:function(){return chunk6Q4I2RPC_cjs.a}});Object.defineProperty(exports,"isInteger",{enumerable:true,get:function(){return chunkPUQXRLZH_cjs.a}});Object.defineProperty(exports,"isDate",{enumerable:true,get:function(){return chunkO7SJR4CY_cjs.b}});Object.defineProperty(exports,"isMap",{enumerable:true,get:function(){return chunkO7SJR4CY_cjs.a}});Object.defineProperty(exports,"isBigInt",{enumerable:true,get:function(){return chunk7YWAQOA4_cjs.a}});Object.defineProperty(exports,"getPreciseType",{enumerable:true,get:function(){return chunkLVUSFXQS_cjs.E}});Object.defineProperty(exports,"hasOwnProp",{enumerable:true,get:function(){return chunkLVUSFXQS_cjs.o}});Object.defineProperty(exports,"isArray",{enumerable:true,get:function(){return chunkLVUSFXQS_cjs.d}});Object.defineProperty(exports,"isBoolean",{enumerable:true,get:function(){return chunkLVUSFXQS_cjs.a}});Object.defineProperty(exports,"isBuffer",{enumerable:true,get:function(){return chunkLVUSFXQS_cjs.D}});Object.defineProperty(exports,"isError",{enumerable:true,get:function(){return chunkLVUSFXQS_cjs.C}});Object.defineProperty(exports,"isFunction",{enumerable:true,get:function(){return chunkLVUSFXQS_cjs.b}});Object.defineProperty(exports,"isNaN",{enumerable:true,get:function(){return chunkLVUSFXQS_cjs.h}});Object.defineProperty(exports,"isNil",{enumerable:true,get:function(){return chunkLVUSFXQS_cjs.c}});Object.defineProperty(exports,"isNonEmptyArray",{enumerable:true,get:function(){return chunkLVUSFXQS_cjs.r}});Object.defineProperty(exports,"isNonEmptyString",{enumerable:true,get:function(){return chunkLVUSFXQS_cjs.p}});Object.defineProperty(exports,"isNull",{enumerable:true,get:function(){return chunkLVUSFXQS_cjs.i}});Object.defineProperty(exports,"isNumber",{enumerable:true,get:function(){return chunkLVUSFXQS_cjs.k}});Object.defineProperty(exports,"isObject",{enumerable:true,get:function(){return chunkLVUSFXQS_cjs.e}});Object.defineProperty(exports,"isObjectOrArray",{enumerable:true,get:function(){return chunkLVUSFXQS_cjs.n}});Object.defineProperty(exports,"isPlainObject",{enumerable:true,get:function(){return chunkLVUSFXQS_cjs.f}});Object.defineProperty(exports,"isSet",{enumerable:true,get:function(){return chunkLVUSFXQS_cjs.q}});Object.defineProperty(exports,"isString",{enumerable:true,get:function(){return chunkLVUSFXQS_cjs.g}});Object.defineProperty(exports,"isSymbol",{enumerable:true,get:function(){return chunkLVUSFXQS_cjs.l}});Object.defineProperty(exports,"isUndefined",{enumerable:true,get:function(){return chunkLVUSFXQS_cjs.m}});