@rzl-zone/utils-js 3.8.0 → 3.9.1

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 (122) hide show
  1. package/README.md +5 -1
  2. package/dist/assertions/index.cjs +11 -11
  3. package/dist/assertions/index.d.ts +168 -57
  4. package/dist/assertions/index.js +5 -5
  5. package/dist/{chunk-EK7FSI7F.cjs → chunk-2XGQQZ6A.cjs} +3 -3
  6. package/dist/{chunk-YS27V6LS.js → chunk-3LE6NX57.js} +5 -176
  7. package/dist/{chunk-PZQC3FZY.js → chunk-44X74C26.js} +4 -4
  8. package/dist/{chunk-4ACKNPL5.js → chunk-5KDVIEVO.js} +2 -2
  9. package/dist/{chunk-JY4HLZ4W.js → chunk-5O66AUEC.js} +2 -2
  10. package/dist/{chunk-SLP24LUV.js → chunk-5Y6JL47L.js} +3 -3
  11. package/dist/{chunk-ZW3VYES4.cjs → chunk-62FS7WMB.cjs} +31 -31
  12. package/dist/{chunk-VJVCXEH7.cjs → chunk-6AMDHVS2.cjs} +9 -181
  13. package/dist/{chunk-5IKZ3JDV.js → chunk-6WVOUVWD.js} +9 -9
  14. package/dist/{chunk-BYUT376O.cjs → chunk-76ATVDCR.cjs} +3 -3
  15. package/dist/{chunk-F3WBQKRI.cjs → chunk-7C7TQC5J.cjs} +29 -7
  16. package/dist/{chunk-I3IXLEEG.js → chunk-7EIFPHV3.js} +8 -8
  17. package/dist/{chunk-6RFNZ2ZZ.cjs → chunk-7NXFGJJE.cjs} +14 -14
  18. package/dist/{chunk-TFDXRT6D.cjs → chunk-ALRISPTL.cjs} +3 -3
  19. package/dist/chunk-BAV5T2E3.cjs +1 -1
  20. package/dist/{chunk-4ZOXSUXB.js → chunk-C7GC2PFX.js} +3 -3
  21. package/dist/chunk-DVMHRLKP.cjs +1 -1
  22. package/dist/{chunk-KVZ3HL2B.js → chunk-DXPM4NOU.js} +4 -4
  23. package/dist/{chunk-DPLL67OT.js → chunk-EJV5AF4L.js} +2 -2
  24. package/dist/{chunk-NREACG6M.cjs → chunk-FWWPEL7J.cjs} +3 -3
  25. package/dist/{chunk-LEX4TQW2.js → chunk-GHU356XQ.js} +4 -6
  26. package/dist/chunk-GKDSBOYE.js +209 -0
  27. package/dist/{chunk-YC7AK3KX.cjs → chunk-H44QVAZL.cjs} +31 -31
  28. package/dist/{chunk-AKKM6MOX.cjs → chunk-I33PB44Q.cjs} +15 -15
  29. package/dist/{chunk-LIU4S3JA.cjs → chunk-IX6PF5ZP.cjs} +4 -4
  30. package/dist/{chunk-3KTD3QDI.js → chunk-J4TT33ZX.js} +29 -7
  31. package/dist/{chunk-SZJ7OI4S.js → chunk-J6VLFVIL.js} +3 -3
  32. package/dist/{chunk-3JD53UUH.cjs → chunk-JI57K7D4.cjs} +161 -161
  33. package/dist/{chunk-OFBFGFVH.js → chunk-JYOCB6OV.js} +2 -2
  34. package/dist/chunk-KHO2SBNA.cjs +1 -1
  35. package/dist/{chunk-6NORJBI6.cjs → chunk-KUVRZ2JW.cjs} +50 -50
  36. package/dist/chunk-L5RDAVVH.js +1 -1
  37. package/dist/{chunk-VCVND6CH.js → chunk-M5QB2GM5.js} +2 -2
  38. package/dist/{chunk-RRJIRXHS.js → chunk-MBFVTGYS.js} +4 -4
  39. package/dist/{chunk-UKAUXY2U.cjs → chunk-MMRHKYT6.cjs} +12 -12
  40. package/dist/{chunk-U5VR4TJN.js → chunk-MS2KSKD7.js} +9 -9
  41. package/dist/{chunk-7ZNEUWYP.js → chunk-MZ3T6L7Z.js} +2 -2
  42. package/dist/{chunk-ATLFMKAF.cjs → chunk-NAOVH4OH.cjs} +7 -7
  43. package/dist/{chunk-HKJZ7K2K.cjs → chunk-NJ24M6ZH.cjs} +37 -37
  44. package/dist/chunk-OCTHWEZK.cjs +249 -0
  45. package/dist/chunk-ONZFBJVW.js +1 -1
  46. package/dist/{chunk-FI76UZRF.js → chunk-OSSFLQDD.js} +3 -4
  47. package/dist/{chunk-7WBMA2VE.cjs → chunk-OYFUBKEG.cjs} +4 -5
  48. package/dist/{chunk-B4SDEBN7.cjs → chunk-PWKOFPAH.cjs} +3 -3
  49. package/dist/{chunk-RJYWBVGD.cjs → chunk-QGTFQ7RO.cjs} +6 -6
  50. package/dist/chunk-QNKGP5DY.js +1 -1
  51. package/dist/chunk-QXTJVDWE.js +676 -0
  52. package/dist/{chunk-B6UIKBHR.cjs → chunk-QZI5PVCI.cjs} +4 -4
  53. package/dist/{chunk-PW2VMJLT.js → chunk-R2DR7SPJ.js} +99 -25
  54. package/dist/{chunk-TDYGYHSH.js → chunk-SN5HAK3Y.js} +4 -4
  55. package/dist/{chunk-P3ST4UZA.js → chunk-SRWL4YCP.js} +7 -7
  56. package/dist/{chunk-7QQV66RX.cjs → chunk-TJ5OY6MC.cjs} +10 -10
  57. package/dist/{chunk-6WMB5AJR.js → chunk-TXOVQZPU.js} +3 -4
  58. package/dist/chunk-UDA26MCU.cjs +1 -1
  59. package/dist/{chunk-LVFTN6DK.cjs → chunk-UFYMRRJH.cjs} +61 -61
  60. package/dist/{chunk-5NN4ZDE2.cjs → chunk-UV5BKAYW.cjs} +6 -8
  61. package/dist/{chunk-GAJBF6DR.js → chunk-UXT4XSUK.js} +2 -2
  62. package/dist/{chunk-6VA4F6VR.js → chunk-VBSLIIDB.js} +10 -10
  63. package/dist/chunk-VCYXNIZ2.cjs +678 -0
  64. package/dist/chunk-VJDDGRIK.cjs +1 -1
  65. package/dist/{chunk-JIROTDOU.js → chunk-WB3FT62A.js} +3 -3
  66. package/dist/{chunk-K63WO3XA.cjs → chunk-WKM6UVMG.cjs} +4 -5
  67. package/dist/{chunk-5PF7KRCP.cjs → chunk-WLEZ2KSG.cjs} +126 -126
  68. package/dist/{chunk-ZN53RM3R.js → chunk-WRGN6UBK.js} +2 -2
  69. package/dist/chunk-WVSPXFTY.js +1 -1
  70. package/dist/{chunk-2VO2CBTU.js → chunk-X6ULJZ3X.js} +2 -2
  71. package/dist/{chunk-CKUEZF4R.cjs → chunk-XYWC4EQ3.cjs} +71 -71
  72. package/dist/{chunk-A3YI6Y2P.js → chunk-YHFRCVTN.js} +3 -3
  73. package/dist/{chunk-A4H7474O.cjs → chunk-YQHJB7KR.cjs} +26 -26
  74. package/dist/{chunk-YGB2BQPB.cjs → chunk-YVRUY4EW.cjs} +8 -8
  75. package/dist/chunk-YWHHVDT4.js +1 -1
  76. package/dist/chunk-ZTHJQJ5F.cjs +211 -0
  77. package/dist/conversions/index.cjs +34 -34
  78. package/dist/conversions/index.d.ts +1 -1
  79. package/dist/conversions/index.js +15 -15
  80. package/dist/events/index.cjs +8 -8
  81. package/dist/events/index.d.ts +1 -1
  82. package/dist/events/index.js +4 -4
  83. package/dist/formatters/index.cjs +19 -19
  84. package/dist/formatters/index.d.ts +1 -1
  85. package/dist/formatters/index.js +9 -9
  86. package/dist/generators/index.cjs +9 -9
  87. package/dist/generators/index.d.ts +1 -1
  88. package/dist/generators/index.js +4 -4
  89. package/dist/index.d.ts +1 -1
  90. package/dist/isPlainObject-BTPjv6zB.d.ts +1 -1
  91. package/dist/next/index.cjs +37 -36
  92. package/dist/next/index.d.ts +1 -1
  93. package/dist/next/index.js +9 -8
  94. package/dist/next/server/index.cjs +4 -4
  95. package/dist/next/server/index.d.ts +1 -1
  96. package/dist/next/server/index.js +2 -2
  97. package/dist/operations/index.cjs +11 -11
  98. package/dist/operations/index.d.ts +1 -1
  99. package/dist/operations/index.js +8 -8
  100. package/dist/parsers/index.cjs +6 -4
  101. package/dist/parsers/index.d.ts +224 -32
  102. package/dist/parsers/index.js +5 -3
  103. package/dist/predicates/index.cjs +77 -76
  104. package/dist/predicates/index.d.ts +1 -1
  105. package/dist/predicates/index.js +14 -13
  106. package/dist/promises/index.cjs +6 -6
  107. package/dist/promises/index.d.ts +2 -3
  108. package/dist/promises/index.js +4 -4
  109. package/dist/rzl-utils.global.js +2 -2
  110. package/dist/strings/index.cjs +23 -23
  111. package/dist/strings/index.d.ts +1 -1
  112. package/dist/strings/index.js +7 -7
  113. package/dist/tailwind/index.cjs +13 -13
  114. package/dist/tailwind/index.d.ts +1 -1
  115. package/dist/tailwind/index.js +5 -5
  116. package/dist/urls/index.cjs +23 -21
  117. package/dist/urls/index.d.ts +182 -114
  118. package/dist/urls/index.js +16 -14
  119. package/package.json +1 -1
  120. package/dist/chunk-KPCDDYTZ.js +0 -417
  121. package/dist/chunk-QAPYHLHC.cjs +0 -419
  122. package/dist/chunk-SGCN4ED4.cjs +0 -175
@@ -2,7 +2,7 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.8.0.
5
+ * Version: 3.9.1.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
@@ -10,60 +10,60 @@
10
10
  'use strict';
11
11
 
12
12
  var chunkUDA26MCU_cjs = require('./chunk-UDA26MCU.cjs');
13
- var chunkF3WBQKRI_cjs = require('./chunk-F3WBQKRI.cjs');
13
+ var chunk7C7TQC5J_cjs = require('./chunk-7C7TQC5J.cjs');
14
14
 
15
15
  function isMap(value) {
16
16
  return Object.prototype.toString.call(value) === "[object Map]" || value instanceof Map;
17
17
  }
18
18
 
19
19
  var isDate = (value, options = {}) => {
20
- chunkF3WBQKRI_cjs.assertIsPlainObject(options, {
20
+ chunk7C7TQC5J_cjs.assertIsPlainObject(options, {
21
21
  message: ({ currentType, validType }) => `Second parameter (\`options\`) must be of type \`${validType}\`, but received: \`${currentType}\`.`
22
22
  });
23
- const skipInvalidDate = chunkF3WBQKRI_cjs.isPlainObject(options) && chunkF3WBQKRI_cjs.isBoolean(options.skipInvalidDate) ? options.skipInvalidDate : false;
23
+ const skipInvalidDate = chunk7C7TQC5J_cjs.isPlainObject(options) && chunk7C7TQC5J_cjs.isBoolean(options.skipInvalidDate) ? options.skipInvalidDate : false;
24
24
  const instanceDate = value instanceof Date;
25
25
  if (skipInvalidDate) return instanceDate;
26
- return instanceDate && !chunkF3WBQKRI_cjs.isNaN(value.getTime());
26
+ return instanceDate && !chunk7C7TQC5J_cjs.isNaN(value.getTime());
27
27
  };
28
28
 
29
29
  var safeStableStringify = (value, options = {}) => {
30
- chunkF3WBQKRI_cjs.assertIsPlainObject(options, {
30
+ chunk7C7TQC5J_cjs.assertIsPlainObject(options, {
31
31
  message: ({ currentType, validType }) => `Second parameter (\`options\`) must be of type \`${validType}\`, but received: \`${currentType}\`.`
32
32
  });
33
- const pretty = chunkF3WBQKRI_cjs.hasOwnProp(options, "pretty") ? options.pretty : false;
34
- const sortKeys = chunkF3WBQKRI_cjs.hasOwnProp(options, "sortKeys") ? options.sortKeys : true;
35
- const sortArray = chunkF3WBQKRI_cjs.hasOwnProp(options, "sortArray") ? options.sortArray : false;
36
- const keepUndefined = chunkF3WBQKRI_cjs.hasOwnProp(options, "keepUndefined") ? options.keepUndefined : false;
37
- if (!chunkF3WBQKRI_cjs.isBoolean(sortKeys) || !chunkF3WBQKRI_cjs.isBoolean(sortArray) || !chunkF3WBQKRI_cjs.isBoolean(pretty) || !chunkF3WBQKRI_cjs.isBoolean(keepUndefined)) {
33
+ const pretty = chunk7C7TQC5J_cjs.hasOwnProp(options, "pretty") ? options.pretty : false;
34
+ const sortKeys = chunk7C7TQC5J_cjs.hasOwnProp(options, "sortKeys") ? options.sortKeys : true;
35
+ const sortArray = chunk7C7TQC5J_cjs.hasOwnProp(options, "sortArray") ? options.sortArray : false;
36
+ const keepUndefined = chunk7C7TQC5J_cjs.hasOwnProp(options, "keepUndefined") ? options.keepUndefined : false;
37
+ if (!chunk7C7TQC5J_cjs.isBoolean(sortKeys) || !chunk7C7TQC5J_cjs.isBoolean(sortArray) || !chunk7C7TQC5J_cjs.isBoolean(pretty) || !chunk7C7TQC5J_cjs.isBoolean(keepUndefined)) {
38
38
  throw new TypeError(
39
- `Parameters \`sortKeys\`, \`sortArray\`, \`keepUndefined\` and \`pretty\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: "['sortKeys': \`${chunkF3WBQKRI_cjs.getPreciseType(
39
+ `Parameters \`sortKeys\`, \`sortArray\`, \`keepUndefined\` and \`pretty\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: "['sortKeys': \`${chunk7C7TQC5J_cjs.getPreciseType(
40
40
  sortKeys
41
- )}\`, 'sortArray': \`${chunkF3WBQKRI_cjs.getPreciseType(
41
+ )}\`, 'sortArray': \`${chunk7C7TQC5J_cjs.getPreciseType(
42
42
  sortArray
43
- )}\`, 'keepUndefined': \`${chunkF3WBQKRI_cjs.getPreciseType(
43
+ )}\`, 'keepUndefined': \`${chunk7C7TQC5J_cjs.getPreciseType(
44
44
  keepUndefined
45
- )}\`, 'pretty': \`${chunkF3WBQKRI_cjs.getPreciseType(pretty)}\`]".`
45
+ )}\`, 'pretty': \`${chunk7C7TQC5J_cjs.getPreciseType(pretty)}\`]".`
46
46
  );
47
47
  }
48
- if (chunkF3WBQKRI_cjs.isUndefined(value)) {
48
+ if (chunk7C7TQC5J_cjs.isUndefined(value)) {
49
49
  return keepUndefined ? "undefined" : "null";
50
50
  }
51
51
  const seen = /* @__PURE__ */ new WeakSet();
52
- const isPrimitive = (val) => chunkF3WBQKRI_cjs.isNull(val) || !chunkF3WBQKRI_cjs.isObjectOrArray(val) && !chunkF3WBQKRI_cjs.isFunction(val);
52
+ const isPrimitive = (val) => chunk7C7TQC5J_cjs.isNull(val) || !chunk7C7TQC5J_cjs.isObjectOrArray(val) && !chunk7C7TQC5J_cjs.isFunction(val);
53
53
  const deepProcess = (val) => {
54
- if (chunkF3WBQKRI_cjs.isNumberObject(val)) {
54
+ if (chunk7C7TQC5J_cjs.isNumberObject(val)) {
55
55
  const valOf = val.valueOf();
56
- return chunkF3WBQKRI_cjs.isNaN(valOf) || chunkF3WBQKRI_cjs.isInfinityNumber(valOf) ? null : valOf;
56
+ return chunk7C7TQC5J_cjs.isNaN(valOf) || chunk7C7TQC5J_cjs.isInfinityNumber(valOf) ? null : valOf;
57
57
  }
58
- if (chunkF3WBQKRI_cjs.isStringObject(val)) return val.valueOf();
59
- if (chunkF3WBQKRI_cjs.isBooleanObject(val)) return val.valueOf();
60
- if (chunkF3WBQKRI_cjs.isFunction(val) || chunkF3WBQKRI_cjs.isSymbol(val)) return void 0;
58
+ if (chunk7C7TQC5J_cjs.isStringObject(val)) return val.valueOf();
59
+ if (chunk7C7TQC5J_cjs.isBooleanObject(val)) return val.valueOf();
60
+ if (chunk7C7TQC5J_cjs.isFunction(val) || chunk7C7TQC5J_cjs.isSymbol(val)) return void 0;
61
61
  if (chunkUDA26MCU_cjs.isBigInt(val)) return val.toString();
62
- if (chunkF3WBQKRI_cjs.isNaN(val) || chunkF3WBQKRI_cjs.isInfinityNumber(val)) return null;
63
- if (chunkF3WBQKRI_cjs.isUndefined(val)) {
62
+ if (chunk7C7TQC5J_cjs.isNaN(val) || chunk7C7TQC5J_cjs.isInfinityNumber(val)) return null;
63
+ if (chunk7C7TQC5J_cjs.isUndefined(val)) {
64
64
  return keepUndefined ? void 0 : null;
65
65
  }
66
- if (chunkF3WBQKRI_cjs.isObjectOrArray(val)) {
66
+ if (chunk7C7TQC5J_cjs.isObjectOrArray(val)) {
67
67
  if (seen.has(val)) return "[Circular]";
68
68
  seen.add(val);
69
69
  if (isDate(val)) return val.toISOString();
@@ -72,8 +72,8 @@ var safeStableStringify = (value, options = {}) => {
72
72
  map: Array.from(val.entries()).map(([k, v]) => [k, deepProcess(v)])
73
73
  };
74
74
  }
75
- if (chunkF3WBQKRI_cjs.isSet(val)) return { set: Array.from(val.values()).map(deepProcess) };
76
- if (chunkF3WBQKRI_cjs.isArray(val)) {
75
+ if (chunk7C7TQC5J_cjs.isSet(val)) return { set: Array.from(val.values()).map(deepProcess) };
76
+ if (chunk7C7TQC5J_cjs.isArray(val)) {
77
77
  const processedArr = val.map(deepProcess);
78
78
  if (sortArray) {
79
79
  const primitives = [];
@@ -83,7 +83,7 @@ var safeStableStringify = (value, options = {}) => {
83
83
  else nonPrimitives.push(item);
84
84
  }
85
85
  primitives.sort((a, b) => {
86
- if (chunkF3WBQKRI_cjs.isNumber(a) && chunkF3WBQKRI_cjs.isNumber(b)) return a - b;
86
+ if (chunk7C7TQC5J_cjs.isNumber(a) && chunk7C7TQC5J_cjs.isNumber(b)) return a - b;
87
87
  return String(a).localeCompare(String(b));
88
88
  });
89
89
  return [...primitives, ...nonPrimitives];
@@ -95,15 +95,15 @@ var safeStableStringify = (value, options = {}) => {
95
95
  keys.sort((a, b) => {
96
96
  const na = Number(a);
97
97
  const nb = Number(b);
98
- if (!chunkF3WBQKRI_cjs.isNaN(na) && !chunkF3WBQKRI_cjs.isNaN(nb)) return na - nb;
98
+ if (!chunk7C7TQC5J_cjs.isNaN(na) && !chunk7C7TQC5J_cjs.isNaN(nb)) return na - nb;
99
99
  return a.localeCompare(b);
100
100
  });
101
101
  }
102
102
  const result = {};
103
- if (chunkF3WBQKRI_cjs.isObject(val)) {
103
+ if (chunk7C7TQC5J_cjs.isObject(val)) {
104
104
  for (const k of keys) {
105
105
  const v = deepProcess(val[k]);
106
- if (!chunkF3WBQKRI_cjs.isUndefined(v)) result[k] = v;
106
+ if (!chunk7C7TQC5J_cjs.isUndefined(v)) result[k] = v;
107
107
  }
108
108
  }
109
109
  return result;
@@ -2,26 +2,26 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.8.0.
5
+ * Version: 3.9.1.
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 chunkB4SDEBN7_cjs = require('./chunk-B4SDEBN7.cjs');
13
- var chunkATLFMKAF_cjs = require('./chunk-ATLFMKAF.cjs');
12
+ var chunkPWKOFPAH_cjs = require('./chunk-PWKOFPAH.cjs');
13
+ var chunkNAOVH4OH_cjs = require('./chunk-NAOVH4OH.cjs');
14
14
  var chunkUDA26MCU_cjs = require('./chunk-UDA26MCU.cjs');
15
- var chunkF3WBQKRI_cjs = require('./chunk-F3WBQKRI.cjs');
15
+ var chunk7C7TQC5J_cjs = require('./chunk-7C7TQC5J.cjs');
16
16
 
17
17
  function filterNilArray(input) {
18
- if (chunkF3WBQKRI_cjs.isNil(input)) return void 0;
19
- if (!chunkF3WBQKRI_cjs.isArray(input)) return [];
18
+ if (chunk7C7TQC5J_cjs.isNil(input)) return void 0;
19
+ if (!chunk7C7TQC5J_cjs.isArray(input)) return [];
20
20
  const filtered = input.reduce((output, element) => {
21
- if (!chunkF3WBQKRI_cjs.isNil(element)) {
22
- if (chunkF3WBQKRI_cjs.isArray(element)) {
21
+ if (!chunk7C7TQC5J_cjs.isNil(element)) {
22
+ if (chunk7C7TQC5J_cjs.isArray(element)) {
23
23
  const cleanedNested = filterNilArray(element);
24
- if (cleanedNested && !chunkATLFMKAF_cjs.isEmptyArray(cleanedNested)) {
24
+ if (cleanedNested && !chunkNAOVH4OH_cjs.isEmptyArray(cleanedNested)) {
25
25
  output.push(cleanedNested);
26
26
  }
27
27
  } else {
@@ -34,17 +34,17 @@ function filterNilArray(input) {
34
34
  }
35
35
 
36
36
  function toStringArrayUnRecursive(array, options = {}) {
37
- chunkF3WBQKRI_cjs.assertIsPlainObject(options, {
37
+ chunk7C7TQC5J_cjs.assertIsPlainObject(options, {
38
38
  message: ({ currentType, validType }) => `Second parameter (\`options\`) must be of type \`${validType}\`, but received: \`${currentType}\`.`
39
39
  });
40
- const riv = chunkF3WBQKRI_cjs.hasOwnProp(options, "removeInvalidValue") ? options.removeInvalidValue : true;
41
- chunkF3WBQKRI_cjs.assertIsBoolean(riv, {
40
+ const riv = chunk7C7TQC5J_cjs.hasOwnProp(options, "removeInvalidValue") ? options.removeInvalidValue : true;
41
+ chunk7C7TQC5J_cjs.assertIsBoolean(riv, {
42
42
  message: ({ currentType, validType }) => `Parameter \`removeInvalidValue\` property of the \`options\` (second parameter) must be of type \`${validType}\`, but received: \`${currentType}\`.`
43
43
  });
44
- if (chunkF3WBQKRI_cjs.isArray(array)) {
44
+ if (chunk7C7TQC5J_cjs.isArray(array)) {
45
45
  const result = Array.from(array, (x) => {
46
- if (chunkF3WBQKRI_cjs.isString(x) || chunkB4SDEBN7_cjs.isFinite(x) || chunkF3WBQKRI_cjs.isBoolean(x) || chunkUDA26MCU_cjs.isBigInt(x)) return String(x);
47
- return chunkF3WBQKRI_cjs.isNull(x) ? null : void 0;
46
+ if (chunk7C7TQC5J_cjs.isString(x) || chunkPWKOFPAH_cjs.isFinite(x) || chunk7C7TQC5J_cjs.isBoolean(x) || chunkUDA26MCU_cjs.isBigInt(x)) return String(x);
47
+ return chunk7C7TQC5J_cjs.isNull(x) ? null : void 0;
48
48
  });
49
49
  if (riv) return filterNilArray(result);
50
50
  return result;
@@ -2,20 +2,20 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.8.0.
5
+ * Version: 3.9.1.
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 chunkF3WBQKRI_cjs = require('./chunk-F3WBQKRI.cjs');
12
+ var chunk7C7TQC5J_cjs = require('./chunk-7C7TQC5J.cjs');
13
13
 
14
14
  var removeSpaces = (value, options = {
15
15
  trimOnly: false
16
16
  }) => {
17
- if (!chunkF3WBQKRI_cjs.isNonEmptyString(value)) return "";
18
- if (!chunkF3WBQKRI_cjs.isPlainObject(options)) {
17
+ if (!chunk7C7TQC5J_cjs.isNonEmptyString(value)) return "";
18
+ if (!chunk7C7TQC5J_cjs.isPlainObject(options)) {
19
19
  options = {};
20
20
  }
21
21
  const { trimOnly = false } = options;
@@ -2,7 +2,7 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.8.0.
5
+ * Version: 3.9.1.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
@@ -49,12 +49,11 @@ var isNull = (val) => val === null;
49
49
 
50
50
  var assertIsBoolean = (value, options = {}) => {
51
51
  if (isBoolean(value)) return;
52
- const errorMessage = resolveErrorMessageAssertions({
52
+ resolveErrorMessageAssertions({
53
53
  value,
54
54
  options,
55
55
  requiredValidType: "boolean"
56
56
  });
57
- throw new TypeError(errorMessage);
58
57
  };
59
58
 
60
59
  var isNumber = (value, options = {}) => {
@@ -538,25 +537,48 @@ var getPreciseType = (value, options = { formatCase: "toLowerCase" }) => {
538
537
  }
539
538
  return converterHelper(tag, formatCase);
540
539
  };
540
+ var determineErrorTypeAssertion = (type, message) => {
541
+ switch (type) {
542
+ case "Error":
543
+ throw new Error(message);
544
+ case "EvalError":
545
+ throw new EvalError(message);
546
+ case "RangeError":
547
+ throw new RangeError(message);
548
+ case "ReferenceError":
549
+ throw new ReferenceError(message);
550
+ case "SyntaxError":
551
+ throw new SyntaxError(message);
552
+ case "URIError":
553
+ throw new URIError(message);
554
+ case "TypeError":
555
+ throw new TypeError(message);
556
+ default:
557
+ throw new TypeError(message);
558
+ }
559
+ };
541
560
  function resolveErrorMessageAssertions(params) {
542
561
  const { requiredValidType, value, options } = params || {};
543
- const { message, formatCase } = isPlainObject(options) ? options : {};
562
+ const {
563
+ message,
564
+ formatCase,
565
+ errorType = "TypeError"
566
+ } = isPlainObject(options) ? options : {};
544
567
  const validType2 = toKebabCase(requiredValidType);
545
568
  const currentType = getPreciseType(value, { formatCase });
546
569
  const messageFnOptions = { currentType, validType: validType2 };
547
570
  const defaultMessage = `Parameter input (\`value\`) must be of type \`${validType2}\`, but received: \`${currentType}\`.`;
548
571
  const errorMessage = isFunction(message) ? isNonEmptyString(message(messageFnOptions)) ? message(messageFnOptions).trim() : defaultMessage : isNonEmptyString(message) ? message.trim() : defaultMessage;
549
- return errorMessage;
572
+ return determineErrorTypeAssertion(errorType, errorMessage);
550
573
  }
551
574
 
552
575
  function assertIsPlainObject(value, options = {}) {
553
576
  if (isPlainObject(value)) return;
554
- const errorMessage = resolveErrorMessageAssertions({
577
+ resolveErrorMessageAssertions({
555
578
  value,
556
579
  options,
557
580
  requiredValidType: "plain object"
558
581
  });
559
- throw new TypeError(errorMessage);
560
582
  }
561
583
 
562
584
  export { assertIsBoolean, assertIsPlainObject, getPreciseType, hasOwnProp, isArray, isBoolean, isBooleanObject, isBuffer, isError, isFunction, isInfinityNumber, isNaN, isNil, isNonEmptyArray, isNonEmptyString, isNull, isNumber, isNumberObject, isObject, isObjectOrArray, isPlainObject, isSet, isString, isStringObject, isSymbol, isUndefined, resolveErrorMessageAssertions, slugify, toCamelCase, toDotCase, toKebabCase, toLowerCase, toPascalCase, toPascalCaseSpace, toSnakeCase };
@@ -2,13 +2,13 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.8.0.
5
+ * Version: 3.9.1.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
9
9
  */
10
- import { isDate, isMap } from './chunk-2VO2CBTU.js';
11
- import { isObjectOrArray, isError, isSet, isArray, isUndefined } from './chunk-3KTD3QDI.js';
10
+ import { isDate, isMap } from './chunk-X6ULJZ3X.js';
11
+ import { isObjectOrArray, isError, isSet, isArray, isUndefined } from './chunk-J4TT33ZX.js';
12
12
 
13
13
  var isRegExp = (value) => {
14
14
  return value instanceof RegExp;