@rzl-zone/utils-js 3.5.0 → 3.5.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 (115) hide show
  1. package/LICENSE.md +1 -1
  2. package/dist/assertions/index.cjs +11 -4
  3. package/dist/assertions/index.d.ts +9 -0
  4. package/dist/assertions/index.js +9 -0
  5. package/dist/chunk-2CQX5CBG.js +15 -0
  6. package/dist/chunk-2IOOEY45.cjs +10 -0
  7. package/dist/chunk-2WA36TC5.cjs +13 -0
  8. package/dist/chunk-3IBQ5MOM.js +10 -0
  9. package/dist/chunk-3VA554KW.js +11 -0
  10. package/dist/chunk-5757UBXJ.cjs +13 -0
  11. package/dist/chunk-5IGC6PBH.js +11 -0
  12. package/dist/chunk-5KJFVIQT.cjs +10 -0
  13. package/dist/chunk-6JFCSH7J.js +11 -0
  14. package/dist/chunk-6JFZL7YE.cjs +10 -0
  15. package/dist/chunk-7ODAAXX5.cjs +36 -0
  16. package/dist/chunk-BAV5T2E3.cjs +10 -0
  17. package/dist/chunk-CAH33WOQ.cjs +11 -0
  18. package/dist/chunk-CDCERIZ2.js +13 -0
  19. package/dist/chunk-CKTLUNWX.js +10 -0
  20. package/dist/chunk-CMW2TBOQ.js +45 -0
  21. package/dist/chunk-D3ENH7H6.cjs +14 -0
  22. package/dist/chunk-DEZZUYE2.js +13 -0
  23. package/dist/chunk-DVMHRLKP.cjs +10 -0
  24. package/dist/chunk-DWF2R5GD.cjs +13 -0
  25. package/dist/chunk-E55EQK2U.cjs +10 -0
  26. package/dist/chunk-E74U6CYP.cjs +10 -0
  27. package/dist/chunk-EL6A35UR.cjs +13 -0
  28. package/dist/chunk-F6IPNNSJ.cjs +23 -0
  29. package/dist/chunk-FJZGG54N.cjs +15 -0
  30. package/dist/chunk-FWCKOJZM.js +23 -0
  31. package/dist/chunk-FWHNWL2P.cjs +10 -0
  32. package/dist/chunk-GGEADHZO.js +12 -0
  33. package/dist/chunk-GQR4R5WY.js +10 -0
  34. package/dist/chunk-H66AC7GK.cjs +12 -0
  35. package/dist/chunk-HQWOFR56.cjs +10 -0
  36. package/dist/chunk-HYRQMTRH.cjs +10 -0
  37. package/dist/chunk-IRFL4MAX.js +10 -0
  38. package/dist/chunk-IVL7CKVH.cjs +11 -0
  39. package/dist/chunk-IZPBKKPO.js +10 -0
  40. package/dist/chunk-JBQMXC5I.cjs +13 -0
  41. package/dist/chunk-JEQEF5WD.js +14 -0
  42. package/dist/chunk-JMJQCN74.js +36 -0
  43. package/dist/chunk-KHO2SBNA.cjs +10 -0
  44. package/dist/chunk-KVAL5PAG.cjs +10 -0
  45. package/dist/chunk-L5RDAVVH.js +9 -0
  46. package/dist/chunk-LS6U7FAY.cjs +12 -0
  47. package/dist/chunk-NBZWMBO6.js +13 -0
  48. package/dist/chunk-NRF6LWBC.cjs +11 -0
  49. package/dist/chunk-OI5XKNZO.js +11 -0
  50. package/dist/chunk-ONZFBJVW.js +9 -0
  51. package/dist/chunk-OYTYSY7G.js +12 -0
  52. package/dist/chunk-PET42Z7W.js +12 -0
  53. package/dist/chunk-PZQ6I4JJ.cjs +46 -0
  54. package/dist/chunk-QBKAEVYG.js +11 -0
  55. package/dist/chunk-QNKGP5DY.js +9 -0
  56. package/dist/chunk-RIPKY4RU.js +10 -0
  57. package/dist/chunk-RZW35UN5.cjs +11 -0
  58. package/dist/chunk-SBFNXGTJ.js +13 -0
  59. package/dist/chunk-SBKGWRS5.js +10 -0
  60. package/dist/chunk-SIM77PU4.js +13 -0
  61. package/dist/chunk-T2T7K3KR.js +10 -0
  62. package/dist/chunk-T7PU2V7X.cjs +12 -0
  63. package/dist/chunk-UDA26MCU.cjs +10 -0
  64. package/dist/chunk-V45XJKHW.cjs +10 -0
  65. package/dist/chunk-VJDDGRIK.cjs +10 -0
  66. package/dist/chunk-W2WNBUDE.js +10 -0
  67. package/dist/chunk-WVSPXFTY.js +9 -0
  68. package/dist/chunk-XABCB3Y7.cjs +19 -0
  69. package/dist/chunk-XEDXFSGI.js +10 -0
  70. package/dist/chunk-YKPSRP5G.js +19 -0
  71. package/dist/chunk-YWHHVDT4.js +9 -0
  72. package/dist/chunk-ZETAZZLD.cjs +11 -0
  73. package/dist/conversions/index.cjs +11 -4
  74. package/dist/conversions/index.d.ts +9 -0
  75. package/dist/conversions/index.js +9 -0
  76. package/dist/events/index.cjs +11 -4
  77. package/dist/events/index.d.ts +9 -0
  78. package/dist/events/index.js +9 -0
  79. package/dist/formatters/index.cjs +11 -4
  80. package/dist/formatters/index.d.ts +9 -0
  81. package/dist/formatters/index.js +9 -0
  82. package/dist/generators/index.cjs +11 -4
  83. package/dist/generators/index.d.ts +9 -0
  84. package/dist/generators/index.js +9 -0
  85. package/dist/index.d.ts +34 -11
  86. package/dist/isPlainObject-FWmcJF6k.d.ts +9 -0
  87. package/dist/next/index.cjs +13 -0
  88. package/dist/next/index.d.ts +9 -0
  89. package/dist/next/index.js +13 -0
  90. package/dist/next/server/index.cjs +9 -0
  91. package/dist/next/server/index.d.ts +9 -0
  92. package/dist/next/server/index.js +9 -0
  93. package/dist/operations/index.cjs +11 -4
  94. package/dist/operations/index.d.ts +9 -0
  95. package/dist/operations/index.js +9 -0
  96. package/dist/parsers/index.cjs +11 -4
  97. package/dist/parsers/index.d.ts +9 -0
  98. package/dist/parsers/index.js +9 -0
  99. package/dist/predicates/index.cjs +11 -4
  100. package/dist/predicates/index.d.ts +9 -0
  101. package/dist/predicates/index.js +9 -0
  102. package/dist/promises/index.cjs +11 -4
  103. package/dist/promises/index.d.ts +9 -0
  104. package/dist/promises/index.js +9 -0
  105. package/dist/rzl-utils.global.js +23 -14
  106. package/dist/strings/index.cjs +11 -4
  107. package/dist/strings/index.d.ts +9 -0
  108. package/dist/strings/index.js +9 -0
  109. package/dist/tailwind/index.cjs +11 -4
  110. package/dist/tailwind/index.d.ts +9 -0
  111. package/dist/tailwind/index.js +9 -0
  112. package/dist/urls/index.cjs +11 -4
  113. package/dist/urls/index.d.ts +9 -0
  114. package/dist/urls/index.js +9 -0
  115. package/package.json +50 -166
@@ -1,11 +1,23 @@
1
+ /*!
2
+ * ====================================================
3
+ * Rzl Utils-JS.
4
+ * ----------------------------------------------------
5
+ * Version: 3.5.2.
6
+ * Author: Rizalvin Dwiky.
7
+ * Repository: https://github.com/rzl-zone/utils-js.
8
+ * ====================================================
9
+ */
1
10
  import { isDate, isMap } from './chunk-PET42Z7W.js';
2
11
  import { isObjectOrArray, isError, isSet, isArray, isUndefined } from './chunk-CMW2TBOQ.js';
12
+
3
13
  var isRegExp = (value) => {
4
14
  return value instanceof RegExp;
5
15
  };
16
+
6
17
  function isArrayBuffer(value) {
7
18
  return value instanceof ArrayBuffer;
8
19
  }
20
+
9
21
  function baseDeepEqual(value, other, customizer, seen = /* @__PURE__ */ new WeakMap()) {
10
22
  if (value === other) return true;
11
23
  if (value !== value && other !== other) return true;
@@ -81,6 +93,7 @@ function baseDeepEqual(value, other, customizer, seen = /* @__PURE__ */ new Weak
81
93
  }
82
94
  return true;
83
95
  }
96
+
84
97
  function isEqual(value, other) {
85
98
  return baseDeepEqual(value, other, void 0, /* @__PURE__ */ new WeakMap());
86
99
  }
@@ -1,9 +1,19 @@
1
+ /*!
2
+ * ====================================================
3
+ * Rzl Utils-JS.
4
+ * ----------------------------------------------------
5
+ * Version: 3.5.2.
6
+ * Author: Rizalvin Dwiky.
7
+ * Repository: https://github.com/rzl-zone/utils-js.
8
+ * ====================================================
9
+ */
1
10
  'use strict';
2
11
 
3
12
  var chunkV45XJKHW_cjs = require('./chunk-V45XJKHW.cjs');
4
13
  var chunkZETAZZLD_cjs = require('./chunk-ZETAZZLD.cjs');
5
14
  var chunkUDA26MCU_cjs = require('./chunk-UDA26MCU.cjs');
6
15
  var chunkPZQ6I4JJ_cjs = require('./chunk-PZQ6I4JJ.cjs');
16
+
7
17
  function filterNilArray(input) {
8
18
  if (chunkPZQ6I4JJ_cjs.isNil(input)) return void 0;
9
19
  if (!chunkPZQ6I4JJ_cjs.isArray(input)) return [];
@@ -22,6 +32,7 @@ function filterNilArray(input) {
22
32
  }, []);
23
33
  return filtered;
24
34
  }
35
+
25
36
  function toStringArrayUnRecursive(array, options = {}) {
26
37
  chunkPZQ6I4JJ_cjs.assertIsPlainObject(options, {
27
38
  message: ({ currentType, validType }) => `Second parameter (\`options\`) must be of type \`${validType}\`, but received: \`${currentType}\`.`
@@ -1,7 +1,17 @@
1
+ /*!
2
+ * ====================================================
3
+ * Rzl Utils-JS.
4
+ * ----------------------------------------------------
5
+ * Version: 3.5.2.
6
+ * Author: Rizalvin Dwiky.
7
+ * Repository: https://github.com/rzl-zone/utils-js.
8
+ * ====================================================
9
+ */
1
10
  import { isFinite } from './chunk-3IBQ5MOM.js';
2
11
  import { isEmptyArray } from './chunk-6JFCSH7J.js';
3
12
  import { isBigInt } from './chunk-QNKGP5DY.js';
4
13
  import { isNil, isArray, assertIsPlainObject, hasOwnProp, assertIsBoolean, isString, isBoolean, isNull } from './chunk-CMW2TBOQ.js';
14
+
5
15
  function filterNilArray(input) {
6
16
  if (isNil(input)) return void 0;
7
17
  if (!isArray(input)) return [];
@@ -20,6 +30,7 @@ function filterNilArray(input) {
20
30
  }, []);
21
31
  return filtered;
22
32
  }
33
+
23
34
  function toStringArrayUnRecursive(array, options = {}) {
24
35
  assertIsPlainObject(options, {
25
36
  message: ({ currentType, validType }) => `Second parameter (\`options\`) must be of type \`${validType}\`, but received: \`${currentType}\`.`
@@ -1,3 +1,12 @@
1
+ /*!
2
+ * ====================================================
3
+ * Rzl Utils-JS.
4
+ * ----------------------------------------------------
5
+ * Version: 3.5.2.
6
+ * Author: Rizalvin Dwiky.
7
+ * Repository: https://github.com/rzl-zone/utils-js.
8
+ * ====================================================
9
+ */
1
10
  var isURL = (value) => {
2
11
  return value instanceof URL;
3
12
  };
@@ -1,9 +1,19 @@
1
+ /*!
2
+ * ====================================================
3
+ * Rzl Utils-JS.
4
+ * ----------------------------------------------------
5
+ * Version: 3.5.2.
6
+ * Author: Rizalvin Dwiky.
7
+ * Repository: https://github.com/rzl-zone/utils-js.
8
+ * ====================================================
9
+ */
1
10
  import { safeJsonParse } from './chunk-2CQX5CBG.js';
2
11
  import { isEqual } from './chunk-NBZWMBO6.js';
3
12
  import { isEmptyArray } from './chunk-6JFCSH7J.js';
4
13
  import { assertIsArray } from './chunk-CKTLUNWX.js';
5
14
  import { safeStableStringify } from './chunk-PET42Z7W.js';
6
15
  import { isPlainObject, isNonEmptyArray, isObjectOrArray, isArray, isNaN, isUndefined } from './chunk-CMW2TBOQ.js';
16
+
7
17
  var findDuplicates = (values) => {
8
18
  assertIsArray(values, {
9
19
  message: ({ currentType, validType }) => `First parameter (\`values\`) must be of type \`${validType}\` (array literal or instance), but received: \`${currentType}\`.`
@@ -21,6 +31,7 @@ var findDuplicates = (values) => {
21
31
  });
22
32
  return duplicates;
23
33
  };
34
+
24
35
  var omitKeys = (object, keysToOmit) => {
25
36
  if (!isPlainObject(object)) return {};
26
37
  assertIsArray(keysToOmit, {
@@ -36,6 +47,7 @@ var omitKeys = (object, keysToOmit) => {
36
47
  Object.entries(object).filter(([key]) => !keysToOmit.includes(key))
37
48
  );
38
49
  };
50
+
39
51
  var omitKeysDeep = (object, keysToOmit) => {
40
52
  if (!isPlainObject(object)) return {};
41
53
  assertIsArray(keysToOmit, {
@@ -1,8 +1,19 @@
1
+ /*!
2
+ * ====================================================
3
+ * Rzl Utils-JS.
4
+ * ----------------------------------------------------
5
+ * Version: 3.5.2.
6
+ * Author: Rizalvin Dwiky.
7
+ * Repository: https://github.com/rzl-zone/utils-js.
8
+ * ====================================================
9
+ */
1
10
  import { isBigInt } from './chunk-QNKGP5DY.js';
2
11
  import { assertIsPlainObject, isPlainObject, isBoolean, isNaN, hasOwnProp, getPreciseType, isUndefined, isNumberObject, isInfinityNumber, isStringObject, isBooleanObject, isFunction, isSymbol, isObjectOrArray, isSet, isArray, isNull, isNumber, isObject } from './chunk-CMW2TBOQ.js';
12
+
3
13
  function isMap(value) {
4
14
  return Object.prototype.toString.call(value) === "[object Map]" || value instanceof Map;
5
15
  }
16
+
6
17
  var isDate = (value, options = {}) => {
7
18
  assertIsPlainObject(options, {
8
19
  message: ({ currentType, validType }) => `Second parameter (\`options\`) must be of type \`${validType}\`, but received: \`${currentType}\`.`
@@ -12,6 +23,7 @@ var isDate = (value, options = {}) => {
12
23
  if (skipInvalidDate) return instanceDate;
13
24
  return instanceDate && !isNaN(value.getTime());
14
25
  };
26
+
15
27
  var safeStableStringify = (value, options = {}) => {
16
28
  assertIsPlainObject(options, {
17
29
  message: ({ currentType, validType }) => `Second parameter (\`options\`) must be of type \`${validType}\`, but received: \`${currentType}\`.`
@@ -1,34 +1,54 @@
1
+ /*!
2
+ * ====================================================
3
+ * Rzl Utils-JS.
4
+ * ----------------------------------------------------
5
+ * Version: 3.5.2.
6
+ * Author: Rizalvin Dwiky.
7
+ * Repository: https://github.com/rzl-zone/utils-js.
8
+ * ====================================================
9
+ */
1
10
  'use strict';
11
+
2
12
  var isBoolean = (value) => {
3
13
  return typeof value === "boolean";
4
14
  };
15
+
5
16
  var isFunction = (value) => {
6
17
  return typeof value === "function";
7
18
  };
19
+
8
20
  function isNil(value) {
9
21
  return value == null;
10
22
  }
23
+
11
24
  function isArray(value) {
12
25
  return Array.isArray(value);
13
26
  }
27
+
14
28
  function isObject(value) {
15
29
  return typeof value === "object" && !isNil(value) && !isArray(value);
16
30
  }
31
+
17
32
  function isPlainObject(value) {
18
33
  if (!isObject(value)) return false;
19
34
  const proto = Object.getPrototypeOf(value);
20
35
  return proto === Object.prototype || proto === null;
21
36
  }
37
+
22
38
  var isString = (value) => {
23
39
  return typeof value === "string";
24
40
  };
41
+
25
42
  function isNumberObject(value) {
26
43
  return isObject(value) && Object.prototype.toString.call(value) === "[object Number]";
27
44
  }
45
+
28
46
  function isNaN(value) {
29
47
  return typeof value === "number" ? Number.isNaN(value) : isNumberObject(value) && Number.isNaN(value.valueOf());
30
48
  }
49
+
31
50
  var isNull = (val) => val === null;
51
+
32
52
  var assertIsBoolean = (value, options = {}) => {
33
53
  if (isBoolean(value)) return;
34
54
  const errorMessage = resolveErrorMessageAssertions({
@@ -38,6 +58,7 @@ var assertIsBoolean = (value, options = {}) => {
38
58
  });
39
59
  throw new TypeError(errorMessage);
40
60
  };
61
+
41
62
  var isNumber = (value, options = {}) => {
42
63
  assertIsPlainObject(options, {
43
64
  message: ({ currentType, validType: validType2 }) => `Second parameter (\`options\`) must be of type \`${validType2}\`, but received: \`${currentType}\`.`
@@ -49,15 +70,19 @@ var isNumber = (value, options = {}) => {
49
70
  const aNumber = typeof value === "number";
50
71
  return includeNaN ? aNumber : aNumber && !Number.isNaN(value);
51
72
  };
73
+
52
74
  var isSymbol = (value) => {
53
75
  return typeof value === "symbol";
54
76
  };
77
+
55
78
  var isUndefined = (value) => {
56
79
  return typeof value === "undefined";
57
80
  };
81
+
58
82
  function isObjectOrArray(value) {
59
83
  return isArray(value) || isObject(value);
60
84
  }
85
+
61
86
  function hasOwnProp(obj, key, options = {}) {
62
87
  if (!isString(obj) && !isObjectOrArray(obj) && !isFunction(obj)) return false;
63
88
  assertIsPlainObject(options, {
@@ -110,6 +135,7 @@ function hasOwnProp(obj, key, options = {}) {
110
135
  if (discardNull && isNull(current)) return false;
111
136
  return true;
112
137
  }
138
+
113
139
  var isNonEmptyString = (value, options = {}) => {
114
140
  if (!isString(value)) return false;
115
141
  assertIsPlainObject(options, {
@@ -122,18 +148,23 @@ var isNonEmptyString = (value, options = {}) => {
122
148
  const str = trim ? value.trim() : value;
123
149
  return str.length > 0;
124
150
  };
151
+
125
152
  var isError = (error) => {
126
153
  return Object.prototype.toString.call(error) === "[object Error]" || error instanceof Error;
127
154
  };
155
+
128
156
  var isBuffer = (value) => {
129
157
  return typeof Buffer !== "undefined" && typeof Buffer.isBuffer === "function" && Buffer.isBuffer(value);
130
158
  };
159
+
131
160
  function isStringObject(value) {
132
161
  return isObject(value) && Object.prototype.toString.call(value) === "[object String]";
133
162
  }
163
+
134
164
  function isBooleanObject(value) {
135
165
  return isObject(value) && Object.prototype.toString.call(value) === "[object Boolean]";
136
166
  }
167
+
137
168
  function isInfinityNumber(value) {
138
169
  if (typeof value === "number" || isNumberObject(value)) {
139
170
  const num = Number(value);
@@ -141,6 +172,7 @@ function isInfinityNumber(value) {
141
172
  }
142
173
  return false;
143
174
  }
175
+
144
176
  var __internalAcronyms__ = Object.freeze([
145
177
  "URI",
146
178
  "URL",
@@ -294,12 +326,15 @@ var FIXES_RAW = {
294
326
  intersectionobserver: "Intersection Observer",
295
327
  resizeobserver: "Resize Observer"
296
328
  };
329
+
297
330
  function isNonEmptyArray(value) {
298
331
  return Array.isArray(value) && value.length > 0;
299
332
  }
333
+
300
334
  function isSet(value) {
301
335
  return Object.prototype.toString.call(value) === "[object Set]" || value instanceof Set;
302
336
  }
337
+
303
338
  var validateCaseInputWordsCase = (input) => {
304
339
  let result = "";
305
340
  if (isArray(input)) {
@@ -334,6 +369,7 @@ var validateCaseIgnoreWordsCase = (ignoreWord) => {
334
369
  }
335
370
  return result;
336
371
  };
372
+
337
373
  var slugify = (input, ignoreWord) => {
338
374
  if (!isNonEmptyArray(input) && !isNonEmptyString(input)) return "";
339
375
  const wordsValidated = validateCaseInputWordsCase(input);
@@ -344,6 +380,7 @@ var slugify = (input, ignoreWord) => {
344
380
  }).join("-");
345
381
  return slug.replace(/^-+|-+$/g, "");
346
382
  };
383
+
347
384
  var toDotCase = (input, ignoreWord) => {
348
385
  if (!isNonEmptyArray(input) && !isNonEmptyString(input)) return "";
349
386
  const wordsValidated = validateCaseInputWordsCase(input);
@@ -353,6 +390,7 @@ var toDotCase = (input, ignoreWord) => {
353
390
  return word.toLowerCase();
354
391
  }).join(".");
355
392
  };
393
+
356
394
  var toCamelCase = (input, ignoreWord) => {
357
395
  if (!isNonEmptyArray(input) && !isNonEmptyString(input)) return "";
358
396
  const wordsValidated = validateCaseInputWordsCase(input);
@@ -362,6 +400,7 @@ var toCamelCase = (input, ignoreWord) => {
362
400
  return index === 0 ? word.toLowerCase() : word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();
363
401
  }).join("");
364
402
  };
403
+
365
404
  var toKebabCase = (input, ignoreWord) => {
366
405
  if (!isNonEmptyArray(input) && !isNonEmptyString(input)) return "";
367
406
  const wordsValidated = validateCaseInputWordsCase(input);
@@ -371,6 +410,7 @@ var toKebabCase = (input, ignoreWord) => {
371
410
  return word.toLowerCase();
372
411
  }).join("-");
373
412
  };
413
+
374
414
  var toSnakeCase = (input, ignoreWord) => {
375
415
  if (!isNonEmptyArray(input) && !isNonEmptyString(input)) return "";
376
416
  const wordsValidated = validateCaseInputWordsCase(input);
@@ -380,6 +420,7 @@ var toSnakeCase = (input, ignoreWord) => {
380
420
  return word.toLowerCase();
381
421
  }).join("_");
382
422
  };
423
+
383
424
  var toLowerCase = (input, ignoreWord) => {
384
425
  if (!isNonEmptyArray(input) && !isNonEmptyString(input)) return "";
385
426
  const wordsValidated = validateCaseInputWordsCase(input);
@@ -389,6 +430,7 @@ var toLowerCase = (input, ignoreWord) => {
389
430
  return word.toLowerCase();
390
431
  }).join(" ");
391
432
  };
433
+
392
434
  var toPascalCase = (input, ignoreWord) => {
393
435
  if (!isNonEmptyArray(input) && !isNonEmptyString(input)) return "";
394
436
  const wordsValidated = validateCaseInputWordsCase(input);
@@ -398,6 +440,7 @@ var toPascalCase = (input, ignoreWord) => {
398
440
  return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();
399
441
  }).join("");
400
442
  };
443
+
401
444
  var toPascalCaseSpace = (input, ignoreWord) => {
402
445
  if (!isNonEmptyArray(input) && !isNonEmptyString(input)) return "";
403
446
  const wordsValidated = validateCaseInputWordsCase(input);
@@ -407,6 +450,7 @@ var toPascalCaseSpace = (input, ignoreWord) => {
407
450
  return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();
408
451
  }).join(" ");
409
452
  };
453
+
410
454
  var normalizeKey = (k) => k.replace(/[\s_\-]+/g, "").toLowerCase();
411
455
  var FIXES = Object.entries(FIXES_RAW).reduce((acc, [k, v]) => {
412
456
  acc[normalizeKey(k)] = v;
@@ -496,6 +540,7 @@ var getPreciseType = (value, options = { formatCase: "toLowerCase" }) => {
496
540
  }
497
541
  return converterHelper(tag, formatCase);
498
542
  };
543
+
499
544
  Object.values({
500
545
  ...FIXES_RAW,
501
546
  plainobject: "Plain Object"
@@ -510,6 +555,7 @@ function resolveErrorMessageAssertions(params) {
510
555
  const errorMessage = isFunction(message) ? isNonEmptyString(message(messageFnOptions)) ? message(messageFnOptions).trim() : defaultMessage : isNonEmptyString(message) ? message.trim() : defaultMessage;
511
556
  return errorMessage;
512
557
  }
558
+
513
559
  function assertIsPlainObject(value, options = {}) {
514
560
  if (isPlainObject(value)) return;
515
561
  const errorMessage = resolveErrorMessageAssertions({
@@ -1,6 +1,16 @@
1
+ /*!
2
+ * ====================================================
3
+ * Rzl Utils-JS.
4
+ * ----------------------------------------------------
5
+ * Version: 3.5.2.
6
+ * Author: Rizalvin Dwiky.
7
+ * Repository: https://github.com/rzl-zone/utils-js.
8
+ * ====================================================
9
+ */
1
10
  import { isInteger } from './chunk-WVSPXFTY.js';
2
11
  import { safeStableStringify } from './chunk-PET42Z7W.js';
3
12
  import { getPreciseType, isNull } from './chunk-CMW2TBOQ.js';
13
+
4
14
  var CustomPromise = class extends Promise {
5
15
  _value;
6
16
  _error;
@@ -52,6 +62,7 @@ var CustomPromise = class extends Promise {
52
62
  return this;
53
63
  }
54
64
  };
65
+
55
66
  var AbortError = class extends Error {
56
67
  constructor(message = "The operation was aborted", name = "AbortError") {
57
68
  super(message);
@@ -1,3 +1,12 @@
1
+ /*!
2
+ * ====================================================
3
+ * Rzl Utils-JS.
4
+ * ----------------------------------------------------
5
+ * Version: 3.5.2.
6
+ * Author: Rizalvin Dwiky.
7
+ * Repository: https://github.com/rzl-zone/utils-js.
8
+ * ====================================================
9
+ */
1
10
  var isBigInt = (value) => {
2
11
  return typeof value === "bigint";
3
12
  };
@@ -1,4 +1,14 @@
1
+ /*!
2
+ * ====================================================
3
+ * Rzl Utils-JS.
4
+ * ----------------------------------------------------
5
+ * Version: 3.5.2.
6
+ * Author: Rizalvin Dwiky.
7
+ * Repository: https://github.com/rzl-zone/utils-js.
8
+ * ====================================================
9
+ */
1
10
  import { isNonEmptyString } from './chunk-CMW2TBOQ.js';
11
+
2
12
  var KNOWN_EXTENSIONS = /* @__PURE__ */ new Set([
3
13
  // 📄 Text & Document
4
14
  "txt",
@@ -1,8 +1,18 @@
1
+ /*!
2
+ * ====================================================
3
+ * Rzl Utils-JS.
4
+ * ----------------------------------------------------
5
+ * Version: 3.5.2.
6
+ * Author: Rizalvin Dwiky.
7
+ * Repository: https://github.com/rzl-zone/utils-js.
8
+ * ====================================================
9
+ */
1
10
  'use strict';
2
11
 
3
12
  var chunkDVMHRLKP_cjs = require('./chunk-DVMHRLKP.cjs');
4
13
  var chunkT7PU2V7X_cjs = require('./chunk-T7PU2V7X.cjs');
5
14
  var chunkPZQ6I4JJ_cjs = require('./chunk-PZQ6I4JJ.cjs');
15
+
6
16
  var CustomPromise = class extends Promise {
7
17
  _value;
8
18
  _error;
@@ -54,6 +64,7 @@ var CustomPromise = class extends Promise {
54
64
  return this;
55
65
  }
56
66
  };
67
+
57
68
  var AbortError = class extends Error {
58
69
  constructor(message = "The operation was aborted", name = "AbortError") {
59
70
  super(message);
@@ -1,3 +1,12 @@
1
+ /*!
2
+ * ====================================================
3
+ * Rzl Utils-JS.
4
+ * ----------------------------------------------------
5
+ * Version: 3.5.2.
6
+ * Author: Rizalvin Dwiky.
7
+ * Repository: https://github.com/rzl-zone/utils-js.
8
+ * ====================================================
9
+ */
1
10
  import { isURL } from './chunk-ONZFBJVW.js';
2
11
  import { normalizeString } from './chunk-IZPBKKPO.js';
3
12
  import { toStringArrayUnRecursive } from './chunk-OI5XKNZO.js';
@@ -8,6 +17,7 @@ import { isEmptyString } from './chunk-W2WNBUDE.js';
8
17
  import { assertIsArray } from './chunk-CKTLUNWX.js';
9
18
  import { safeStableStringify } from './chunk-PET42Z7W.js';
10
19
  import { isString, getPreciseType, isUndefined, isNonEmptyString, isFunction, isNumber, isError, isArray, isNil, isNull, isPlainObject, isBoolean, isNonEmptyArray } from './chunk-CMW2TBOQ.js';
20
+
11
21
  var constructURL = (baseUrl, queryParams, removeParams) => {
12
22
  if (isString(baseUrl)) {
13
23
  if (isEmptyString(baseUrl)) {
@@ -71,6 +81,7 @@ var constructURL = (baseUrl, queryParams, removeParams) => {
71
81
  );
72
82
  }
73
83
  };
84
+
74
85
  var extractURLs = (url) => {
75
86
  if (!isNonEmptyString(url)) return null;
76
87
  let decoded;
@@ -92,6 +103,7 @@ var extractURLs = (url) => {
92
103
  });
93
104
  return cleaned.length ? cleaned : null;
94
105
  };
106
+
95
107
  var getFirstPrefixPathname = (result, defaultValue = "/") => {
96
108
  if (!isNonEmptyString(defaultValue)) {
97
109
  throw new TypeError(
@@ -129,6 +141,7 @@ var getFirstPrefixPathname = (result, defaultValue = "/") => {
129
141
  }
130
142
  return normalizePathname(defaultValue);
131
143
  };
144
+
132
145
  var getPrefixPathname = (url, base = null, options = {}) => {
133
146
  const errors = [];
134
147
  if (!isString(url) && !isArray(url)) {
@@ -1,4 +1,14 @@
1
+ /*!
2
+ * ====================================================
3
+ * Rzl Utils-JS.
4
+ * ----------------------------------------------------
5
+ * Version: 3.5.2.
6
+ * Author: Rizalvin Dwiky.
7
+ * Repository: https://github.com/rzl-zone/utils-js.
8
+ * ====================================================
9
+ */
1
10
  import { isString, resolveErrorMessageAssertions } from './chunk-CMW2TBOQ.js';
11
+
2
12
  var assertIsString = (value, options = {}) => {
3
13
  if (isString(value)) return;
4
14
  const errorMessage = resolveErrorMessageAssertions({
@@ -1,6 +1,16 @@
1
+ /*!
2
+ * ====================================================
3
+ * Rzl Utils-JS.
4
+ * ----------------------------------------------------
5
+ * Version: 3.5.2.
6
+ * Author: Rizalvin Dwiky.
7
+ * Repository: https://github.com/rzl-zone/utils-js.
8
+ * ====================================================
9
+ */
1
10
  import { isServer } from './chunk-L5RDAVVH.js';
2
11
  import { assertIsString } from './chunk-SBKGWRS5.js';
3
12
  import { isPlainObject, hasOwnProp, isNonEmptyString, isNumber } from './chunk-CMW2TBOQ.js';
13
+
4
14
  var disableUserInteraction = (className = "on_processing") => {
5
15
  if (isServer()) return;
6
16
  assertIsString(className, {
@@ -13,6 +23,7 @@ var disableUserInteraction = (className = "on_processing") => {
13
23
  documentElement.classList.add(className);
14
24
  }
15
25
  };
26
+
16
27
  var enableUserInteraction = (className = "on_processing") => {
17
28
  if (isServer()) return;
18
29
  assertIsString(className, {
@@ -25,6 +36,7 @@ var enableUserInteraction = (className = "on_processing") => {
25
36
  documentElement.classList.remove(className);
26
37
  }
27
38
  };
39
+
28
40
  var removeElementFocus = () => {
29
41
  if (isServer()) return;
30
42
  const activeElement = document.activeElement;
@@ -32,6 +44,7 @@ var removeElementFocus = () => {
32
44
  activeElement.blur();
33
45
  }
34
46
  };
47
+
35
48
  var scrollToTop = (options) => {
36
49
  if (isServer()) return;
37
50
  if (!isPlainObject(options)) {
@@ -1,4 +1,14 @@
1
+ /*!
2
+ * ====================================================
3
+ * Rzl Utils-JS.
4
+ * ----------------------------------------------------
5
+ * Version: 3.5.2.
6
+ * Author: Rizalvin Dwiky.
7
+ * Repository: https://github.com/rzl-zone/utils-js.
8
+ * ====================================================
9
+ */
1
10
  import { isNonEmptyString, isPlainObject } from './chunk-CMW2TBOQ.js';
11
+
2
12
  var normalizeSpaces = (value, options = {
3
13
  withTrim: true,
4
14
  trimOnly: false
@@ -1,10 +1,21 @@
1
+ /*!
2
+ * ====================================================
3
+ * Rzl Utils-JS.
4
+ * ----------------------------------------------------
5
+ * Version: 3.5.2.
6
+ * Author: Rizalvin Dwiky.
7
+ * Repository: https://github.com/rzl-zone/utils-js.
8
+ * ====================================================
9
+ */
1
10
  'use strict';
2
11
 
3
12
  var chunkUDA26MCU_cjs = require('./chunk-UDA26MCU.cjs');
4
13
  var chunkPZQ6I4JJ_cjs = require('./chunk-PZQ6I4JJ.cjs');
14
+
5
15
  function isMap(value) {
6
16
  return Object.prototype.toString.call(value) === "[object Map]" || value instanceof Map;
7
17
  }
18
+
8
19
  var isDate = (value, options = {}) => {
9
20
  chunkPZQ6I4JJ_cjs.assertIsPlainObject(options, {
10
21
  message: ({ currentType, validType }) => `Second parameter (\`options\`) must be of type \`${validType}\`, but received: \`${currentType}\`.`
@@ -14,6 +25,7 @@ var isDate = (value, options = {}) => {
14
25
  if (skipInvalidDate) return instanceDate;
15
26
  return instanceDate && !chunkPZQ6I4JJ_cjs.isNaN(value.getTime());
16
27
  };
28
+
17
29
  var safeStableStringify = (value, options = {}) => {
18
30
  chunkPZQ6I4JJ_cjs.assertIsPlainObject(options, {
19
31
  message: ({ currentType, validType }) => `Second parameter (\`options\`) must be of type \`${validType}\`, but received: \`${currentType}\`.`
@@ -1,4 +1,14 @@
1
+ /*!
2
+ * ====================================================
3
+ * Rzl Utils-JS.
4
+ * ----------------------------------------------------
5
+ * Version: 3.5.2.
6
+ * Author: Rizalvin Dwiky.
7
+ * Repository: https://github.com/rzl-zone/utils-js.
8
+ * ====================================================
9
+ */
1
10
  'use strict';
11
+
2
12
  var isBigInt = (value) => {
3
13
  return typeof value === "bigint";
4
14
  };
@@ -1,6 +1,16 @@
1
+ /*!
2
+ * ====================================================
3
+ * Rzl Utils-JS.
4
+ * ----------------------------------------------------
5
+ * Version: 3.5.2.
6
+ * Author: Rizalvin Dwiky.
7
+ * Repository: https://github.com/rzl-zone/utils-js.
8
+ * ====================================================
9
+ */
1
10
  'use strict';
2
11
 
3
12
  var chunkPZQ6I4JJ_cjs = require('./chunk-PZQ6I4JJ.cjs');
13
+
4
14
  function isFinite(value) {
5
15
  return chunkPZQ6I4JJ_cjs.isNumber(value) && Number.isFinite(value);
6
16
  }
@@ -1,4 +1,14 @@
1
+ /*!
2
+ * ====================================================
3
+ * Rzl Utils-JS.
4
+ * ----------------------------------------------------
5
+ * Version: 3.5.2.
6
+ * Author: Rizalvin Dwiky.
7
+ * Repository: https://github.com/rzl-zone/utils-js.
8
+ * ====================================================
9
+ */
1
10
  'use strict';
11
+
2
12
  var isServer = () => {
3
13
  return typeof window === "undefined" || typeof document === "undefined";
4
14
  };
@@ -1,4 +1,14 @@
1
+ /*!
2
+ * ====================================================
3
+ * Rzl Utils-JS.
4
+ * ----------------------------------------------------
5
+ * Version: 3.5.2.
6
+ * Author: Rizalvin Dwiky.
7
+ * Repository: https://github.com/rzl-zone/utils-js.
8
+ * ====================================================
9
+ */
1
10
  import { isNonEmptyString } from './chunk-CMW2TBOQ.js';
11
+
2
12
  var isEmptyString = (value, options = {}) => {
3
13
  return !isNonEmptyString(value, options);
4
14
  };