@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,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
  function isInteger(value) {
2
11
  return typeof value === "number" && Number.isInteger(value);
3
12
  }
@@ -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
  'use strict';
2
11
 
3
12
  var chunk2IOOEY45_cjs = require('./chunk-2IOOEY45.cjs');
@@ -11,6 +20,7 @@ var chunkPZQ6I4JJ_cjs = require('./chunk-PZQ6I4JJ.cjs');
11
20
  var max = require('libphonenumber-js/max');
12
21
  var locale = require('date-fns/locale');
13
22
  var dateFns = require('date-fns');
23
+
14
24
  var formatIndianNumber = (numStr, separator) => {
15
25
  const lastThree = numStr.slice(-3);
16
26
  const rest = numStr.slice(0, -3);
@@ -170,6 +180,7 @@ var formatCurrency = (value, options = {}) => {
170
180
  }
171
181
  return formattedInteger;
172
182
  };
183
+
173
184
  var formatNumber = (value, separator = ",") => {
174
185
  if (!chunkPZQ6I4JJ_cjs.isString(value) && !chunkV45XJKHW_cjs.isFinite(value)) {
175
186
  throw new TypeError(
@@ -222,6 +233,7 @@ var isValidParseAsYouType = (parsedAsYouType) => {
222
233
  const parsed = !!parsedAsYouType?.isValid() && !!parsedAsYouType.getNumber();
223
234
  return parsed;
224
235
  };
236
+
225
237
  function formatPhoneNumber(value, options = {}) {
226
238
  if (chunkPZQ6I4JJ_cjs.isNil(value)) return "";
227
239
  if (!chunkPZQ6I4JJ_cjs.isString(value) && !chunkPZQ6I4JJ_cjs.isNumber(value)) {
@@ -306,6 +318,7 @@ See: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_e
306
318
  }
307
319
  return intlNumb;
308
320
  }
321
+
309
322
  var hashSeedGenerate = (mode, email) => {
310
323
  const generateSeed = () => {
311
324
  let hash = 0;
@@ -333,6 +346,7 @@ var _censor = (str, minCensor, maxPercentage, hashSeed) => {
333
346
  }
334
347
  return strArr.join("");
335
348
  };
349
+
336
350
  var censorEmail = (email, options = {}) => {
337
351
  if (!chunkPZQ6I4JJ_cjs.isNonEmptyString(email)) return "";
338
352
  chunkPZQ6I4JJ_cjs.assertIsPlainObject(options, {
@@ -361,6 +375,7 @@ var censorEmail = (email, options = {}) => {
361
375
  const censoredTLD = tld.length <= 2 ? tld : _censor(tld, 1, 0.4, hashSeed);
362
376
  return `${censoredLocal}@${censoredDomain}.${censoredTLD}`;
363
377
  };
378
+
364
379
  function chunkString(subject, limiter, options = {}) {
365
380
  if (chunkPZQ6I4JJ_cjs.isNil(subject) || limiter <= 0) return subject;
366
381
  chunkHYRQMTRH_cjs.assertIsString(subject, {
@@ -425,6 +440,7 @@ function chunkString(subject, limiter, options = {}) {
425
440
  }
426
441
  return finalSegments.join(" ");
427
442
  }
443
+
428
444
  var truncateString = (text, options = {}) => {
429
445
  if (!chunkPZQ6I4JJ_cjs.isNonEmptyString(text)) return "";
430
446
  chunkPZQ6I4JJ_cjs.assertIsPlainObject(options, {
@@ -486,6 +502,7 @@ var formatDateFns = (date, options = {}) => {
486
502
  return null;
487
503
  }
488
504
  };
505
+
489
506
  var formatDateIntl = (date, options) => {
490
507
  if (chunkPZQ6I4JJ_cjs.isNil(date) || !(chunkT7PU2V7X_cjs.isDate(date) || chunkPZQ6I4JJ_cjs.isNonEmptyString(date))) return null;
491
508
  const parsedDate = new Date(date);
@@ -503,6 +520,7 @@ var formatDateIntl = (date, options) => {
503
520
  return null;
504
521
  }
505
522
  };
523
+
506
524
  var formatDateTime = (date, format) => {
507
525
  if (chunkPZQ6I4JJ_cjs.isNil(format)) {
508
526
  format = "YYYY-MM-DD hh:mm:ss";
@@ -532,6 +550,7 @@ var formatDateTime = (date, format) => {
532
550
  return null;
533
551
  }
534
552
  };
553
+
535
554
  var getGMTOffset = (date) => {
536
555
  try {
537
556
  if (chunkPZQ6I4JJ_cjs.isNil(date) || chunkPZQ6I4JJ_cjs.isString(date) && chunkE55EQK2U_cjs.isEmptyString(date)) {
@@ -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 removeSpaces = (value, options = {
3
13
  trimOnly: false
4
14
  }) => {
@@ -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 { normalizeSpaces } from './chunk-T2T7K3KR.js';
2
11
  import { parseCurrencyString } from './chunk-IRFL4MAX.js';
3
12
  import { isFinite } from './chunk-3IBQ5MOM.js';
@@ -9,6 +18,7 @@ import { isString, getPreciseType, assertIsPlainObject, hasOwnProp, isBoolean, i
9
18
  import { isSupportedCountry, AsYouType } from 'libphonenumber-js/max';
10
19
  import { id, enUS } from 'date-fns/locale';
11
20
  import { parse, format } from 'date-fns';
21
+
12
22
  var formatIndianNumber = (numStr, separator) => {
13
23
  const lastThree = numStr.slice(-3);
14
24
  const rest = numStr.slice(0, -3);
@@ -168,6 +178,7 @@ var formatCurrency = (value, options = {}) => {
168
178
  }
169
179
  return formattedInteger;
170
180
  };
181
+
171
182
  var formatNumber = (value, separator = ",") => {
172
183
  if (!isString(value) && !isFinite(value)) {
173
184
  throw new TypeError(
@@ -220,6 +231,7 @@ var isValidParseAsYouType = (parsedAsYouType) => {
220
231
  const parsed = !!parsedAsYouType?.isValid() && !!parsedAsYouType.getNumber();
221
232
  return parsed;
222
233
  };
234
+
223
235
  function formatPhoneNumber(value, options = {}) {
224
236
  if (isNil(value)) return "";
225
237
  if (!isString(value) && !isNumber(value)) {
@@ -304,6 +316,7 @@ See: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_e
304
316
  }
305
317
  return intlNumb;
306
318
  }
319
+
307
320
  var hashSeedGenerate = (mode, email) => {
308
321
  const generateSeed = () => {
309
322
  let hash = 0;
@@ -331,6 +344,7 @@ var _censor = (str, minCensor, maxPercentage, hashSeed) => {
331
344
  }
332
345
  return strArr.join("");
333
346
  };
347
+
334
348
  var censorEmail = (email, options = {}) => {
335
349
  if (!isNonEmptyString(email)) return "";
336
350
  assertIsPlainObject(options, {
@@ -359,6 +373,7 @@ var censorEmail = (email, options = {}) => {
359
373
  const censoredTLD = tld.length <= 2 ? tld : _censor(tld, 1, 0.4, hashSeed);
360
374
  return `${censoredLocal}@${censoredDomain}.${censoredTLD}`;
361
375
  };
376
+
362
377
  function chunkString(subject, limiter, options = {}) {
363
378
  if (isNil(subject) || limiter <= 0) return subject;
364
379
  assertIsString(subject, {
@@ -423,6 +438,7 @@ function chunkString(subject, limiter, options = {}) {
423
438
  }
424
439
  return finalSegments.join(" ");
425
440
  }
441
+
426
442
  var truncateString = (text, options = {}) => {
427
443
  if (!isNonEmptyString(text)) return "";
428
444
  assertIsPlainObject(options, {
@@ -484,6 +500,7 @@ var formatDateFns = (date, options = {}) => {
484
500
  return null;
485
501
  }
486
502
  };
503
+
487
504
  var formatDateIntl = (date, options) => {
488
505
  if (isNil(date) || !(isDate(date) || isNonEmptyString(date))) return null;
489
506
  const parsedDate = new Date(date);
@@ -501,6 +518,7 @@ var formatDateIntl = (date, options) => {
501
518
  return null;
502
519
  }
503
520
  };
521
+
504
522
  var formatDateTime = (date, format) => {
505
523
  if (isNil(format)) {
506
524
  format = "YYYY-MM-DD hh:mm:ss";
@@ -530,6 +548,7 @@ var formatDateTime = (date, format) => {
530
548
  return null;
531
549
  }
532
550
  };
551
+
533
552
  var getGMTOffset = (date) => {
534
553
  try {
535
554
  if (isNil(date) || isString(date) && isEmptyString(date)) {
@@ -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 noop = () => {
2
11
  };
3
12
 
@@ -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 chunkPZQ6I4JJ_cjs = require('./chunk-PZQ6I4JJ.cjs');
13
+
4
14
  var isEmptyArray = (value) => {
5
15
  if (!chunkPZQ6I4JJ_cjs.isArray(value)) return true;
6
16
  return value.length === 0;
7
17
  };
18
+
8
19
  function isEmptyObject(value, options = {}) {
9
20
  if (!chunkPZQ6I4JJ_cjs.isObject(value)) {
10
21
  return true;
@@ -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
  'use strict';
2
11
 
3
12
  var chunkF6IPNNSJ_cjs = require('../chunk-F6IPNNSJ.cjs');
@@ -15,10 +24,8 @@ require('../chunk-6JFZL7YE.cjs');
15
24
  require('../chunk-BAV5T2E3.cjs');
16
25
  var chunkT7PU2V7X_cjs = require('../chunk-T7PU2V7X.cjs');
17
26
  require('../chunk-UDA26MCU.cjs');
18
- require('../chunk-PZQ6I4JJ.cjs');
19
-
20
-
21
-
27
+ require('../chunk-PZQ6I4JJ.cjs');
28
+
22
29
  Object.defineProperty(exports, "convertType", {
23
30
  enumerable: true,
24
31
  get: function () { return chunkF6IPNNSJ_cjs.convertType; }
@@ -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{Nullish,KeepNull,KeepUndef,AnyFunction,NormalizeEmptyArraysRecursive,RemoveEmptyArrayElements,FixNeverArrayRecursive,IfNotExtends,IfExtends,IsAny,NumberRangeUnion,Prettify,OrArr,Extends,AndArr,TypedArray,WebApiObjects,IntlObjects}from'@rzl-zone/ts-types-plus';type NormalizeInputToNumberArrayUnRecursive<T>=T extends string|bigint|boolean|number|Nullish?T:HasNonNumberLikeNonNullish<T>;
2
11
  /** Detects whether `T` contains any number-like type (`string | number | bigint`).
3
12
  *
@@ -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
  export { convertType, dedupeArray, removeObjectPaths, toBooleanContent, toBooleanContentDeep, toBooleanExplicit, toBooleanLoose, toNumberArrayUnRecursive, toNumberDeep, toStringDeep, toStringDeepForce } from '../chunk-FWCKOJZM.js';
2
11
  import '../chunk-5IGC6PBH.js';
3
12
  export { filterNilArray, toStringArrayUnRecursive } from '../chunk-OI5XKNZO.js';
@@ -1,12 +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 chunkEL6A35UR_cjs = require('../chunk-EL6A35UR.cjs');
4
13
  require('../chunk-VJDDGRIK.cjs');
5
14
  require('../chunk-HYRQMTRH.cjs');
6
- require('../chunk-PZQ6I4JJ.cjs');
7
-
8
-
9
-
15
+ require('../chunk-PZQ6I4JJ.cjs');
16
+
10
17
  Object.defineProperty(exports, "disableUserInteraction", {
11
18
  enumerable: true,
12
19
  get: function () { return chunkEL6A35UR_cjs.disableUserInteraction; }
@@ -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
  /** ----------------------------------------------------------
2
11
  * * ***Utility: `disableUserInteraction`.***
3
12
  * ----------------------------------------------------------
@@ -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
  export { disableUserInteraction, enableUserInteraction, removeElementFocus, scrollToTop } from '../chunk-SIM77PU4.js';
2
11
  import '../chunk-L5RDAVVH.js';
3
12
  import '../chunk-SBKGWRS5.js';
@@ -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
  'use strict';
2
11
 
3
12
  var chunkXABCB3Y7_cjs = require('../chunk-XABCB3Y7.cjs');
@@ -9,10 +18,8 @@ require('../chunk-E55EQK2U.cjs');
9
18
  require('../chunk-HYRQMTRH.cjs');
10
19
  require('../chunk-T7PU2V7X.cjs');
11
20
  require('../chunk-UDA26MCU.cjs');
12
- require('../chunk-PZQ6I4JJ.cjs');
13
-
14
-
15
-
21
+ require('../chunk-PZQ6I4JJ.cjs');
22
+
16
23
  Object.defineProperty(exports, "censorEmail", {
17
24
  enumerable: true,
18
25
  get: function () { return chunkXABCB3Y7_cjs.censorEmail; }
@@ -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{NumberFormat,CountryCode}from'libphonenumber-js';import{OverrideTypes,ExtractStrict,Prettify,OmitStrict,AnyString}from'@rzl-zone/ts-types-plus';import{FormatOptions,Locale}from'date-fns';type NegativeFormatOptionCustom={
2
11
  /** Custom formatter function for the final formatted negative string.
3
12
  * If provided, it ***OVERRIDES*** style & space entirely. */
@@ -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
  export { censorEmail, chunkString, formatCurrency, formatDateFns, formatDateIntl, formatDateTime, formatNumber, formatPhoneNumber, getGMTOffset, truncateString } from '../chunk-YKPSRP5G.js';
2
11
  import '../chunk-T2T7K3KR.js';
3
12
  import '../chunk-IRFL4MAX.js';
@@ -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
  'use strict';
2
11
 
3
12
  var chunk5757UBXJ_cjs = require('../chunk-5757UBXJ.cjs');
@@ -5,10 +14,8 @@ require('../chunk-DVMHRLKP.cjs');
5
14
  var chunkBAV5T2E3_cjs = require('../chunk-BAV5T2E3.cjs');
6
15
  require('../chunk-T7PU2V7X.cjs');
7
16
  require('../chunk-UDA26MCU.cjs');
8
- require('../chunk-PZQ6I4JJ.cjs');
9
-
10
-
11
-
17
+ require('../chunk-PZQ6I4JJ.cjs');
18
+
12
19
  Object.defineProperty(exports, "getRandomItem", {
13
20
  enumerable: true,
14
21
  get: function () { return chunk5757UBXJ_cjs.getRandomItem; }
@@ -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{NullToUndefined,FixNeverArrayRecursive,IfNonEmptyArray,Extends}from'@rzl-zone/ts-types-plus';
2
11
  /** ---------------------------------
3
12
  * * ***Utility: `getRandomItem`.***
@@ -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
  export { getRandomItem, randomInt, randomIntByLength, randomStr } from '../chunk-DEZZUYE2.js';
2
11
  import '../chunk-WVSPXFTY.js';
3
12
  export { noop } from '../chunk-YWHHVDT4.js';
package/dist/index.d.ts CHANGED
@@ -1,14 +1,37 @@
1
- /// <reference path="./urls/index.d.ts" />
2
- /// <reference path="./tailwind/index.d.ts" />
3
- /// <reference path="./strings/index.d.ts" />
4
- /// <reference path="./promises/index.d.ts" />
5
- /// <reference path="./predicates/index.d.ts" />
6
- /// <reference path="./parsers/index.d.ts" />
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
+ */
10
+ //! References Paths:
11
+ /// <reference path="./assertions/index.d.ts" />
12
+ /// <reference path="./conversions/index.d.ts" />
13
+ /// <reference path="./events/index.d.ts" />
14
+ /// <reference path="./formatters/index.d.ts" />
15
+ /// <reference path="./generators/index.d.ts" />
16
+ /// <reference path="./next/index.d.ts" />
7
17
  /// <reference path="./operations/index.d.ts" />
18
+ /// <reference path="./parsers/index.d.ts" />
19
+ /// <reference path="./predicates/index.d.ts" />
20
+ /// <reference path="./promises/index.d.ts" />
21
+ /// <reference path="./strings/index.d.ts" />
22
+ /// <reference path="./tailwind/index.d.ts" />
23
+ /// <reference path="./urls/index.d.ts" />
24
+ /// <reference path="./assertions/index.d.ts" />
25
+ /// <reference path="./conversions/index.d.ts" />
26
+ /// <reference path="./events/index.d.ts" />
27
+ /// <reference path="./formatters/index.d.ts" />
28
+ /// <reference path="./generators/index.d.ts" />
8
29
  /// <reference path="./next/index.d.ts" />
9
30
  /// <reference path="./next/server/index.d.ts" />
10
- /// <reference path="./generators/index.d.ts" />
11
- /// <reference path="./formatters/index.d.ts" />
12
- /// <reference path="./events/index.d.ts" />
13
- /// <reference path="./conversions/index.d.ts" />
14
- /// <reference path="./assertions/index.d.ts" />
31
+ /// <reference path="./operations/index.d.ts" />
32
+ /// <reference path="./parsers/index.d.ts" />
33
+ /// <reference path="./predicates/index.d.ts" />
34
+ /// <reference path="./promises/index.d.ts" />
35
+ /// <reference path="./strings/index.d.ts" />
36
+ /// <reference path="./tailwind/index.d.ts" />
37
+ /// <reference path="./urls/index.d.ts" />
@@ -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{NonPlainObject}from'@rzl-zone/ts-types-plus';
2
11
  /** ---------------------------------------------------------------------------
3
12
  * * ***Type Options for {@link getPreciseType | `getPreciseType`}.***
@@ -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
  'use strict';
2
11
 
3
12
  var chunkH66AC7GK_cjs = require('../chunk-H66AC7GK.cjs');
@@ -7,6 +16,7 @@ var chunkHYRQMTRH_cjs = require('../chunk-HYRQMTRH.cjs');
7
16
  var chunkT7PU2V7X_cjs = require('../chunk-T7PU2V7X.cjs');
8
17
  require('../chunk-UDA26MCU.cjs');
9
18
  var chunkPZQ6I4JJ_cjs = require('../chunk-PZQ6I4JJ.cjs');
19
+
10
20
  function generateRoute(route, params) {
11
21
  if (!chunkPZQ6I4JJ_cjs.isString(route) || chunkE55EQK2U_cjs.isEmptyString(route)) {
12
22
  throw new TypeError(
@@ -97,6 +107,7 @@ ${errors.join("\n")}.`
97
107
  return paramKey.trim().replace(/^\/+|\/+$/g, "");
98
108
  }).replace(/\/+/g, "/");
99
109
  }
110
+
100
111
  var createBeApiUrl = (pathname, options = {}) => {
101
112
  try {
102
113
  let joinPath2 = function(a, b) {
@@ -144,6 +155,7 @@ var createBeApiUrl = (pathname, options = {}) => {
144
155
  );
145
156
  }
146
157
  };
158
+
147
159
  var getBeApiUrl = (options = {}) => {
148
160
  if (!chunkPZQ6I4JJ_cjs.isPlainObject(options)) options = {};
149
161
  let suffix = chunkPZQ6I4JJ_cjs.hasOwnProp(options, "suffix") ? options.suffix : "/";
@@ -178,6 +190,7 @@ var getBeApiUrl = (options = {}) => {
178
190
  );
179
191
  }
180
192
  };
193
+
181
194
  var getBaseUrl = () => {
182
195
  try {
183
196
  const baseEnv = process.env.NEXT_PUBLIC_BASE_URL?.trim();
@@ -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{IsAny}from'@rzl-zone/ts-types-plus';
2
11
  /** ---------------------------------------------------------
3
12
  * * ***Extracts dynamic route parameters from a given route string.***
@@ -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 { normalizePathname, formatEnvPort } from '../chunk-GGEADHZO.js';
2
11
  import { removeSpaces } from '../chunk-XEDXFSGI.js';
3
12
  import { isEmptyString } from '../chunk-W2WNBUDE.js';
@@ -5,6 +14,7 @@ import { assertIsString } from '../chunk-SBKGWRS5.js';
5
14
  import { safeStableStringify } from '../chunk-PET42Z7W.js';
6
15
  import '../chunk-QNKGP5DY.js';
7
16
  import { isString, getPreciseType, assertIsPlainObject, isNil, isNonEmptyArray, isNonEmptyString, isPlainObject, isUndefined, assertIsBoolean, isError, hasOwnProp } from '../chunk-CMW2TBOQ.js';
17
+
8
18
  function generateRoute(route, params) {
9
19
  if (!isString(route) || isEmptyString(route)) {
10
20
  throw new TypeError(
@@ -95,6 +105,7 @@ ${errors.join("\n")}.`
95
105
  return paramKey.trim().replace(/^\/+|\/+$/g, "");
96
106
  }).replace(/\/+/g, "/");
97
107
  }
108
+
98
109
  var createBeApiUrl = (pathname, options = {}) => {
99
110
  try {
100
111
  let joinPath2 = function(a, b) {
@@ -142,6 +153,7 @@ var createBeApiUrl = (pathname, options = {}) => {
142
153
  );
143
154
  }
144
155
  };
156
+
145
157
  var getBeApiUrl = (options = {}) => {
146
158
  if (!isPlainObject(options)) options = {};
147
159
  let suffix = hasOwnProp(options, "suffix") ? options.suffix : "/";
@@ -176,6 +188,7 @@ var getBeApiUrl = (options = {}) => {
176
188
  );
177
189
  }
178
190
  };
191
+
179
192
  var getBaseUrl = () => {
180
193
  try {
181
194
  const baseEnv = process.env.NEXT_PUBLIC_BASE_URL?.trim();
@@ -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
  'use strict';
2
11
 
3
12
  var chunkPZQ6I4JJ_cjs = require('../../chunk-PZQ6I4JJ.cjs');
@@ -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{NextRequest}from'next/server';
2
11
  /** ---------------------------------
3
12
  * * ***Utility for NextJS Server: `getClientIpOrUrl`.***
@@ -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 { isFunction, assertIsBoolean } from '../../chunk-CMW2TBOQ.js';
2
11
  import 'server-only';
3
12
  import { NextRequest } from 'next/server';