@rzl-zone/utils-js 3.7.1 → 3.9.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 (124) hide show
  1. package/README.md +28 -1
  2. package/dist/assertions/index.cjs +11 -11
  3. package/dist/assertions/index.d.ts +169 -58
  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-5Y6JL47L.js +302 -0
  11. package/dist/{chunk-KIYALQQF.cjs → chunk-62FS7WMB.cjs} +35 -35
  12. package/dist/{chunk-VJVCXEH7.cjs → chunk-6AMDHVS2.cjs} +9 -181
  13. package/dist/{chunk-6PKW4WCT.js → chunk-6WVOUVWD.js} +27 -15
  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-QUITZ3GP.js → chunk-7EIFPHV3.js} +32 -16
  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-XFTUHS4Y.js → chunk-DXPM4NOU.js} +10 -8
  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-KTQLDIIT.cjs → chunk-JI57K7D4.cjs} +173 -163
  33. package/dist/{chunk-OFBFGFVH.js → chunk-JYOCB6OV.js} +2 -2
  34. package/dist/chunk-KHO2SBNA.cjs +1 -1
  35. package/dist/{chunk-66WLOZOD.cjs → chunk-KUVRZ2JW.cjs} +53 -51
  36. package/dist/chunk-L5RDAVVH.js +1 -1
  37. package/dist/{chunk-VCVND6CH.js → chunk-M5QB2GM5.js} +2 -2
  38. package/dist/{chunk-3LEWQV3R.js → chunk-MBFVTGYS.js} +8 -8
  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-NJ24M6ZH.cjs +308 -0
  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-2CQI36UD.cjs → chunk-QGTFQ7RO.cjs} +8 -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-WNO3EPYT.js → chunk-R2DR7SPJ.js} +102 -26
  54. package/dist/{chunk-TDYGYHSH.js → chunk-SN5HAK3Y.js} +4 -4
  55. package/dist/{chunk-D53CE4BT.js → chunk-SRWL4YCP.js} +11 -8
  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-R3PBF6F7.cjs → chunk-UFYMRRJH.cjs} +73 -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-TDPYR5JY.js → chunk-VBSLIIDB.js} +24 -14
  63. package/dist/chunk-VCYXNIZ2.cjs +678 -0
  64. package/dist/chunk-VJDDGRIK.cjs +1 -1
  65. package/dist/{chunk-VNADVWSJ.js → chunk-WB3FT62A.js} +6 -4
  66. package/dist/{chunk-K63WO3XA.cjs → chunk-WKM6UVMG.cjs} +4 -5
  67. package/dist/{chunk-OS5OT5JA.cjs → chunk-WLEZ2KSG.cjs} +142 -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-RMJC3B5P.cjs → chunk-YQHJB7KR.cjs} +30 -27
  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 +10 -12
  79. package/dist/conversions/index.js +15 -15
  80. package/dist/events/index.cjs +8 -8
  81. package/dist/events/index.d.ts +9 -9
  82. package/dist/events/index.js +4 -4
  83. package/dist/formatters/index.cjs +19 -19
  84. package/dist/formatters/index.d.ts +19 -24
  85. package/dist/formatters/index.js +9 -9
  86. package/dist/generators/index.cjs +12 -8
  87. package/dist/generators/index.d.ts +155 -26
  88. package/dist/generators/index.js +4 -4
  89. package/dist/index.d.ts +1 -1
  90. package/dist/{isPlainObject-FWmcJF6k.d.ts → isPlainObject-BTPjv6zB.d.ts} +2 -2
  91. package/dist/next/index.cjs +39 -36
  92. package/dist/next/index.d.ts +11 -11
  93. package/dist/next/index.js +12 -9
  94. package/dist/next/server/index.cjs +4 -4
  95. package/dist/next/server/index.d.ts +4 -4
  96. package/dist/next/server/index.js +2 -2
  97. package/dist/operations/index.cjs +11 -11
  98. package/dist/operations/index.d.ts +8 -9
  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 +15 -28
  105. package/dist/predicates/index.js +14 -13
  106. package/dist/promises/index.cjs +6 -6
  107. package/dist/promises/index.d.ts +5 -7
  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 +18 -18
  115. package/dist/tailwind/index.js +5 -5
  116. package/dist/urls/index.cjs +23 -21
  117. package/dist/urls/index.d.ts +188 -121
  118. package/dist/urls/index.js +16 -14
  119. package/package.json +1 -1
  120. package/dist/chunk-ABA2ZSBQ.js +0 -152
  121. package/dist/chunk-BG3AS5BU.cjs +0 -173
  122. package/dist/chunk-K3SONK25.cjs +0 -157
  123. package/dist/chunk-KPCDDYTZ.js +0 -417
  124. package/dist/chunk-QAPYHLHC.cjs +0 -419
@@ -2,23 +2,22 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.7.1.
5
+ * Version: 3.9.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 chunkF3WBQKRI_cjs = require('./chunk-F3WBQKRI.cjs');
12
+ var chunk7C7TQC5J_cjs = require('./chunk-7C7TQC5J.cjs');
13
13
 
14
14
  var assertIsString = (value, options = {}) => {
15
- if (chunkF3WBQKRI_cjs.isString(value)) return;
16
- const errorMessage = chunkF3WBQKRI_cjs.resolveErrorMessageAssertions({
15
+ if (chunk7C7TQC5J_cjs.isString(value)) return;
16
+ chunk7C7TQC5J_cjs.resolveErrorMessageAssertions({
17
17
  value,
18
18
  options,
19
19
  requiredValidType: "string"
20
20
  });
21
- throw new TypeError(errorMessage);
22
21
  };
23
22
 
24
23
  exports.assertIsString = assertIsString;
@@ -2,21 +2,21 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.7.1.
5
+ * Version: 3.9.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 chunkB6UIKBHR_cjs = require('./chunk-B6UIKBHR.cjs');
13
- var chunkEK7FSI7F_cjs = require('./chunk-EK7FSI7F.cjs');
14
- var chunkB4SDEBN7_cjs = require('./chunk-B4SDEBN7.cjs');
12
+ var chunkQZI5PVCI_cjs = require('./chunk-QZI5PVCI.cjs');
13
+ var chunk2XGQQZ6A_cjs = require('./chunk-2XGQQZ6A.cjs');
14
+ var chunkPWKOFPAH_cjs = require('./chunk-PWKOFPAH.cjs');
15
15
  var chunkDVMHRLKP_cjs = require('./chunk-DVMHRLKP.cjs');
16
- var chunkNREACG6M_cjs = require('./chunk-NREACG6M.cjs');
17
- var chunkK63WO3XA_cjs = require('./chunk-K63WO3XA.cjs');
18
- var chunkYC7AK3KX_cjs = require('./chunk-YC7AK3KX.cjs');
19
- var chunkF3WBQKRI_cjs = require('./chunk-F3WBQKRI.cjs');
16
+ var chunkFWWPEL7J_cjs = require('./chunk-FWWPEL7J.cjs');
17
+ var chunkWKM6UVMG_cjs = require('./chunk-WKM6UVMG.cjs');
18
+ var chunkH44QVAZL_cjs = require('./chunk-H44QVAZL.cjs');
19
+ var chunk7C7TQC5J_cjs = require('./chunk-7C7TQC5J.cjs');
20
20
  var max = require('libphonenumber-js/max');
21
21
  var locale = require('date-fns/locale');
22
22
  var dateFns = require('date-fns');
@@ -28,69 +28,77 @@ var formatIndianNumber = (numStr, separator) => {
28
28
  return rest.replace(/\B(?=(\d{2})+(?!\d))/g, separator) + separator + lastThree;
29
29
  };
30
30
  var formatCurrency = (value, options = {}) => {
31
- if (!chunkF3WBQKRI_cjs.isString(value) && !chunkB4SDEBN7_cjs.isFinite(value)) {
31
+ if (!chunk7C7TQC5J_cjs.isString(value) && !chunkPWKOFPAH_cjs.isFinite(value)) {
32
32
  throw new TypeError(
33
- `First parameter (\`value\`) must be of type \`string\` or \`primitive-number\`, but received: \`${chunkF3WBQKRI_cjs.getPreciseType(
33
+ `First parameter (\`value\`) must be of type \`string\` or \`primitive-number\`, but received: \`${chunk7C7TQC5J_cjs.getPreciseType(
34
34
  value
35
- )}\`, with value: \`${chunkYC7AK3KX_cjs.safeStableStringify(value)}\`.`
35
+ )}\`, with value: \`${chunkH44QVAZL_cjs.safeStableStringify(value, {
36
+ keepUndefined: true
37
+ })}\`.`
36
38
  );
37
39
  }
38
- chunkF3WBQKRI_cjs.assertIsPlainObject(options, {
40
+ chunk7C7TQC5J_cjs.assertIsPlainObject(options, {
39
41
  message: ({ currentType, validType }) => `Second parameter (\`options\`) must be of type \`${validType}\`, but received: \`${currentType}\`.`
40
42
  });
41
- const decimal = chunkF3WBQKRI_cjs.hasOwnProp(options, "decimal") ? options.decimal : false;
42
- const totalDecimal = chunkF3WBQKRI_cjs.hasOwnProp(options, "totalDecimal") ? options.totalDecimal : 2;
43
- const endDecimal = chunkF3WBQKRI_cjs.hasOwnProp(options, "endDecimal") ? options.endDecimal : true;
44
- const indianFormat = chunkF3WBQKRI_cjs.hasOwnProp(options, "indianFormat") ? options.indianFormat : false;
45
- const suffixCurrency = chunkF3WBQKRI_cjs.hasOwnProp(options, "suffixCurrency") ? options.suffixCurrency : "";
46
- const suffixDecimal = chunkF3WBQKRI_cjs.hasOwnProp(options, "suffixDecimal") ? options.suffixDecimal : "";
47
- const roundedDecimal = chunkF3WBQKRI_cjs.hasOwnProp(options, "roundedDecimal") ? options.roundedDecimal : "round";
48
- const negativeFormat = chunkF3WBQKRI_cjs.hasOwnProp(options, "negativeFormat") ? options.negativeFormat : "dash";
49
- let separatorDecimals = chunkF3WBQKRI_cjs.hasOwnProp(options, "separatorDecimals") ? options.separatorDecimals : ",";
50
- let separator = chunkF3WBQKRI_cjs.hasOwnProp(options, "separator") ? options.separator : ".";
51
- if (!chunkF3WBQKRI_cjs.isString(separator) || !chunkF3WBQKRI_cjs.isString(separatorDecimals) || !chunkF3WBQKRI_cjs.isString(suffixCurrency) || !chunkF3WBQKRI_cjs.isString(suffixDecimal)) {
43
+ const decimal = chunk7C7TQC5J_cjs.hasOwnProp(options, "decimal") ? options.decimal : false;
44
+ const totalDecimal = chunk7C7TQC5J_cjs.hasOwnProp(options, "totalDecimal") ? options.totalDecimal : 2;
45
+ const endDecimal = chunk7C7TQC5J_cjs.hasOwnProp(options, "endDecimal") ? options.endDecimal : true;
46
+ const indianFormat = chunk7C7TQC5J_cjs.hasOwnProp(options, "indianFormat") ? options.indianFormat : false;
47
+ const suffixCurrency = chunk7C7TQC5J_cjs.hasOwnProp(options, "suffixCurrency") ? options.suffixCurrency : "";
48
+ const suffixDecimal = chunk7C7TQC5J_cjs.hasOwnProp(options, "suffixDecimal") ? options.suffixDecimal : "";
49
+ const roundedDecimal = chunk7C7TQC5J_cjs.hasOwnProp(options, "roundedDecimal") ? options.roundedDecimal : "round";
50
+ const negativeFormat = chunk7C7TQC5J_cjs.hasOwnProp(options, "negativeFormat") ? options.negativeFormat : "dash";
51
+ let separatorDecimals = chunk7C7TQC5J_cjs.hasOwnProp(options, "separatorDecimals") ? options.separatorDecimals : ",";
52
+ let separator = chunk7C7TQC5J_cjs.hasOwnProp(options, "separator") ? options.separator : ".";
53
+ if (!chunk7C7TQC5J_cjs.isString(separator) || !chunk7C7TQC5J_cjs.isString(separatorDecimals) || !chunk7C7TQC5J_cjs.isString(suffixCurrency) || !chunk7C7TQC5J_cjs.isString(suffixDecimal)) {
52
54
  throw new TypeError(
53
- `Parameter \`separator\`, \`separatorDecimals\`, \`suffixCurrency\` and \`suffixDecimal\` property of the \`options\` (second parameter) must be of type \`string\`, but received: ['separator': \`${chunkF3WBQKRI_cjs.getPreciseType(
55
+ `Parameter \`separator\`, \`separatorDecimals\`, \`suffixCurrency\` and \`suffixDecimal\` property of the \`options\` (second parameter) must be of type \`string\`, but received: ['separator': \`${chunk7C7TQC5J_cjs.getPreciseType(
54
56
  separator
55
- )}\`, 'separatorDecimals': \`${chunkF3WBQKRI_cjs.getPreciseType(
57
+ )}\`, 'separatorDecimals': \`${chunk7C7TQC5J_cjs.getPreciseType(
56
58
  separatorDecimals
57
- )}\`, 'suffixCurrency': \`${chunkF3WBQKRI_cjs.getPreciseType(
59
+ )}\`, 'suffixCurrency': \`${chunk7C7TQC5J_cjs.getPreciseType(
58
60
  suffixCurrency
59
- )}\`, 'suffixDecimal': \`${chunkF3WBQKRI_cjs.getPreciseType(suffixDecimal)}\`].`
61
+ )}\`, 'suffixDecimal': \`${chunk7C7TQC5J_cjs.getPreciseType(suffixDecimal)}\`].`
60
62
  );
61
63
  }
62
- if (!chunkF3WBQKRI_cjs.isBoolean(decimal) || !chunkF3WBQKRI_cjs.isBoolean(endDecimal) || !chunkF3WBQKRI_cjs.isBoolean(indianFormat)) {
64
+ if (!chunk7C7TQC5J_cjs.isBoolean(decimal) || !chunk7C7TQC5J_cjs.isBoolean(endDecimal) || !chunk7C7TQC5J_cjs.isBoolean(indianFormat)) {
63
65
  throw new TypeError(
64
- `Parameter \`decimal\`, \`endDecimal\` and \`indianFormat\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: ['decimal': \`${chunkF3WBQKRI_cjs.getPreciseType(
66
+ `Parameter \`decimal\`, \`endDecimal\` and \`indianFormat\` property of the \`options\` (second parameter) must be of type \`boolean\`, but received: ['decimal': \`${chunk7C7TQC5J_cjs.getPreciseType(
65
67
  decimal
66
- )}\`, 'endDecimal': \`${chunkF3WBQKRI_cjs.getPreciseType(
68
+ )}\`, 'endDecimal': \`${chunk7C7TQC5J_cjs.getPreciseType(
67
69
  endDecimal
68
- )}\`, 'indianFormat': \`${chunkF3WBQKRI_cjs.getPreciseType(indianFormat)}\`].`
70
+ )}\`, 'indianFormat': \`${chunk7C7TQC5J_cjs.getPreciseType(indianFormat)}\`].`
69
71
  );
70
72
  }
71
73
  if (!chunkDVMHRLKP_cjs.isInteger(totalDecimal)) {
72
74
  throw new TypeError(
73
- `Parameter \`totalDecimal\` property of the \`options\` (second parameter) must be of type \`integer-number\`, but received: \`${chunkF3WBQKRI_cjs.getPreciseType(
75
+ `Parameter \`totalDecimal\` property of the \`options\` (second parameter) must be of type \`integer-number\`, but received: \`${chunk7C7TQC5J_cjs.getPreciseType(
74
76
  totalDecimal
75
- )}\`, with value: \`${chunkYC7AK3KX_cjs.safeStableStringify(length)}\`.`
77
+ )}\`, with value: \`${chunkH44QVAZL_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
- `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(
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: \`${chunk7C7TQC5J_cjs.getPreciseType(
81
85
  roundedDecimal
82
- )}\`, with value: \`${chunkYC7AK3KX_cjs.safeStableStringify(roundedDecimal)}\`.`
86
+ )}\`, with value: \`${chunkH44QVAZL_cjs.safeStableStringify(roundedDecimal, {
87
+ keepUndefined: true
88
+ })}\`.`
83
89
  );
84
90
  }
85
- if (!(negativeFormat === "abs" || negativeFormat === "brackets" || negativeFormat === "dash" || chunkF3WBQKRI_cjs.isPlainObject(negativeFormat))) {
91
+ if (!(negativeFormat === "abs" || negativeFormat === "brackets" || negativeFormat === "dash" || chunk7C7TQC5J_cjs.isPlainObject(negativeFormat))) {
86
92
  throw new TypeError(
87
- `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(
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: \`${chunk7C7TQC5J_cjs.getPreciseType(
88
94
  negativeFormat
89
- )}\`, with value: \`${chunkYC7AK3KX_cjs.safeStableStringify(negativeFormat)}\`.`
95
+ )}\`, with value: \`${chunkH44QVAZL_cjs.safeStableStringify(negativeFormat, {
96
+ keepUndefined: true
97
+ })}\`.`
90
98
  );
91
99
  }
92
- const rawNum = chunkF3WBQKRI_cjs.isString(value) ? chunkEK7FSI7F_cjs.parseCurrencyString(value) : value;
93
- if (chunkF3WBQKRI_cjs.isNaN(rawNum)) {
100
+ const rawNum = chunk7C7TQC5J_cjs.isString(value) ? chunk2XGQQZ6A_cjs.parseCurrencyString(value) : value;
101
+ if (chunk7C7TQC5J_cjs.isNaN(rawNum)) {
94
102
  throw new TypeError(
95
103
  `First parameter (\`value\`) could not be parsed into a valid \`number\`.`
96
104
  );
@@ -129,7 +137,7 @@ var formatCurrency = (value, options = {}) => {
129
137
  } else {
130
138
  formattedInteger = (suffixCurrency.trim().length ? suffixCurrency : "") + integerPart.replace(/\B(?=(\d{3})+(?!\d))/g, separator);
131
139
  }
132
- if (decimal && !chunkF3WBQKRI_cjs.isUndefined(decimalPartRaw) && totalDecimal > 0) {
140
+ if (decimal && !chunk7C7TQC5J_cjs.isUndefined(decimalPartRaw) && totalDecimal > 0) {
133
141
  let formattedDecimal = separatorDecimals + decimalPartRaw;
134
142
  if (endDecimal) formattedDecimal += suffixDecimal;
135
143
  formattedInteger += formattedDecimal;
@@ -139,32 +147,34 @@ var formatCurrency = (value, options = {}) => {
139
147
  formattedInteger = "-" + formattedInteger;
140
148
  } else if (negativeFormat === "brackets") {
141
149
  formattedInteger = "(" + formattedInteger + ")";
142
- } else if (negativeFormat === "abs") ; else if (chunkF3WBQKRI_cjs.isPlainObject(negativeFormat)) {
143
- if (chunkF3WBQKRI_cjs.hasOwnProp(negativeFormat, "custom")) {
150
+ } else if (negativeFormat === "abs") ; else if (chunk7C7TQC5J_cjs.isPlainObject(negativeFormat)) {
151
+ if (chunk7C7TQC5J_cjs.hasOwnProp(negativeFormat, "custom")) {
144
152
  const formatCustomNegative = negativeFormat.custom;
145
- if (!chunkF3WBQKRI_cjs.isFunction(formatCustomNegative)) {
153
+ if (!chunk7C7TQC5J_cjs.isFunction(formatCustomNegative)) {
146
154
  throw new TypeError(
147
- `Parameter \`negativeFormat.custom\` property of the \`options\` (second parameter) must be of type function: \`(formatted: string) => string\`, but received: \`${chunkF3WBQKRI_cjs.getPreciseType(
155
+ `Parameter \`negativeFormat.custom\` property of the \`options\` (second parameter) must be of type function: \`(formatted: string) => string\`, but received: \`${chunk7C7TQC5J_cjs.getPreciseType(
148
156
  formatCustomNegative
149
157
  )}\`.`
150
158
  );
151
159
  }
152
160
  const result = formatCustomNegative(formattedInteger);
153
- chunkK63WO3XA_cjs.assertIsString(result, {
161
+ chunkWKM6UVMG_cjs.assertIsString(result, {
154
162
  message: ({ currentType, validType }) => `Parameter \`negativeFormat.custom\` property of the \`options\` (second parameter) expected return a \`${validType}\` type value, but received: \`${currentType}\`.`
155
163
  });
156
164
  formattedInteger = result;
157
165
  } else {
158
166
  const formatStyleNegative = negativeFormat.style || "dash";
159
- const formatSpaceNegative = !chunkF3WBQKRI_cjs.isUndefined(negativeFormat.space) ? negativeFormat.space : false;
160
- chunkF3WBQKRI_cjs.assertIsBoolean(formatSpaceNegative, {
167
+ const formatSpaceNegative = !chunk7C7TQC5J_cjs.isUndefined(negativeFormat.space) ? negativeFormat.space : false;
168
+ chunk7C7TQC5J_cjs.assertIsBoolean(formatSpaceNegative, {
161
169
  message: ({ currentType, validType }) => `Parameter \`negativeFormat.space\` property of the \`options\` (second parameter) must be of type \`${validType} or undefined\`, but received: \`${currentType}\`.`
162
170
  });
163
171
  if (!(formatStyleNegative === "abs" || formatStyleNegative === "brackets" || formatStyleNegative === "dash")) {
164
172
  throw new TypeError(
165
- `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(
173
+ `Parameter \`negativeFormat.style\` property of the \`options\` (second parameter) must be of type \`string\` must be of type "abs" | "brackets" | "dash", but received: \`${chunk7C7TQC5J_cjs.getPreciseType(
166
174
  formatStyleNegative
167
- )}\`, with value: \`${chunkYC7AK3KX_cjs.safeStableStringify(formatStyleNegative)}\`.`
175
+ )}\`, with value: \`${chunkH44QVAZL_cjs.safeStableStringify(formatStyleNegative, {
176
+ keepUndefined: true
177
+ })}\`.`
168
178
  );
169
179
  }
170
180
  switch (formatStyleNegative) {
@@ -182,21 +192,21 @@ var formatCurrency = (value, options = {}) => {
182
192
  };
183
193
 
184
194
  var formatNumber = (value, separator = ",") => {
185
- if (!chunkF3WBQKRI_cjs.isString(value) && !chunkB4SDEBN7_cjs.isFinite(value)) {
195
+ if (!chunk7C7TQC5J_cjs.isString(value) && !chunkPWKOFPAH_cjs.isFinite(value)) {
186
196
  throw new TypeError(
187
- `First parameter (\`value\`) must be of type \`string\` or \`primitive number\`, but received: \`${chunkF3WBQKRI_cjs.getPreciseType(
197
+ `First parameter (\`value\`) must be of type \`string\` or \`primitive number\`, but received: \`${chunk7C7TQC5J_cjs.getPreciseType(
188
198
  value
189
199
  )}\`.`
190
200
  );
191
201
  }
192
- if (!chunkF3WBQKRI_cjs.isString(separator)) {
202
+ if (!chunk7C7TQC5J_cjs.isString(separator)) {
193
203
  throw new TypeError(
194
- `Second parameter (\`separator\`) must be of type \`string\` or empty as \`undefined\`, but received: \`${chunkF3WBQKRI_cjs.getPreciseType(
204
+ `Second parameter (\`separator\`) must be of type \`string\` or empty as \`undefined\`, but received: \`${chunk7C7TQC5J_cjs.getPreciseType(
195
205
  separator
196
206
  )}\`.`
197
207
  );
198
208
  }
199
- separator = chunkF3WBQKRI_cjs.isString(separator) ? separator : ",";
209
+ separator = chunk7C7TQC5J_cjs.isString(separator) ? separator : ",";
200
210
  const decimalSeparator = separator === "." ? "," : separator === "," ? "." : ".";
201
211
  const stringValue = value.toString().trim();
202
212
  const lastDot = stringValue.lastIndexOf(".");
@@ -235,42 +245,42 @@ var isValidParseAsYouType = (parsedAsYouType) => {
235
245
  };
236
246
 
237
247
  function formatPhoneNumber(value, options = {}) {
238
- if (chunkF3WBQKRI_cjs.isNil(value)) return "";
239
- if (!chunkF3WBQKRI_cjs.isString(value) && !chunkF3WBQKRI_cjs.isNumber(value)) {
248
+ if (chunk7C7TQC5J_cjs.isNil(value)) return "";
249
+ if (!chunk7C7TQC5J_cjs.isString(value) && !chunk7C7TQC5J_cjs.isNumber(value)) {
240
250
  throw new TypeError(
241
- `First parameter (\`value\`) must be of type \`string\`, \`number\`, \`null\` or \`undefined\`, but received: \`${chunkF3WBQKRI_cjs.getPreciseType(
251
+ `First parameter (\`value\`) must be of type \`string\`, \`number\`, \`null\` or \`undefined\`, but received: \`${chunk7C7TQC5J_cjs.getPreciseType(
242
252
  value
243
253
  )}\`.`
244
254
  );
245
255
  }
246
- chunkF3WBQKRI_cjs.assertIsPlainObject(options, {
256
+ chunk7C7TQC5J_cjs.assertIsPlainObject(options, {
247
257
  message: ({ currentType, validType }) => `Second parameter (\`options\`) must be of type \`${validType}\`, but received: \`${currentType}\`.`
248
258
  });
249
- const takeNumberOnly = chunkF3WBQKRI_cjs.hasOwnProp(options, "takeNumberOnly") ? options.takeNumberOnly : false;
250
- const checkValidOnly = chunkF3WBQKRI_cjs.hasOwnProp(options, "checkValidOnly") ? options.checkValidOnly : false;
251
- const defaultCountry = chunkF3WBQKRI_cjs.hasOwnProp(
259
+ const takeNumberOnly = chunk7C7TQC5J_cjs.hasOwnProp(options, "takeNumberOnly") ? options.takeNumberOnly : false;
260
+ const checkValidOnly = chunk7C7TQC5J_cjs.hasOwnProp(options, "checkValidOnly") ? options.checkValidOnly : false;
261
+ const defaultCountry = chunk7C7TQC5J_cjs.hasOwnProp(
252
262
  options,
253
263
  "defaultCountry"
254
264
  ) ? options.defaultCountry : void 0;
255
- const separator = chunkF3WBQKRI_cjs.hasOwnProp(options, "separator") ? options.separator : " ";
256
- const prependPlusCountryCode = chunkF3WBQKRI_cjs.hasOwnProp(options, "prependPlusCountryCode") ? options.prependPlusCountryCode : true;
257
- const outputFormat = chunkF3WBQKRI_cjs.hasOwnProp(options, "outputFormat") ? options.outputFormat : "INTERNATIONAL";
258
- const openingNumberCountry = chunkF3WBQKRI_cjs.hasOwnProp(options, "openingNumberCountry") ? options.openingNumberCountry : "";
259
- const closingNumberCountry = chunkF3WBQKRI_cjs.hasOwnProp(options, "closingNumberCountry") ? options.closingNumberCountry : "";
260
- if (!chunkF3WBQKRI_cjs.isBoolean(takeNumberOnly) || !chunkF3WBQKRI_cjs.isBoolean(checkValidOnly) || !chunkF3WBQKRI_cjs.isBoolean(prependPlusCountryCode)) {
265
+ const separator = chunk7C7TQC5J_cjs.hasOwnProp(options, "separator") ? options.separator : " ";
266
+ const prependPlusCountryCode = chunk7C7TQC5J_cjs.hasOwnProp(options, "prependPlusCountryCode") ? options.prependPlusCountryCode : true;
267
+ const outputFormat = chunk7C7TQC5J_cjs.hasOwnProp(options, "outputFormat") ? options.outputFormat : "INTERNATIONAL";
268
+ const openingNumberCountry = chunk7C7TQC5J_cjs.hasOwnProp(options, "openingNumberCountry") ? options.openingNumberCountry : "";
269
+ const closingNumberCountry = chunk7C7TQC5J_cjs.hasOwnProp(options, "closingNumberCountry") ? options.closingNumberCountry : "";
270
+ if (!chunk7C7TQC5J_cjs.isBoolean(takeNumberOnly) || !chunk7C7TQC5J_cjs.isBoolean(checkValidOnly) || !chunk7C7TQC5J_cjs.isBoolean(prependPlusCountryCode)) {
261
271
  throw new TypeError(
262
- `Parameter \`takeNumberOnly\`, \`checkValidOnly\` and \`prependPlusCountryCode\` property of the \`options\` (second parameter) must be of type \`boolean\` or unset as \`undefined\` value, but received: ['takeNumberOnly': \`${chunkF3WBQKRI_cjs.getPreciseType(
272
+ `Parameter \`takeNumberOnly\`, \`checkValidOnly\` and \`prependPlusCountryCode\` property of the \`options\` (second parameter) must be of type \`boolean\` or unset as \`undefined\` value, but received: ['takeNumberOnly': \`${chunk7C7TQC5J_cjs.getPreciseType(
263
273
  takeNumberOnly
264
- )}\`, 'checkValidOnly': \`${chunkF3WBQKRI_cjs.getPreciseType(
274
+ )}\`, 'checkValidOnly': \`${chunk7C7TQC5J_cjs.getPreciseType(
265
275
  checkValidOnly
266
- )}\`, 'prependPlusCountryCode': \`${chunkF3WBQKRI_cjs.getPreciseType(prependPlusCountryCode)}\`].`
276
+ )}\`, 'prependPlusCountryCode': \`${chunk7C7TQC5J_cjs.getPreciseType(prependPlusCountryCode)}\`].`
267
277
  );
268
278
  }
269
- if (!chunkF3WBQKRI_cjs.isUndefined(defaultCountry) && !max.isSupportedCountry(defaultCountry)) {
279
+ if (!chunk7C7TQC5J_cjs.isUndefined(defaultCountry) && !max.isSupportedCountry(defaultCountry)) {
270
280
  throw new TypeError(
271
- `Parameter \`defaultCountry\` property of the \`options\` (second parameter) must be of type \`string\` as \`CountryCode\` (ISO-3166-1 alpha-2) or unset as \`undefined\` value, but received: \`${chunkF3WBQKRI_cjs.getPreciseType(
281
+ `Parameter \`defaultCountry\` property of the \`options\` (second parameter) must be of type \`string\` as \`CountryCode\` (ISO-3166-1 alpha-2) or unset as \`undefined\` value, but received: \`${chunk7C7TQC5J_cjs.getPreciseType(
272
282
  defaultCountry
273
- )}\`, with value: \`${chunkYC7AK3KX_cjs.safeStableStringify(defaultCountry, {
283
+ )}\`, with value: \`${chunkH44QVAZL_cjs.safeStableStringify(defaultCountry, {
274
284
  keepUndefined: true
275
285
  })}\`.
276
286
 
@@ -279,21 +289,21 @@ See: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_e
279
289
  }
280
290
  if (!["INTERNATIONAL", "NATIONAL", "RFC3966", "E.164"].includes(outputFormat)) {
281
291
  throw new TypeError(
282
- `Parameter \`outputFormat\` property of the \`options\` (second parameter) must be of type \`string\` as \`OutputFormat\` ("NATIONAL" | "INTERNATIONAL" | "E.164" | "RFC3966") or unset as \`undefined\` (default value to: \`INTERNATIONAL\`) value, but received: \`${chunkF3WBQKRI_cjs.getPreciseType(
292
+ `Parameter \`outputFormat\` property of the \`options\` (second parameter) must be of type \`string\` as \`OutputFormat\` ("NATIONAL" | "INTERNATIONAL" | "E.164" | "RFC3966") or unset as \`undefined\` (default value to: \`INTERNATIONAL\`) value, but received: \`${chunk7C7TQC5J_cjs.getPreciseType(
283
293
  outputFormat
284
- )}\`, with value: ${chunkYC7AK3KX_cjs.safeStableStringify(outputFormat, { keepUndefined: true })}.`
294
+ )}\`, with value: ${chunkH44QVAZL_cjs.safeStableStringify(outputFormat, { keepUndefined: true })}.`
285
295
  );
286
296
  }
287
- if (!chunkF3WBQKRI_cjs.isString(separator) || !chunkF3WBQKRI_cjs.isString(openingNumberCountry) || !chunkF3WBQKRI_cjs.isString(closingNumberCountry)) {
297
+ if (!chunk7C7TQC5J_cjs.isString(separator) || !chunk7C7TQC5J_cjs.isString(openingNumberCountry) || !chunk7C7TQC5J_cjs.isString(closingNumberCountry)) {
288
298
  throw new TypeError(
289
- `Parameter \`separator\`, \`plusNumberCountry\`, \`openingNumberCountry\` and \`closingNumberCountry\` property of the \`options\` (second parameter) must be of type \`string\` or unset as \`undefined\` value, but received: ['separator': \`${chunkF3WBQKRI_cjs.getPreciseType(
299
+ `Parameter \`separator\`, \`plusNumberCountry\`, \`openingNumberCountry\` and \`closingNumberCountry\` property of the \`options\` (second parameter) must be of type \`string\` or unset as \`undefined\` value, but received: ['separator': \`${chunk7C7TQC5J_cjs.getPreciseType(
290
300
  separator
291
- )}\`,'openingNumberCountry': \`${chunkF3WBQKRI_cjs.getPreciseType(
301
+ )}\`,'openingNumberCountry': \`${chunk7C7TQC5J_cjs.getPreciseType(
292
302
  openingNumberCountry
293
- )}\`, 'closingNumberCountry': \`${chunkF3WBQKRI_cjs.getPreciseType(closingNumberCountry)}\`].`
303
+ )}\`, 'closingNumberCountry': \`${chunk7C7TQC5J_cjs.getPreciseType(closingNumberCountry)}\`].`
294
304
  );
295
305
  }
296
- if (!chunkF3WBQKRI_cjs.isString(value)) value = String(value);
306
+ if (!chunk7C7TQC5J_cjs.isString(value)) value = String(value);
297
307
  const parsedPhoneNumber = parsingAsYouType(value, defaultCountry);
298
308
  const validPhoneNumber = isValidParseAsYouType(parsedPhoneNumber);
299
309
  if (checkValidOnly) return validPhoneNumber;
@@ -307,7 +317,7 @@ See: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_e
307
317
  const [cc, ...rest] = intlNumb.split(" ");
308
318
  const countryCode = prependPlusCountryCode ? cc : cc.replace(/^\++/, "");
309
319
  const restWithSeparator = rest.join(separator);
310
- if (chunkF3WBQKRI_cjs.isNonEmptyString(openingNumberCountry) && chunkF3WBQKRI_cjs.isNonEmptyString(closingNumberCountry)) {
320
+ if (chunk7C7TQC5J_cjs.isNonEmptyString(openingNumberCountry) && chunk7C7TQC5J_cjs.isNonEmptyString(closingNumberCountry)) {
311
321
  return `${openingNumberCountry}${countryCode}${closingNumberCountry} ${restWithSeparator}`;
312
322
  }
313
323
  return `${countryCode} ${restWithSeparator}`;
@@ -337,7 +347,7 @@ var _censor = (str, minCensor, maxPercentage, hashSeed) => {
337
347
  const indexes = /* @__PURE__ */ new Set();
338
348
  let i = 0;
339
349
  while (indexes.size < totalCensor) {
340
- const idx = !chunkF3WBQKRI_cjs.isUndefined(hashSeed) ? (hashSeed + str.length + i * 31) % str.length : Math.floor(Math.random() * str.length);
350
+ const idx = !chunk7C7TQC5J_cjs.isUndefined(hashSeed) ? (hashSeed + str.length + i * 31) % str.length : Math.floor(Math.random() * str.length);
341
351
  indexes.add(idx);
342
352
  i++;
343
353
  }
@@ -348,16 +358,18 @@ var _censor = (str, minCensor, maxPercentage, hashSeed) => {
348
358
  };
349
359
 
350
360
  var censorEmail = (email, options = {}) => {
351
- if (!chunkF3WBQKRI_cjs.isNonEmptyString(email)) return "";
352
- chunkF3WBQKRI_cjs.assertIsPlainObject(options, {
361
+ if (!chunk7C7TQC5J_cjs.isNonEmptyString(email)) return "";
362
+ chunk7C7TQC5J_cjs.assertIsPlainObject(options, {
353
363
  message: ({ currentType, validType }) => `Second parameter (\`options\`) must be of type \`${validType}\`, but received: \`${currentType}\`.`
354
364
  });
355
- const mode = chunkF3WBQKRI_cjs.hasOwnProp(options, "mode") ? options.mode : "fixed";
365
+ const mode = chunk7C7TQC5J_cjs.hasOwnProp(options, "mode") ? options.mode : "fixed";
356
366
  if (mode !== "random" && mode !== "fixed") {
357
367
  throw new TypeError(
358
- `Parameter \`mode\` property of the \`options\` (second parameter) must be one of "fixed" or "random", but received: \`${chunkF3WBQKRI_cjs.getPreciseType(
368
+ `Parameter \`mode\` property of the \`options\` (second parameter) must be one of "fixed" or "random", but received: \`${chunk7C7TQC5J_cjs.getPreciseType(
359
369
  mode
360
- )}\`, with value: \`${chunkYC7AK3KX_cjs.safeStableStringify(mode)}\`.`
370
+ )}\`, with value: \`${chunkH44QVAZL_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,}$/;
@@ -377,29 +389,31 @@ var censorEmail = (email, options = {}) => {
377
389
  };
378
390
 
379
391
  function chunkString(subject, limiter, options = {}) {
380
- if (chunkF3WBQKRI_cjs.isNil(subject) || limiter <= 0) return subject;
381
- chunkK63WO3XA_cjs.assertIsString(subject, {
392
+ if (chunk7C7TQC5J_cjs.isNil(subject) || limiter <= 0) return subject;
393
+ chunkWKM6UVMG_cjs.assertIsString(subject, {
382
394
  message: ({ currentType, validType }) => `First parameter (\`subject\`) must be of type \`${validType}\`, but received: \`${currentType}\`.`
383
395
  });
384
396
  if (!chunkDVMHRLKP_cjs.isInteger(limiter)) {
385
397
  throw new TypeError(
386
- `Second parameter (\`limiter\`) must be of type \`integer-number\`, but received: \`${chunkF3WBQKRI_cjs.getPreciseType(
398
+ `Second parameter (\`limiter\`) must be of type \`integer-number\`, but received: \`${chunk7C7TQC5J_cjs.getPreciseType(
387
399
  limiter
388
- )}\`, with value: \`${chunkYC7AK3KX_cjs.safeStableStringify(limiter)}\`.`
400
+ )}\`, with value: \`${chunkH44QVAZL_cjs.safeStableStringify(limiter, {
401
+ keepUndefined: true
402
+ })}\`.`
389
403
  );
390
404
  }
391
- chunkF3WBQKRI_cjs.assertIsPlainObject(options, {
405
+ chunk7C7TQC5J_cjs.assertIsPlainObject(options, {
392
406
  message: ({ currentType, validType }) => `Third parameter (\`options\`) must be of type \`${validType}\`, but received: \`${currentType}\`.`
393
407
  });
394
- const separator = chunkF3WBQKRI_cjs.hasOwnProp(options, "separator") ? options.separator : " ";
395
- const reCountAfterSpace = chunkF3WBQKRI_cjs.hasOwnProp(options, "reCountAfterSpace") ? options.reCountAfterSpace : false;
396
- chunkK63WO3XA_cjs.assertIsString(separator, {
408
+ const separator = chunk7C7TQC5J_cjs.hasOwnProp(options, "separator") ? options.separator : " ";
409
+ const reCountAfterSpace = chunk7C7TQC5J_cjs.hasOwnProp(options, "reCountAfterSpace") ? options.reCountAfterSpace : false;
410
+ chunkWKM6UVMG_cjs.assertIsString(separator, {
397
411
  message: ({ currentType, validType }) => `Parameter \`separator\` property of the \`options\` (third parameter) must be of type \`${validType}\`, but received: \`${currentType}\`.`
398
412
  });
399
- chunkF3WBQKRI_cjs.assertIsBoolean(reCountAfterSpace, {
413
+ chunk7C7TQC5J_cjs.assertIsBoolean(reCountAfterSpace, {
400
414
  message: ({ currentType, validType }) => `Parameter \`reCountAfterSpace\` property of the \`options\` (third parameter) must be of type \`${validType}\`, but received: \`${currentType}\`.`
401
415
  });
402
- subject = chunkB6UIKBHR_cjs.normalizeSpaces(subject);
416
+ subject = chunkQZI5PVCI_cjs.normalizeSpaces(subject);
403
417
  if (!reCountAfterSpace) {
404
418
  let result = "";
405
419
  let currentCount = 0;
@@ -442,28 +456,30 @@ function chunkString(subject, limiter, options = {}) {
442
456
  }
443
457
 
444
458
  var truncateString = (text, options = {}) => {
445
- if (!chunkF3WBQKRI_cjs.isNonEmptyString(text)) return "";
446
- chunkF3WBQKRI_cjs.assertIsPlainObject(options, {
459
+ if (!chunk7C7TQC5J_cjs.isNonEmptyString(text)) return "";
460
+ chunk7C7TQC5J_cjs.assertIsPlainObject(options, {
447
461
  message: ({ currentType, validType }) => `Seconds parameter (\`options\`) must be of type \`${validType}\`, but received: \`${currentType}\`.`
448
462
  });
449
- const trim = chunkF3WBQKRI_cjs.hasOwnProp(options, "trim") ? options.trim : true;
450
- const length2 = chunkF3WBQKRI_cjs.hasOwnProp(options, "length") ? options.length : 10;
451
- let ending = chunkF3WBQKRI_cjs.hasOwnProp(options, "ending") ? options.ending : "...";
463
+ const trim = chunk7C7TQC5J_cjs.hasOwnProp(options, "trim") ? options.trim : true;
464
+ const length2 = chunk7C7TQC5J_cjs.hasOwnProp(options, "length") ? options.length : 10;
465
+ let ending = chunk7C7TQC5J_cjs.hasOwnProp(options, "ending") ? options.ending : "...";
452
466
  if (!chunkDVMHRLKP_cjs.isInteger(length2)) {
453
467
  throw new TypeError(
454
- `Parameter \`length\` property of the \`options\` (second parameter) must be of type \`integer-number\`, but received: \`${chunkF3WBQKRI_cjs.getPreciseType(
468
+ `Parameter \`length\` property of the \`options\` (second parameter) must be of type \`integer-number\`, but received: \`${chunk7C7TQC5J_cjs.getPreciseType(
455
469
  length2
456
- )}\`, with value: \`${chunkYC7AK3KX_cjs.safeStableStringify(length2)}\`.`
470
+ )}\`, with value: \`${chunkH44QVAZL_cjs.safeStableStringify(length2, {
471
+ keepUndefined: true
472
+ })}\`.`
457
473
  );
458
474
  }
459
475
  if (length2 < 1) return "";
460
- chunkK63WO3XA_cjs.assertIsString(ending, {
476
+ chunkWKM6UVMG_cjs.assertIsString(ending, {
461
477
  message: ({ currentType, validType }) => `Parameter \`ending\` property of the \`options\` (second parameter) must be of type \`${validType}\`, but received: \`${currentType}\`.`
462
478
  });
463
- chunkF3WBQKRI_cjs.assertIsBoolean(trim, {
479
+ chunk7C7TQC5J_cjs.assertIsBoolean(trim, {
464
480
  message: ({ currentType, validType }) => `Parameter \`trim\` property of the \`options\` (second parameter) must be of type \`${validType}\`, but received: \`${currentType}\`.`
465
481
  });
466
- if (chunkNREACG6M_cjs.isEmptyString(ending)) {
482
+ if (chunkFWWPEL7J_cjs.isEmptyString(ending)) {
467
483
  ending = "...";
468
484
  } else {
469
485
  ending = ending.trim();
@@ -476,24 +492,24 @@ var truncateString = (text, options = {}) => {
476
492
  return cleanSliced + ending;
477
493
  };
478
494
  var formatDateFns = (date, options = {}) => {
479
- if (chunkF3WBQKRI_cjs.isNil(date) || !(chunkYC7AK3KX_cjs.isDate(date) || chunkF3WBQKRI_cjs.isNonEmptyString(date))) return null;
480
- if (!chunkF3WBQKRI_cjs.isPlainObject(options)) {
495
+ if (chunk7C7TQC5J_cjs.isNil(date) || !(chunkH44QVAZL_cjs.isDate(date) || chunk7C7TQC5J_cjs.isNonEmptyString(date))) return null;
496
+ if (!chunk7C7TQC5J_cjs.isPlainObject(options)) {
481
497
  options = {};
482
498
  }
483
499
  const { inputFormat, locale: locale$1 = "en", inputLocale = "en", ...restOptions } = options;
484
- const format = chunkF3WBQKRI_cjs.hasOwnProp(options, "format") && chunkF3WBQKRI_cjs.isNonEmptyString(options.format) ? options.format : "dd MMM yyyy - HH:mm:ss";
500
+ const format = chunk7C7TQC5J_cjs.hasOwnProp(options, "format") && chunk7C7TQC5J_cjs.isNonEmptyString(options.format) ? options.format : "dd MMM yyyy - HH:mm:ss";
485
501
  let parsedDate;
486
502
  try {
487
- if (chunkF3WBQKRI_cjs.isNonEmptyString(date) && inputFormat && inputLocale) {
488
- const valueOfInputLocale = chunkF3WBQKRI_cjs.isNonEmptyString(inputLocale) ? inputLocale === "id" ? locale.id : locale.enUS : inputLocale;
503
+ if (chunk7C7TQC5J_cjs.isNonEmptyString(date) && inputFormat && inputLocale) {
504
+ const valueOfInputLocale = chunk7C7TQC5J_cjs.isNonEmptyString(inputLocale) ? inputLocale === "id" ? locale.id : locale.enUS : inputLocale;
489
505
  parsedDate = dateFns.parse(date, inputFormat, /* @__PURE__ */ new Date(), {
490
506
  locale: valueOfInputLocale
491
507
  });
492
508
  } else {
493
509
  parsedDate = new Date(date);
494
510
  }
495
- if (chunkF3WBQKRI_cjs.isNaN(parsedDate.getTime())) return null;
496
- const valueOfLocale = chunkF3WBQKRI_cjs.isNonEmptyString(locale$1) ? locale$1 === "id" ? locale.id : locale.enUS : locale$1;
511
+ if (chunk7C7TQC5J_cjs.isNaN(parsedDate.getTime())) return null;
512
+ const valueOfLocale = chunk7C7TQC5J_cjs.isNonEmptyString(locale$1) ? locale$1 === "id" ? locale.id : locale.enUS : locale$1;
497
513
  return dateFns.format(parsedDate, format, {
498
514
  ...restOptions,
499
515
  locale: valueOfLocale
@@ -504,16 +520,16 @@ var formatDateFns = (date, options = {}) => {
504
520
  };
505
521
 
506
522
  var formatDateIntl = (date, options) => {
507
- if (chunkF3WBQKRI_cjs.isNil(date) || !(chunkYC7AK3KX_cjs.isDate(date) || chunkF3WBQKRI_cjs.isNonEmptyString(date))) return null;
523
+ if (chunk7C7TQC5J_cjs.isNil(date) || !(chunkH44QVAZL_cjs.isDate(date) || chunk7C7TQC5J_cjs.isNonEmptyString(date))) return null;
508
524
  const parsedDate = new Date(date);
509
- if (chunkF3WBQKRI_cjs.isNaN(parsedDate.getTime())) return null;
510
- if (!chunkF3WBQKRI_cjs.isPlainObject(options)) {
525
+ if (chunk7C7TQC5J_cjs.isNaN(parsedDate.getTime())) return null;
526
+ if (!chunk7C7TQC5J_cjs.isPlainObject(options)) {
511
527
  options = {};
512
528
  }
513
529
  const { locale = "en-US", ...restProps } = options;
514
530
  try {
515
531
  return new Intl.DateTimeFormat(
516
- chunkF3WBQKRI_cjs.isNonEmptyString(locale) ? locale.trim() : "en-US",
532
+ chunk7C7TQC5J_cjs.isNonEmptyString(locale) ? locale.trim() : "en-US",
517
533
  restProps
518
534
  ).format(parsedDate);
519
535
  } catch {
@@ -522,16 +538,16 @@ var formatDateIntl = (date, options) => {
522
538
  };
523
539
 
524
540
  var formatDateTime = (date, format) => {
525
- if (chunkF3WBQKRI_cjs.isNil(format)) {
541
+ if (chunk7C7TQC5J_cjs.isNil(format)) {
526
542
  format = "YYYY-MM-DD hh:mm:ss";
527
543
  }
528
- if (!chunkF3WBQKRI_cjs.isString(format)) return null;
529
- if (chunkF3WBQKRI_cjs.isNil(date) || !(chunkYC7AK3KX_cjs.isDate(date) || chunkF3WBQKRI_cjs.isNonEmptyString(date))) {
544
+ if (!chunk7C7TQC5J_cjs.isString(format)) return null;
545
+ if (chunk7C7TQC5J_cjs.isNil(date) || !(chunkH44QVAZL_cjs.isDate(date) || chunk7C7TQC5J_cjs.isNonEmptyString(date))) {
530
546
  return null;
531
547
  }
532
548
  try {
533
549
  const parsedDate = new Date(date);
534
- if (chunkF3WBQKRI_cjs.isNaN(parsedDate.getTime())) return null;
550
+ if (chunk7C7TQC5J_cjs.isNaN(parsedDate.getTime())) return null;
535
551
  const pad2 = (n) => n.toString().padStart(2, "0");
536
552
  const map = {
537
553
  YYYY: parsedDate.getFullYear().toString(),
@@ -553,13 +569,13 @@ var formatDateTime = (date, format) => {
553
569
 
554
570
  var getGMTOffset = (date) => {
555
571
  try {
556
- if (chunkF3WBQKRI_cjs.isNil(date) || chunkF3WBQKRI_cjs.isString(date) && chunkNREACG6M_cjs.isEmptyString(date)) {
572
+ if (chunk7C7TQC5J_cjs.isNil(date) || chunk7C7TQC5J_cjs.isString(date) && chunkFWWPEL7J_cjs.isEmptyString(date)) {
557
573
  date = /* @__PURE__ */ new Date();
558
- } else if (!(chunkYC7AK3KX_cjs.isDate(date) || chunkF3WBQKRI_cjs.isNonEmptyString(date))) {
574
+ } else if (!(chunkH44QVAZL_cjs.isDate(date) || chunk7C7TQC5J_cjs.isNonEmptyString(date))) {
559
575
  return "0";
560
576
  }
561
577
  const parsedDate = new Date(date);
562
- if (chunkF3WBQKRI_cjs.isNaN(parsedDate.getTime())) return "0";
578
+ if (chunk7C7TQC5J_cjs.isNaN(parsedDate.getTime())) return "0";
563
579
  const padZero = (num) => num.toString().padStart(2, "0");
564
580
  let offset = parsedDate.getTimezoneOffset();
565
581
  const sign = offset < 0 ? "+" : "-";
@@ -2,12 +2,12 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.7.1.
5
+ * Version: 3.9.0.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
9
9
  */
10
- import { isEmptyValue } from './chunk-PZQC3FZY.js';
10
+ import { isEmptyValue } from './chunk-44X74C26.js';
11
11
 
12
12
  var isNonEmptyValue = (value, options = {}) => {
13
13
  return !isEmptyValue(value, options);
@@ -2,7 +2,7 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.7.1.
5
+ * Version: 3.9.0.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
@@ -2,13 +2,13 @@
2
2
  * ====================================================
3
3
  * Rzl Utils-JS.
4
4
  * ----------------------------------------------------
5
- * Version: 3.7.1.
5
+ * Version: 3.9.0.
6
6
  * Author: Rizalvin Dwiky.
7
7
  * Repository: https://github.com/rzl-zone/utils-js.
8
8
  * ====================================================
9
9
  */
10
10
  import { isBigInt } from './chunk-QNKGP5DY.js';
11
- import { assertIsPlainObject, isPlainObject, isBoolean, isNaN, hasOwnProp, getPreciseType, isUndefined, isNumberObject, isInfinityNumber, isStringObject, isBooleanObject, isFunction, isSymbol, isObjectOrArray, isSet, isArray, isNull, isNumber, isObject } from './chunk-3KTD3QDI.js';
11
+ import { assertIsPlainObject, isPlainObject, isBoolean, isNaN, hasOwnProp, getPreciseType, isUndefined, isNumberObject, isInfinityNumber, isStringObject, isBooleanObject, isFunction, isSymbol, isObjectOrArray, isSet, isArray, isNull, isNumber, isObject } from './chunk-J4TT33ZX.js';
12
12
 
13
13
  function isMap(value) {
14
14
  return Object.prototype.toString.call(value) === "[object Map]" || value instanceof Map;