@rzl-zone/utils-js 3.7.0 → 3.8.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 (118) hide show
  1. package/README.md +23 -0
  2. package/dist/assertions/index.cjs +1 -1
  3. package/dist/assertions/index.d.ts +8 -8
  4. package/dist/assertions/index.js +1 -1
  5. package/dist/chunk-2VO2CBTU.js +1 -1
  6. package/dist/{chunk-KTQLDIIT.cjs → chunk-3JD53UUH.cjs} +15 -5
  7. package/dist/chunk-3KTD3QDI.js +1 -1
  8. package/dist/chunk-4ACKNPL5.js +1 -1
  9. package/dist/chunk-4ZOXSUXB.js +1 -1
  10. package/dist/{chunk-6PKW4WCT.js → chunk-5IKZ3JDV.js} +20 -8
  11. package/dist/chunk-5NN4ZDE2.cjs +1 -1
  12. package/dist/{chunk-OS5OT5JA.cjs → chunk-5PF7KRCP.cjs} +25 -9
  13. package/dist/{chunk-66WLOZOD.cjs → chunk-6NORJBI6.cjs} +7 -5
  14. package/dist/chunk-6RFNZ2ZZ.cjs +1 -1
  15. package/dist/{chunk-TDPYR5JY.js → chunk-6VA4F6VR.js} +15 -5
  16. package/dist/chunk-6WMB5AJR.js +1 -1
  17. package/dist/chunk-7QQV66RX.cjs +1 -1
  18. package/dist/chunk-7WBMA2VE.cjs +1 -1
  19. package/dist/chunk-7ZNEUWYP.js +1 -1
  20. package/dist/chunk-A3YI6Y2P.js +1 -1
  21. package/dist/{chunk-RMJC3B5P.cjs → chunk-A4H7474O.cjs} +7 -4
  22. package/dist/chunk-AKKM6MOX.cjs +1 -1
  23. package/dist/chunk-ATLFMKAF.cjs +1 -1
  24. package/dist/chunk-B4SDEBN7.cjs +1 -1
  25. package/dist/chunk-B6UIKBHR.cjs +1 -1
  26. package/dist/chunk-BAV5T2E3.cjs +1 -1
  27. package/dist/chunk-BYUT376O.cjs +1 -1
  28. package/dist/chunk-CKUEZF4R.cjs +1 -1
  29. package/dist/chunk-DPLL67OT.js +1 -1
  30. package/dist/chunk-DVMHRLKP.cjs +1 -1
  31. package/dist/chunk-EK7FSI7F.cjs +1 -1
  32. package/dist/chunk-F3WBQKRI.cjs +1 -1
  33. package/dist/chunk-FI76UZRF.js +1 -1
  34. package/dist/chunk-GAJBF6DR.js +1 -1
  35. package/dist/{chunk-K3SONK25.cjs → chunk-HKJZ7K2K.cjs} +165 -14
  36. package/dist/{chunk-QUITZ3GP.js → chunk-I3IXLEEG.js} +25 -9
  37. package/dist/{chunk-VNADVWSJ.js → chunk-JIROTDOU.js} +4 -2
  38. package/dist/chunk-JY4HLZ4W.js +1 -1
  39. package/dist/chunk-K63WO3XA.cjs +1 -1
  40. package/dist/chunk-KHO2SBNA.cjs +1 -1
  41. package/dist/chunk-KPCDDYTZ.js +1 -1
  42. package/dist/{chunk-XFTUHS4Y.js → chunk-KVZ3HL2B.js} +7 -5
  43. package/dist/chunk-L5RDAVVH.js +1 -1
  44. package/dist/chunk-LEX4TQW2.js +1 -1
  45. package/dist/chunk-LIU4S3JA.cjs +1 -1
  46. package/dist/{chunk-R3PBF6F7.cjs → chunk-LVFTN6DK.cjs} +29 -17
  47. package/dist/chunk-NREACG6M.cjs +1 -1
  48. package/dist/chunk-OFBFGFVH.js +1 -1
  49. package/dist/chunk-ONZFBJVW.js +1 -1
  50. package/dist/{chunk-D53CE4BT.js → chunk-P3ST4UZA.js} +6 -3
  51. package/dist/{chunk-WNO3EPYT.js → chunk-PW2VMJLT.js} +4 -2
  52. package/dist/chunk-PZQC3FZY.js +1 -1
  53. package/dist/chunk-QAPYHLHC.cjs +1 -1
  54. package/dist/chunk-QNKGP5DY.js +1 -1
  55. package/dist/{chunk-2CQI36UD.cjs → chunk-RJYWBVGD.cjs} +4 -2
  56. package/dist/{chunk-3LEWQV3R.js → chunk-RRJIRXHS.js} +5 -5
  57. package/dist/{chunk-BG3AS5BU.cjs → chunk-SGCN4ED4.cjs} +4 -2
  58. package/dist/chunk-SLP24LUV.js +302 -0
  59. package/dist/chunk-SZJ7OI4S.js +1 -1
  60. package/dist/chunk-TDYGYHSH.js +1 -1
  61. package/dist/chunk-TFDXRT6D.cjs +1 -1
  62. package/dist/chunk-U5VR4TJN.js +1 -1
  63. package/dist/chunk-UDA26MCU.cjs +1 -1
  64. package/dist/chunk-UKAUXY2U.cjs +1 -1
  65. package/dist/chunk-VCVND6CH.js +1 -1
  66. package/dist/chunk-VJDDGRIK.cjs +1 -1
  67. package/dist/chunk-VJVCXEH7.cjs +1 -1
  68. package/dist/chunk-WVSPXFTY.js +1 -1
  69. package/dist/chunk-YC7AK3KX.cjs +1 -1
  70. package/dist/chunk-YGB2BQPB.cjs +1 -1
  71. package/dist/chunk-YS27V6LS.js +1 -1
  72. package/dist/chunk-YWHHVDT4.js +1 -1
  73. package/dist/chunk-ZN53RM3R.js +1 -1
  74. package/dist/{chunk-KIYALQQF.cjs → chunk-ZW3VYES4.cjs} +5 -5
  75. package/dist/conversions/index.cjs +18 -18
  76. package/dist/conversions/index.d.ts +10 -12
  77. package/dist/conversions/index.js +3 -3
  78. package/dist/events/index.cjs +1 -1
  79. package/dist/events/index.d.ts +9 -9
  80. package/dist/events/index.js +1 -1
  81. package/dist/formatters/index.cjs +12 -12
  82. package/dist/formatters/index.d.ts +19 -24
  83. package/dist/formatters/index.js +2 -2
  84. package/dist/generators/index.cjs +10 -6
  85. package/dist/generators/index.d.ts +155 -26
  86. package/dist/generators/index.js +2 -2
  87. package/dist/index.d.ts +1 -1
  88. package/dist/{isPlainObject-FWmcJF6k.d.ts → isPlainObject-BTPjv6zB.d.ts} +2 -2
  89. package/dist/next/index.cjs +11 -9
  90. package/dist/next/index.d.ts +11 -11
  91. package/dist/next/index.js +5 -3
  92. package/dist/next/server/index.cjs +1 -1
  93. package/dist/next/server/index.d.ts +4 -4
  94. package/dist/next/server/index.js +1 -1
  95. package/dist/operations/index.cjs +6 -6
  96. package/dist/operations/index.d.ts +8 -9
  97. package/dist/operations/index.js +3 -3
  98. package/dist/parsers/index.cjs +1 -1
  99. package/dist/parsers/index.d.ts +1 -1
  100. package/dist/parsers/index.js +1 -1
  101. package/dist/predicates/index.cjs +1 -1
  102. package/dist/predicates/index.d.ts +15 -28
  103. package/dist/predicates/index.js +1 -1
  104. package/dist/promises/index.cjs +4 -4
  105. package/dist/promises/index.d.ts +6 -7
  106. package/dist/promises/index.js +2 -2
  107. package/dist/rzl-utils.global.js +2 -2
  108. package/dist/strings/index.cjs +1 -1
  109. package/dist/strings/index.d.ts +1 -1
  110. package/dist/strings/index.js +1 -1
  111. package/dist/tailwind/index.cjs +10 -10
  112. package/dist/tailwind/index.d.ts +22 -22
  113. package/dist/tailwind/index.js +2 -2
  114. package/dist/urls/index.cjs +9 -9
  115. package/dist/urls/index.d.ts +9 -10
  116. package/dist/urls/index.js +3 -3
  117. package/package.json +1 -1
  118. package/dist/chunk-ABA2ZSBQ.js +0 -152
package/README.md CHANGED
@@ -157,6 +157,29 @@
157
157
 
158
158
  > ***⚠️ Note:*** Starting from version `3.4.0+`, the extra TypeScript types (e.g., `OmitStrict`, `PartialOnly`, etc), have been removed from the package. To use them, you now need to install **[`@rzl-zone/ts-types-plus`](https://www.npmjs.com/package/@rzl-zone/ts-types-plus)** separately.
159
159
 
160
+ ---
161
+
162
+ ### **CDN Usage [@rzl-zone/utils-js](https://www.npmjs.com/package/@rzl-zone/utils-js)**
163
+
164
+ > ⚠️ **Note:**
165
+ > When using the library via CDN in the browser:
166
+ > - Always include first the \<script\> tag before your own scripts when using the CDN version.
167
+ > - Some Node.js-specific utilities may **not** be available, e.g.:
168
+ > - Category utils of `tailwind`, `next`, `next/server`.
169
+ > - Server-only features (like Next.js helpers) will **not** be available.
170
+ > - The global object provided is `RzlUtilsJs`.
171
+ > - The CDN bundle is **~350KB minified**. For production, consider using bundlers or npm packages for smaller size and tree-shaking.
172
+
173
+ #### **Including via CDN**
174
+ ```xml
175
+ <!-- jsDelivr -->
176
+ <script src="https://cdn.jsdelivr.net/npm/@rzl-zone/utils-js@latest"></script>
177
+
178
+ <!-- unpkg -->
179
+ <script src="https://unpkg.com/@rzl-zone/utils-js@latest"></script>
180
+ ```
181
+
182
+
160
183
  ---
161
184
  ### **Hint: Autocomplete Setup (Step by Step)**
162
185
 
@@ -2,7 +2,7 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.7.0.
5
+ * Version: 3.8.0.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
@@ -2,12 +2,12 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.7.0.
5
+ * Version: 3.8.0.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
9
9
  */
10
- import{Prettify,PickStrict}from'@rzl-zone/ts-types-plus';import{G as GetPreciseTypeOptions,I as IsNumberOptions,a as IsPlainObjectResult}from'../isPlainObject-FWmcJF6k.js';
10
+ import{Prettify,PickStrict}from'@rzl-zone/ts-types-plus';import{G as GetPreciseTypeOptions,I as IsNumberOptions,a as IsPlainObjectResult}from'../isPlainObject-BTPjv6zB.js';
11
11
  /** -------------------------------------------------------
12
12
  * * ***Shape of the object passed to custom error message functions.***
13
13
  * -------------------------------------------------------
@@ -99,7 +99,7 @@ message?:OptionsMessageAssertIs;}& PickStrict<GetPreciseTypeOptions,"formatCase"
99
99
  * - `message`: A custom error message (`string` or `function`).
100
100
  * - `formatCase`: Controls type formatting (from `GetPreciseTypeOptions`).
101
101
  * @returns {boolean} Narrows `value` to `boolean` if no error is thrown.
102
- * @throws {TypeError} If the value is not a boolean.
102
+ * @throws **{@link TypeError | `TypeError`}** if the value is not a boolean.
103
103
  * @example
104
104
  * ```ts
105
105
  * // ✅ Simple usage
@@ -158,7 +158,7 @@ declare const assertIsBoolean:(value:unknown,options?:OptionsAssertIs)=>asserts
158
158
  * - `message`: A custom error message (`string` or `function`).
159
159
  * - `formatCase`: Controls type formatting (from `GetPreciseTypeOptions`).
160
160
  * @returns {boolean} Narrows `value` to `bigint` if no error is thrown.
161
- * @throws {TypeError} If the value is not a bigint.
161
+ * @throws **{@link TypeError | `TypeError`}** if the value is not a bigint.
162
162
  * @example
163
163
  * ```ts
164
164
  * // ✅ Simple usage
@@ -219,7 +219,7 @@ declare const assertIsBigInt:(value:unknown,options?:OptionsAssertIs)=>asserts v
219
219
  * - `formatCase`: Controls type formatting (from `GetPreciseTypeOptions`).
220
220
  * - `includeNaN`: Whether to treat `NaN` as valid.
221
221
  * @returns {boolean} Narrows `value` to `number` if no error is thrown.
222
- * @throws {TypeError} If the value is not a number (or is `NaN` when `includeNaN` is `false`).
222
+ * @throws **{@link TypeError | `TypeError`}** if the value is not a number (or is `NaN` when `includeNaN` is `false`).
223
223
  * @example
224
224
  * ```ts
225
225
  * // ✅ Simple usage
@@ -285,7 +285,7 @@ declare const assertIsNumber:(value:unknown,options?:OptionsAssertIsNumber)=>ass
285
285
  * - `message`: A custom error message (`string` or `function`).
286
286
  * - `formatCase`: Controls type formatting (from `GetPreciseTypeOptions`).
287
287
  * @returns {boolean} Narrows `value` to an `array` **(generic support)** if no error is thrown.
288
- * @throws {TypeError} If the value is not an array.
288
+ * @throws **{@link TypeError | `TypeError`}** if the value is not an array.
289
289
  * @example
290
290
  * ```ts
291
291
  * // ✅ Simple usage
@@ -342,7 +342,7 @@ declare function assertIsArray<T extends unknown[]>(value:T,options?:OptionsAsse
342
342
  * - `message`: A custom error message (`string` or `function`).
343
343
  * - `formatCase`: Controls type formatting (from `GetPreciseTypeOptions`).
344
344
  * @returns {boolean} Narrows `value` to a `plain-object` **(generic support)** if no error is thrown.
345
- * @throws {TypeError} If `value` is not a `plain-object`.
345
+ * @throws **{@link TypeError | `TypeError`}** if `value` is not a `plain-object`.
346
346
  * @example
347
347
  * ```ts
348
348
  * // ✅ Simple usage
@@ -401,7 +401,7 @@ declare function assertIsPlainObject<T>(value:T,options?:OptionsAssertIs):assert
401
401
  * - `message`: A custom error message (`string` or `function`).
402
402
  * - `formatCase`: Controls type formatting (from `GetPreciseTypeOptions`).
403
403
  * @returns {boolean} Narrows `value` to `string` if no error is thrown.
404
- * @throws {TypeError} If the value is not a string.
404
+ * @throws **{@link TypeError | `TypeError`}** if the value is not a string.
405
405
  * @example
406
406
  * ```ts
407
407
  * // ✅ Simple usage
@@ -2,7 +2,7 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.7.0.
5
+ * Version: 3.8.0.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
@@ -2,7 +2,7 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.7.0.
5
+ * Version: 3.8.0.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
@@ -2,7 +2,7 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.7.0.
5
+ * Version: 3.8.0.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
@@ -45,7 +45,9 @@ function toStringDeepForce(value, forceToString) {
45
45
  throw new TypeError(
46
46
  `Second parameter \`forceToString\` must be of type \`false\` or \`string\` with value one of "stringOrNumber" | "primitives" | "all", but received: \`${chunkF3WBQKRI_cjs.getPreciseType(
47
47
  forceToString
48
- )}\`, with value: \`${chunkYC7AK3KX_cjs.safeStableStringify(forceToString)}\`.`
48
+ )}\`, with value: \`${chunkYC7AK3KX_cjs.safeStableStringify(forceToString, {
49
+ keepUndefined: true
50
+ })}\`.`
49
51
  );
50
52
  }
51
53
  if (chunkF3WBQKRI_cjs.isNaN(value)) {
@@ -112,7 +114,9 @@ var dedupeArray = (inputArray, options = {}) => {
112
114
  throw new TypeError(
113
115
  `Parameter \`forceToString\` property of the \`options\` (second parameter) must be of type \`false\` or \`string\` with value one of "stringOrNumber" | "primitives" | "all", but received: \`${chunkF3WBQKRI_cjs.getPreciseType(
114
116
  forceToString
115
- )}\`, with value: \`${chunkYC7AK3KX_cjs.safeStableStringify(forceToString)}\`.`
117
+ )}\`, with value: \`${chunkYC7AK3KX_cjs.safeStableStringify(forceToString, {
118
+ keepUndefined: true
119
+ })}\`.`
116
120
  );
117
121
  }
118
122
  chunkF3WBQKRI_cjs.assertIsBoolean(flatten, {
@@ -266,13 +270,19 @@ function removeObjectPaths(object, keysToDelete, deepClone = true) {
266
270
  return {};
267
271
  chunk7WBMA2VE_cjs.assertIsArray(keysToDelete, {
268
272
  message: ({ currentType, validType }) => `Second parameter (\`keysToDelete\`) must be of type \`${validType}\` with value of { key: string, deep?: boolean } plain-object, but received: \`${currentType}\`, with value: \`${chunkYC7AK3KX_cjs.safeStableStringify(
269
- keysToDelete
273
+ keysToDelete,
274
+ {
275
+ keepUndefined: true
276
+ }
270
277
  )}\`.`
271
278
  });
272
279
  if (!keysToDelete.every((k) => chunkF3WBQKRI_cjs.isPlainObject(k) && "key" in k)) {
273
280
  throw new TypeError(
274
281
  `Each element in Second Parameter (\`keysToDelete\`) must be of type \`plain-object\` with at least a "key" property (optionally "deep"), but received: \`${chunkYC7AK3KX_cjs.safeStableStringify(
275
- keysToDelete
282
+ keysToDelete,
283
+ {
284
+ keepUndefined: true
285
+ }
276
286
  )}\`.`
277
287
  );
278
288
  }
@@ -2,7 +2,7 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.7.0.
5
+ * Version: 3.8.0.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
@@ -2,7 +2,7 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.7.0.
5
+ * Version: 3.8.0.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
@@ -2,7 +2,7 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.7.0.
5
+ * Version: 3.8.0.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
@@ -2,7 +2,7 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.7.0.
5
+ * Version: 3.8.0.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
@@ -12,7 +12,7 @@ import { normalizeString } from './chunk-GAJBF6DR.js';
12
12
  import { toStringArrayUnRecursive } from './chunk-TDYGYHSH.js';
13
13
  import { isEmptyValue } from './chunk-PZQC3FZY.js';
14
14
  import { isInteger } from './chunk-WVSPXFTY.js';
15
- import { normalizePathname } from './chunk-WNO3EPYT.js';
15
+ import { normalizePathname } from './chunk-PW2VMJLT.js';
16
16
  import { isEmptyString } from './chunk-JY4HLZ4W.js';
17
17
  import { assertIsArray } from './chunk-6WMB5AJR.js';
18
18
  import { safeStableStringify } from './chunk-2VO2CBTU.js';
@@ -28,7 +28,9 @@ var constructURL = (baseUrl, queryParams, removeParams) => {
28
28
  throw new TypeError(
29
29
  `First parameter (\`baseUrl\`) must be of type an URL instance or a \`string\` and a non empty-string, but received: \`${getPreciseType(
30
30
  baseUrl
31
- )}\`, with current value: \`${safeStableStringify(baseUrl)}\`.`
31
+ )}\`, with current value: \`${safeStableStringify(baseUrl, {
32
+ keepUndefined: true
33
+ })}\`.`
32
34
  );
33
35
  }
34
36
  if (!isUndefined(removeParams)) {
@@ -46,7 +48,9 @@ var constructURL = (baseUrl, queryParams, removeParams) => {
46
48
  throw new TypeError(
47
49
  `Second parameter (\`queryParams\`) must be iterable (like URLSearchParams.entries() or an array of [[string, string | number]...]), but received: \`${getPreciseType(
48
50
  queryParams
49
- )}\`, with value: \`${safeStableStringify(queryParams)}\`.`
51
+ )}\`, with value: \`${safeStableStringify(queryParams, {
52
+ keepUndefined: true
53
+ })}\`.`
50
54
  );
51
55
  }
52
56
  const urlInstance = new URL(baseUrl);
@@ -59,7 +63,9 @@ var constructURL = (baseUrl, queryParams, removeParams) => {
59
63
  throw new TypeError(
60
64
  `Second parameter (\`queryParams\`) must be iterable (like URLSearchParams.entries() or an array of [[string, string | number]...]), but received: \`${getPreciseType(
61
65
  queryParams
62
- )}\`, with value: \`${safeStableStringify(queryParams)}\`.`
66
+ )}\`, with value: \`${safeStableStringify(queryParams, {
67
+ keepUndefined: true
68
+ })}\`.`
63
69
  );
64
70
  }
65
71
  mergedParams.set(key, String(value));
@@ -109,7 +115,9 @@ var getFirstPrefixPathname = (result, defaultValue = "/") => {
109
115
  throw new TypeError(
110
116
  `Second parameter (\`defaultValue\`) must be of type \`string\` and not an \`empty-string\`, but received: \`${getPreciseType(
111
117
  defaultValue
112
- )}\`, with value: \`${safeStableStringify(defaultValue)}\`.`
118
+ )}\`, with value: \`${safeStableStringify(defaultValue, {
119
+ keepUndefined: true
120
+ })}\`.`
113
121
  );
114
122
  }
115
123
  if (isArray(result)) {
@@ -117,7 +125,9 @@ var getFirstPrefixPathname = (result, defaultValue = "/") => {
117
125
  throw new TypeError(
118
126
  `First parameter (\`result\`) must be of type \`string\` or \`array of string\`, but received: \`${getPreciseType(
119
127
  result
120
- )}\`, with value: \`${safeStableStringify(result)}\`.`
128
+ )}\`, with value: \`${safeStableStringify(result, {
129
+ keepUndefined: true
130
+ })}\`.`
121
131
  );
122
132
  }
123
133
  for (const item of result) {
@@ -170,7 +180,9 @@ var getPrefixPathname = (url, base = null, options = {}) => {
170
180
  errors.push(
171
181
  `Parameter \`levels\` property of the \`options\` (second parameter) must be of type \`integer-number\` and minimum is \`0\`, but received: \`${getPreciseType(
172
182
  levels
173
- )}\`, with value: \`${safeStableStringify(levels)}\`.`
183
+ )}\`, with value: \`${safeStableStringify(levels, {
184
+ keepUndefined: true
185
+ })}\`.`
174
186
  );
175
187
  }
176
188
  if (!isBoolean(removeDuplicates)) {
@@ -2,7 +2,7 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.7.0.
5
+ * Version: 3.8.0.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
@@ -2,7 +2,7 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.7.0.
5
+ * Version: 3.8.0.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
@@ -32,7 +32,9 @@ var formatCurrency = (value, options = {}) => {
32
32
  throw new TypeError(
33
33
  `First parameter (\`value\`) must be of type \`string\` or \`primitive-number\`, but received: \`${chunkF3WBQKRI_cjs.getPreciseType(
34
34
  value
35
- )}\`, with value: \`${chunkYC7AK3KX_cjs.safeStableStringify(value)}\`.`
35
+ )}\`, with value: \`${chunkYC7AK3KX_cjs.safeStableStringify(value, {
36
+ keepUndefined: true
37
+ })}\`.`
36
38
  );
37
39
  }
38
40
  chunkF3WBQKRI_cjs.assertIsPlainObject(options, {
@@ -72,21 +74,27 @@ var formatCurrency = (value, options = {}) => {
72
74
  throw new TypeError(
73
75
  `Parameter \`totalDecimal\` property of the \`options\` (second parameter) must be of type \`integer-number\`, but received: \`${chunkF3WBQKRI_cjs.getPreciseType(
74
76
  totalDecimal
75
- )}\`, with value: \`${chunkYC7AK3KX_cjs.safeStableStringify(length)}\`.`
77
+ )}\`, with value: \`${chunkYC7AK3KX_cjs.safeStableStringify(length, {
78
+ keepUndefined: true
79
+ })}\`.`
76
80
  );
77
81
  }
78
82
  if (!(roundedDecimal === false || roundedDecimal === "round" || roundedDecimal === "ceil" || roundedDecimal === "floor")) {
79
83
  throw new TypeError(
80
84
  `Parameter \`roundedDecimal\` property of the \`options\` (second parameter) must be of type \`false\` or \`string\` must be one of "round" | "ceil" | "floor", but received: \`${chunkF3WBQKRI_cjs.getPreciseType(
81
85
  roundedDecimal
82
- )}\`, with value: \`${chunkYC7AK3KX_cjs.safeStableStringify(roundedDecimal)}\`.`
86
+ )}\`, with value: \`${chunkYC7AK3KX_cjs.safeStableStringify(roundedDecimal, {
87
+ keepUndefined: true
88
+ })}\`.`
83
89
  );
84
90
  }
85
91
  if (!(negativeFormat === "abs" || negativeFormat === "brackets" || negativeFormat === "dash" || chunkF3WBQKRI_cjs.isPlainObject(negativeFormat))) {
86
92
  throw new TypeError(
87
93
  `Parameter \`negativeFormat\` property of the \`options\` (second parameter) must be of type \`string\` must be one of "abs" | "brackets" | "dash" or \`plain-object\` type, but received: \`${chunkF3WBQKRI_cjs.getPreciseType(
88
94
  negativeFormat
89
- )}\`, with value: \`${chunkYC7AK3KX_cjs.safeStableStringify(negativeFormat)}\`.`
95
+ )}\`, with value: \`${chunkYC7AK3KX_cjs.safeStableStringify(negativeFormat, {
96
+ keepUndefined: true
97
+ })}\`.`
90
98
  );
91
99
  }
92
100
  const rawNum = chunkF3WBQKRI_cjs.isString(value) ? chunkEK7FSI7F_cjs.parseCurrencyString(value) : value;
@@ -164,7 +172,9 @@ var formatCurrency = (value, options = {}) => {
164
172
  throw new TypeError(
165
173
  `Parameter \`negativeFormat.style\` property of the \`options\` (second parameter) must be of type \`string\` must be of type "abs" | "brackets" | "dash", but received: \`${chunkF3WBQKRI_cjs.getPreciseType(
166
174
  formatStyleNegative
167
- )}\`, with value: \`${chunkYC7AK3KX_cjs.safeStableStringify(formatStyleNegative)}\`.`
175
+ )}\`, with value: \`${chunkYC7AK3KX_cjs.safeStableStringify(formatStyleNegative, {
176
+ keepUndefined: true
177
+ })}\`.`
168
178
  );
169
179
  }
170
180
  switch (formatStyleNegative) {
@@ -357,7 +367,9 @@ var censorEmail = (email, options = {}) => {
357
367
  throw new TypeError(
358
368
  `Parameter \`mode\` property of the \`options\` (second parameter) must be one of "fixed" or "random", but received: \`${chunkF3WBQKRI_cjs.getPreciseType(
359
369
  mode
360
- )}\`, with value: \`${chunkYC7AK3KX_cjs.safeStableStringify(mode)}\`.`
370
+ )}\`, with value: \`${chunkYC7AK3KX_cjs.safeStableStringify(mode, {
371
+ keepUndefined: true
372
+ })}\`.`
361
373
  );
362
374
  }
363
375
  const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
@@ -385,7 +397,9 @@ function chunkString(subject, limiter, options = {}) {
385
397
  throw new TypeError(
386
398
  `Second parameter (\`limiter\`) must be of type \`integer-number\`, but received: \`${chunkF3WBQKRI_cjs.getPreciseType(
387
399
  limiter
388
- )}\`, with value: \`${chunkYC7AK3KX_cjs.safeStableStringify(limiter)}\`.`
400
+ )}\`, with value: \`${chunkYC7AK3KX_cjs.safeStableStringify(limiter, {
401
+ keepUndefined: true
402
+ })}\`.`
389
403
  );
390
404
  }
391
405
  chunkF3WBQKRI_cjs.assertIsPlainObject(options, {
@@ -453,7 +467,9 @@ var truncateString = (text, options = {}) => {
453
467
  throw new TypeError(
454
468
  `Parameter \`length\` property of the \`options\` (second parameter) must be of type \`integer-number\`, but received: \`${chunkF3WBQKRI_cjs.getPreciseType(
455
469
  length2
456
- )}\`, with value: \`${chunkYC7AK3KX_cjs.safeStableStringify(length2)}\`.`
470
+ )}\`, with value: \`${chunkYC7AK3KX_cjs.safeStableStringify(length2, {
471
+ keepUndefined: true
472
+ })}\`.`
457
473
  );
458
474
  }
459
475
  if (length2 < 1) return "";
@@ -2,7 +2,7 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.7.0.
5
+ * Version: 3.8.0.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
@@ -19,11 +19,13 @@ var parseCustomDate = (dateString, format) => {
19
19
  throw new TypeError(
20
20
  `Parameter \`dateString\` and \`format\` must be of type \`string\` and not empty-string, but received: "['dateString': \`${chunkF3WBQKRI_cjs.getPreciseType(
21
21
  dateString
22
- )}\` - (current value: \`${chunkYC7AK3KX_cjs.safeStableStringify(
23
- dateString
24
- )}\`), 'format': \`${chunkF3WBQKRI_cjs.getPreciseType(
22
+ )}\` - (current value: \`${chunkYC7AK3KX_cjs.safeStableStringify(dateString, {
23
+ keepUndefined: true
24
+ })}\`), 'format': \`${chunkF3WBQKRI_cjs.getPreciseType(
25
25
  format
26
- )}\` - (current value: \`${chunkYC7AK3KX_cjs.safeStableStringify(format)}\`)]".`
26
+ )}\` - (current value: \`${chunkYC7AK3KX_cjs.safeStableStringify(format, {
27
+ keepUndefined: true
28
+ })}\`)]".`
27
29
  );
28
30
  }
29
31
  const dateParts = dateString.split(/[-/]/).map(Number);
@@ -2,7 +2,7 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.7.0.
5
+ * Version: 3.8.0.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
@@ -2,7 +2,7 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.7.0.
5
+ * Version: 3.8.0.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
@@ -43,7 +43,9 @@ function toStringDeepForce(value, forceToString) {
43
43
  throw new TypeError(
44
44
  `Second parameter \`forceToString\` must be of type \`false\` or \`string\` with value one of "stringOrNumber" | "primitives" | "all", but received: \`${getPreciseType(
45
45
  forceToString
46
- )}\`, with value: \`${safeStableStringify(forceToString)}\`.`
46
+ )}\`, with value: \`${safeStableStringify(forceToString, {
47
+ keepUndefined: true
48
+ })}\`.`
47
49
  );
48
50
  }
49
51
  if (isNaN(value)) {
@@ -110,7 +112,9 @@ var dedupeArray = (inputArray, options = {}) => {
110
112
  throw new TypeError(
111
113
  `Parameter \`forceToString\` property of the \`options\` (second parameter) must be of type \`false\` or \`string\` with value one of "stringOrNumber" | "primitives" | "all", but received: \`${getPreciseType(
112
114
  forceToString
113
- )}\`, with value: \`${safeStableStringify(forceToString)}\`.`
115
+ )}\`, with value: \`${safeStableStringify(forceToString, {
116
+ keepUndefined: true
117
+ })}\`.`
114
118
  );
115
119
  }
116
120
  assertIsBoolean(flatten, {
@@ -264,13 +268,19 @@ function removeObjectPaths(object, keysToDelete, deepClone = true) {
264
268
  return {};
265
269
  assertIsArray(keysToDelete, {
266
270
  message: ({ currentType, validType }) => `Second parameter (\`keysToDelete\`) must be of type \`${validType}\` with value of { key: string, deep?: boolean } plain-object, but received: \`${currentType}\`, with value: \`${safeStableStringify(
267
- keysToDelete
271
+ keysToDelete,
272
+ {
273
+ keepUndefined: true
274
+ }
268
275
  )}\`.`
269
276
  });
270
277
  if (!keysToDelete.every((k) => isPlainObject(k) && "key" in k)) {
271
278
  throw new TypeError(
272
279
  `Each element in Second Parameter (\`keysToDelete\`) must be of type \`plain-object\` with at least a "key" property (optionally "deep"), but received: \`${safeStableStringify(
273
- keysToDelete
280
+ keysToDelete,
281
+ {
282
+ keepUndefined: true
283
+ }
274
284
  )}\`.`
275
285
  );
276
286
  }
@@ -2,7 +2,7 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.7.0.
5
+ * Version: 3.8.0.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
@@ -2,7 +2,7 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.7.0.
5
+ * Version: 3.8.0.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
@@ -2,7 +2,7 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.7.0.
5
+ * Version: 3.8.0.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
@@ -2,7 +2,7 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.7.0.
5
+ * Version: 3.8.0.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
@@ -2,7 +2,7 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.7.0.
5
+ * Version: 3.8.0.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
@@ -2,14 +2,14 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.7.0.
5
+ * Version: 3.8.0.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
9
9
  */
10
10
  'use strict';
11
11
 
12
- var chunk66WLOZOD_cjs = require('./chunk-66WLOZOD.cjs');
12
+ var chunk6NORJBI6_cjs = require('./chunk-6NORJBI6.cjs');
13
13
  var chunk7QQV66RX_cjs = require('./chunk-7QQV66RX.cjs');
14
14
  var chunkATLFMKAF_cjs = require('./chunk-ATLFMKAF.cjs');
15
15
  var chunk7WBMA2VE_cjs = require('./chunk-7WBMA2VE.cjs');
@@ -59,7 +59,10 @@ var omitKeysDeep = (object, keysToOmit) => {
59
59
  if (chunkF3WBQKRI_cjs.isNonEmptyArray(duplicates)) {
60
60
  throw new Error(
61
61
  `Function "omitKeysDeep" Error: Duplicate keys detected - \`${chunkYC7AK3KX_cjs.safeStableStringify(
62
- duplicates
62
+ duplicates,
63
+ {
64
+ keepUndefined: true
65
+ }
63
66
  )}\`.`
64
67
  );
65
68
  }
@@ -97,7 +100,7 @@ var omitKeysDeep = (object, keysToOmit) => {
97
100
  }
98
101
  return obj;
99
102
  };
100
- const result = chunk66WLOZOD_cjs.safeJsonParse(chunkYC7AK3KX_cjs.safeStableStringify(object));
103
+ const result = chunk6NORJBI6_cjs.safeJsonParse(chunkYC7AK3KX_cjs.safeStableStringify(object));
101
104
  for (const key of keysToOmit) {
102
105
  const parts = key.split(".");
103
106
  omitAtPath(result, parts);
@@ -2,7 +2,7 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.7.0.
5
+ * Version: 3.8.0.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
@@ -2,7 +2,7 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.7.0.
5
+ * Version: 3.8.0.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
@@ -2,7 +2,7 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.7.0.
5
+ * Version: 3.8.0.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
@@ -2,7 +2,7 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.7.0.
5
+ * Version: 3.8.0.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
@@ -2,7 +2,7 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.7.0.
5
+ * Version: 3.8.0.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
@@ -2,7 +2,7 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.7.0.
5
+ * Version: 3.8.0.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
@@ -2,7 +2,7 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.7.0.
5
+ * Version: 3.8.0.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================