@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,14 +2,14 @@
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
- export { getRandomItem, randomInt, randomIntByLength, randomStr, randomUUID } from '../chunk-SLP24LUV.js';
10
+ export { getRandomItem, randomInt, randomIntByLength, randomStr, randomUUID } from '../chunk-5Y6JL47L.js';
11
11
  import '../chunk-WVSPXFTY.js';
12
12
  export { noop } from '../chunk-YWHHVDT4.js';
13
- import '../chunk-2VO2CBTU.js';
13
+ import '../chunk-X6ULJZ3X.js';
14
14
  import '../chunk-QNKGP5DY.js';
15
- import '../chunk-3KTD3QDI.js';
15
+ import '../chunk-J4TT33ZX.js';
package/dist/index.d.ts CHANGED
@@ -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
  * ====================================================
@@ -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
  * ====================================================
@@ -2,30 +2,31 @@
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 chunkSGCN4ED4_cjs = require('../chunk-SGCN4ED4.cjs');
13
- require('../chunk-VJVCXEH7.cjs');
14
- var chunkLIU4S3JA_cjs = require('../chunk-LIU4S3JA.cjs');
15
- var chunkNREACG6M_cjs = require('../chunk-NREACG6M.cjs');
16
- var chunkK63WO3XA_cjs = require('../chunk-K63WO3XA.cjs');
17
- var chunkYC7AK3KX_cjs = require('../chunk-YC7AK3KX.cjs');
12
+ var chunkOCTHWEZK_cjs = require('../chunk-OCTHWEZK.cjs');
13
+ require('../chunk-6AMDHVS2.cjs');
14
+ require('../chunk-ZTHJQJ5F.cjs');
15
+ var chunkIX6PF5ZP_cjs = require('../chunk-IX6PF5ZP.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');
18
19
  require('../chunk-UDA26MCU.cjs');
19
- var chunkF3WBQKRI_cjs = require('../chunk-F3WBQKRI.cjs');
20
+ var chunk7C7TQC5J_cjs = require('../chunk-7C7TQC5J.cjs');
20
21
 
21
22
  function generateRoute(route, params) {
22
- if (!chunkF3WBQKRI_cjs.isString(route) || chunkNREACG6M_cjs.isEmptyString(route)) {
23
+ if (!chunk7C7TQC5J_cjs.isString(route) || chunkFWWPEL7J_cjs.isEmptyString(route)) {
23
24
  throw new TypeError(
24
25
  `\u274C 'generateRoute' Failed:
25
26
  - Invalid 'route' value.
26
- - Must be of type \`string\` and non-empty string, but received: "${chunkF3WBQKRI_cjs.getPreciseType(
27
+ - Must be of type \`string\` and non-empty string, but received: "${chunk7C7TQC5J_cjs.getPreciseType(
27
28
  route
28
- )}": \`${chunkYC7AK3KX_cjs.safeStableStringify(route, {
29
+ )}": \`${chunkH44QVAZL_cjs.safeStableStringify(route, {
29
30
  keepUndefined: true
30
31
  })}\`.`
31
32
  );
@@ -33,11 +34,11 @@ function generateRoute(route, params) {
33
34
  if (!/[\\[\]]/.test(route)) {
34
35
  return route;
35
36
  }
36
- chunkF3WBQKRI_cjs.assertIsPlainObject(params, {
37
+ chunk7C7TQC5J_cjs.assertIsPlainObject(params, {
37
38
  message: ({ validType }) => `\u274C 'generateRoute' Failed cause in route "${route}":
38
39
  - Missing or invalid parameters \`${validType}\` for route: "${route}", must be of type \`${validType}\` mapping parameters.`
39
40
  });
40
- if (chunkF3WBQKRI_cjs.isNil(params)) {
41
+ if (chunk7C7TQC5J_cjs.isNil(params)) {
41
42
  throw new TypeError(
42
43
  `\u274C 'generateRoute' Failed cause in route "${route}":
43
44
  - Missing parameters \`plain-object\` for route: "${route}".`
@@ -66,15 +67,15 @@ function generateRoute(route, params) {
66
67
  const requiredKeys = Array.from(route.matchAll(/\[(\w+)\]/g)).map((m) => m[1]);
67
68
  for (const key of requiredKeys) {
68
69
  const value = params[key];
69
- if (!chunkF3WBQKRI_cjs.isString(value)) {
70
+ if (!chunk7C7TQC5J_cjs.isString(value)) {
70
71
  errors.push(
71
- `- Invalid parameter: "${key}" must be of type \`string\`, but received: \`${chunkF3WBQKRI_cjs.getPreciseType(
72
+ `- Invalid parameter: "${key}" must be of type \`string\`, but received: \`${chunk7C7TQC5J_cjs.getPreciseType(
72
73
  value
73
74
  )}\`.`
74
75
  );
75
76
  continue;
76
77
  }
77
- if (chunkNREACG6M_cjs.isEmptyString(value)) {
78
+ if (chunkFWWPEL7J_cjs.isEmptyString(value)) {
78
79
  errors.push(`- Parameter "${key}" cannot be empty string.`);
79
80
  continue;
80
81
  }
@@ -99,14 +100,14 @@ function generateRoute(route, params) {
99
100
  );
100
101
  }
101
102
  }
102
- if (chunkF3WBQKRI_cjs.isNonEmptyArray(errors)) {
103
+ if (chunk7C7TQC5J_cjs.isNonEmptyArray(errors)) {
103
104
  throw new Error(
104
105
  `\u274C 'generateRoute' Failed cause in route "${route}":
105
106
  ${errors.join("\n")}.`
106
107
  );
107
108
  }
108
109
  return route.replace(/\[(\w+)\]/g, (_, key) => {
109
- const paramKey = chunkF3WBQKRI_cjs.isNonEmptyString(params[key]) ? params[key] : "";
110
+ const paramKey = chunk7C7TQC5J_cjs.isNonEmptyString(params[key]) ? params[key] : "";
110
111
  return paramKey.trim().replace(/^\/+|\/+$/g, "");
111
112
  }).replace(/\/+/g, "/");
112
113
  }
@@ -117,40 +118,40 @@ var createBeApiUrl = (pathname, options = {}) => {
117
118
  return `${a.replace(/\/+$/, "")}/${b.replace(/^\/+/, "")}`;
118
119
  };
119
120
  var joinPath = joinPath2;
120
- chunkK63WO3XA_cjs.assertIsString(chunkF3WBQKRI_cjs.isNil(pathname) ? "" : pathname, {
121
+ chunkWKM6UVMG_cjs.assertIsString(chunk7C7TQC5J_cjs.isNil(pathname) ? "" : pathname, {
121
122
  message({ currentType, validType }) {
122
123
  return `First parameter (\`pathname\`) must be of type \`${validType}\`, but received: \`${currentType}\`.`;
123
124
  }
124
125
  });
125
- if (!chunkF3WBQKRI_cjs.isPlainObject(options)) {
126
+ if (!chunk7C7TQC5J_cjs.isPlainObject(options)) {
126
127
  options = {};
127
128
  }
128
129
  let {
129
130
  prefix = "/api",
130
131
  withOrigin = true
131
132
  } = options;
132
- if (!chunkF3WBQKRI_cjs.isUndefined(prefix) && !chunkF3WBQKRI_cjs.isString(prefix)) {
133
+ if (!chunk7C7TQC5J_cjs.isUndefined(prefix) && !chunk7C7TQC5J_cjs.isString(prefix)) {
133
134
  throw new TypeError(
134
- `Parameter \`prefix\` property of the \`options\` (second parameter) must be of type \`string\`, but received: \`${chunkF3WBQKRI_cjs.getPreciseType(
135
+ `Parameter \`prefix\` property of the \`options\` (second parameter) must be of type \`string\`, but received: \`${chunk7C7TQC5J_cjs.getPreciseType(
135
136
  prefix
136
137
  )}\`.`
137
138
  );
138
139
  }
139
- chunkF3WBQKRI_cjs.assertIsBoolean(withOrigin, {
140
+ chunk7C7TQC5J_cjs.assertIsBoolean(withOrigin, {
140
141
  message: ({ currentType, validType }) => `Parameter \`withOrigin\` property of the \`options\` (second parameter) must be of type \`${validType}\`, but received: \`${currentType}\`.`
141
142
  });
142
- pathname = chunkSGCN4ED4_cjs.normalizePathname(pathname);
143
- prefix = chunkSGCN4ED4_cjs.normalizePathname(prefix);
143
+ pathname = chunkOCTHWEZK_cjs.normalizePathname(pathname);
144
+ prefix = chunkOCTHWEZK_cjs.normalizePathname(prefix);
144
145
  const normalizedPrefix = prefix.endsWith("/") ? prefix : prefix + "/";
145
146
  if (pathname === prefix || pathname === prefix + "/" || pathname.startsWith(normalizedPrefix)) {
146
147
  pathname = pathname.slice(prefix.length);
147
- pathname = chunkSGCN4ED4_cjs.normalizePathname(pathname);
148
+ pathname = chunkOCTHWEZK_cjs.normalizePathname(pathname);
148
149
  }
149
150
  const baseApiUrl = getBeApiUrl({ suffix: prefix });
150
151
  const fullPath = withOrigin ? joinPath2(baseApiUrl, pathname) : joinPath2(new URL(baseApiUrl).pathname, pathname);
151
152
  return fullPath.replace(/\/+$/, "");
152
153
  } catch (err) {
153
- if (chunkF3WBQKRI_cjs.isError(err)) {
154
+ if (chunk7C7TQC5J_cjs.isError(err)) {
154
155
  throw err;
155
156
  } else
156
157
  throw new Error(
@@ -160,9 +161,9 @@ var createBeApiUrl = (pathname, options = {}) => {
160
161
  };
161
162
 
162
163
  var getBeApiUrl = (options = {}) => {
163
- if (!chunkF3WBQKRI_cjs.isPlainObject(options)) options = {};
164
- let suffix = chunkF3WBQKRI_cjs.hasOwnProp(options, "suffix") ? options.suffix : "/";
165
- chunkK63WO3XA_cjs.assertIsString(suffix, {
164
+ if (!chunk7C7TQC5J_cjs.isPlainObject(options)) options = {};
165
+ let suffix = chunk7C7TQC5J_cjs.hasOwnProp(options, "suffix") ? options.suffix : "/";
166
+ chunkWKM6UVMG_cjs.assertIsString(suffix, {
166
167
  message({ currentType, validType }) {
167
168
  return `Parameter \`suffix\` property of the first parameter must be of type \`${validType}\`, but received: \`${currentType}\`.`;
168
169
  }
@@ -170,20 +171,20 @@ var getBeApiUrl = (options = {}) => {
170
171
  try {
171
172
  let rawBaseUrl = process.env.NEXT_PUBLIC_BACKEND_API_URL?.trim();
172
173
  if (rawBaseUrl) {
173
- rawBaseUrl = chunkLIU4S3JA_cjs.removeSpaces(rawBaseUrl);
174
+ rawBaseUrl = chunkIX6PF5ZP_cjs.removeSpaces(rawBaseUrl);
174
175
  const urlObj = new URL(rawBaseUrl);
175
176
  const hasPort = !!urlObj.port;
176
177
  if (!hasPort && process.env.NEXT_PUBLIC_PORT_BE) {
177
- rawBaseUrl = urlObj.origin + chunkSGCN4ED4_cjs.formatEnvPort(process.env.NEXT_PUBLIC_PORT_BE, {
178
+ rawBaseUrl = urlObj.origin + chunkOCTHWEZK_cjs.formatEnvPort(process.env.NEXT_PUBLIC_PORT_BE, {
178
179
  prefixColon: true
179
180
  });
180
181
  }
181
182
  } else {
182
- rawBaseUrl = "http://localhost" + chunkSGCN4ED4_cjs.formatEnvPort(process.env.NEXT_PUBLIC_PORT_BE || "8000", {
183
+ rawBaseUrl = "http://localhost" + chunkOCTHWEZK_cjs.formatEnvPort(process.env.NEXT_PUBLIC_PORT_BE || "8000", {
183
184
  prefixColon: true
184
185
  });
185
186
  }
186
- suffix = chunkLIU4S3JA_cjs.removeSpaces(suffix).length ? chunkLIU4S3JA_cjs.removeSpaces(suffix) : "/";
187
+ suffix = chunkIX6PF5ZP_cjs.removeSpaces(suffix).length ? chunkIX6PF5ZP_cjs.removeSpaces(suffix) : "/";
187
188
  const baseApiUrl = new URL(rawBaseUrl.replace(/\/+$/, "")).origin;
188
189
  const finalSuffix = suffix === "/" ? "/" : `${suffix.startsWith("/") ? "" : "/"}${suffix.replace(/\/+$/, "")}`;
189
190
  return `${baseApiUrl}${finalSuffix}`;
@@ -199,10 +200,10 @@ var getBaseUrl = () => {
199
200
  const baseEnv = process.env.NEXT_PUBLIC_BASE_URL?.trim();
200
201
  const portEnv = process.env.NEXT_PUBLIC_PORT_FE?.trim();
201
202
  let baseUrl = baseEnv || "http://localhost";
202
- baseUrl = chunkLIU4S3JA_cjs.removeSpaces(baseUrl).replace(/\/+$/, "");
203
+ baseUrl = chunkIX6PF5ZP_cjs.removeSpaces(baseUrl).replace(/\/+$/, "");
203
204
  const hasPort = /:\/\/[^/]+:\d+/.test(baseUrl);
204
205
  if (!hasPort && portEnv) {
205
- baseUrl += chunkSGCN4ED4_cjs.formatEnvPort(portEnv, { prefixColon: true });
206
+ baseUrl += chunkOCTHWEZK_cjs.formatEnvPort(portEnv, { prefixColon: true });
206
207
  } else if (!hasPort && !baseEnv) {
207
208
  baseUrl += ":3000";
208
209
  }
@@ -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
  * ====================================================
@@ -2,19 +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
- import { normalizePathname, formatEnvPort } from '../chunk-PW2VMJLT.js';
11
- import '../chunk-YS27V6LS.js';
12
- import { removeSpaces } from '../chunk-4ACKNPL5.js';
13
- import { isEmptyString } from '../chunk-JY4HLZ4W.js';
14
- import { assertIsString } from '../chunk-FI76UZRF.js';
15
- import { safeStableStringify } from '../chunk-2VO2CBTU.js';
10
+ import { normalizePathname, formatEnvPort } from '../chunk-R2DR7SPJ.js';
11
+ import '../chunk-3LE6NX57.js';
12
+ import '../chunk-GKDSBOYE.js';
13
+ import { removeSpaces } from '../chunk-5KDVIEVO.js';
14
+ import { isEmptyString } from '../chunk-5O66AUEC.js';
15
+ import { assertIsString } from '../chunk-OSSFLQDD.js';
16
+ import { safeStableStringify } from '../chunk-X6ULJZ3X.js';
16
17
  import '../chunk-QNKGP5DY.js';
17
- import { isString, getPreciseType, assertIsPlainObject, isNil, isNonEmptyArray, isNonEmptyString, isPlainObject, isUndefined, assertIsBoolean, isError, hasOwnProp } from '../chunk-3KTD3QDI.js';
18
+ import { isString, getPreciseType, assertIsPlainObject, isNil, isNonEmptyArray, isNonEmptyString, isPlainObject, isUndefined, assertIsBoolean, isError, hasOwnProp } from '../chunk-J4TT33ZX.js';
18
19
 
19
20
  function generateRoute(route, params) {
20
21
  if (!isString(route) || isEmptyString(route)) {
@@ -2,19 +2,19 @@
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
  require('server-only');
14
14
  var server = require('next/server');
15
15
 
16
16
  var getClientIpOrUrl = (request, includeFullUrl = true) => {
17
- if (!chunkF3WBQKRI_cjs.isFunction(server.NextRequest)) {
17
+ if (!chunk7C7TQC5J_cjs.isFunction(server.NextRequest)) {
18
18
  throw new Error(
19
19
  "Function `getClientIpOrUrl` is designed to be used in a `NextJS` environment."
20
20
  );
@@ -24,7 +24,7 @@ var getClientIpOrUrl = (request, includeFullUrl = true) => {
24
24
  "First parameter (`request`) must be an `instance of NextRequest` from `NextJS`."
25
25
  );
26
26
  }
27
- chunkF3WBQKRI_cjs.assertIsBoolean(includeFullUrl, {
27
+ chunk7C7TQC5J_cjs.assertIsBoolean(includeFullUrl, {
28
28
  message: ({ currentType, validType }) => `Second parameter (\`includeFullUrl\`) must be of type \`${validType}\`, but received: \`${currentType}\`.`
29
29
  });
30
30
  const forwardedIps = (request.headers.get("x-forwarded-for") ?? "127.0.0.1").trim().split(",");
@@ -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
  * ====================================================
@@ -2,12 +2,12 @@
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 { isFunction, assertIsBoolean } from '../../chunk-3KTD3QDI.js';
10
+ import { isFunction, assertIsBoolean } from '../../chunk-J4TT33ZX.js';
11
11
  import 'server-only';
12
12
  import { NextRequest } from 'next/server';
13
13
 
@@ -2,32 +2,32 @@
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 chunkA4H7474O_cjs = require('../chunk-A4H7474O.cjs');
13
- require('../chunk-6NORJBI6.cjs');
14
- require('../chunk-7QQV66RX.cjs');
15
- require('../chunk-ATLFMKAF.cjs');
16
- require('../chunk-7WBMA2VE.cjs');
12
+ var chunkYQHJB7KR_cjs = require('../chunk-YQHJB7KR.cjs');
13
+ require('../chunk-KUVRZ2JW.cjs');
14
+ require('../chunk-TJ5OY6MC.cjs');
15
+ require('../chunk-NAOVH4OH.cjs');
16
+ require('../chunk-OYFUBKEG.cjs');
17
17
  require('../chunk-BAV5T2E3.cjs');
18
- require('../chunk-YC7AK3KX.cjs');
18
+ require('../chunk-H44QVAZL.cjs');
19
19
  require('../chunk-UDA26MCU.cjs');
20
- require('../chunk-F3WBQKRI.cjs');
20
+ require('../chunk-7C7TQC5J.cjs');
21
21
 
22
22
  Object.defineProperty(exports, "findDuplicates", {
23
23
  enumerable: true,
24
- get: function () { return chunkA4H7474O_cjs.findDuplicates; }
24
+ get: function () { return chunkYQHJB7KR_cjs.findDuplicates; }
25
25
  });
26
26
  Object.defineProperty(exports, "omitKeys", {
27
27
  enumerable: true,
28
- get: function () { return chunkA4H7474O_cjs.omitKeys; }
28
+ get: function () { return chunkYQHJB7KR_cjs.omitKeys; }
29
29
  });
30
30
  Object.defineProperty(exports, "omitKeysDeep", {
31
31
  enumerable: true,
32
- get: function () { return chunkA4H7474O_cjs.omitKeysDeep; }
32
+ get: function () { return chunkYQHJB7KR_cjs.omitKeysDeep; }
33
33
  });
@@ -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
  * ====================================================
@@ -2,17 +2,17 @@
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
- export { findDuplicates, omitKeys, omitKeysDeep } from '../chunk-P3ST4UZA.js';
11
- import '../chunk-KVZ3HL2B.js';
12
- import '../chunk-SZJ7OI4S.js';
13
- import '../chunk-VCVND6CH.js';
14
- import '../chunk-6WMB5AJR.js';
10
+ export { findDuplicates, omitKeys, omitKeysDeep } from '../chunk-SRWL4YCP.js';
11
+ import '../chunk-DXPM4NOU.js';
12
+ import '../chunk-J6VLFVIL.js';
13
+ import '../chunk-M5QB2GM5.js';
14
+ import '../chunk-TXOVQZPU.js';
15
15
  import '../chunk-YWHHVDT4.js';
16
- import '../chunk-2VO2CBTU.js';
16
+ import '../chunk-X6ULJZ3X.js';
17
17
  import '../chunk-QNKGP5DY.js';
18
- import '../chunk-3KTD3QDI.js';
18
+ import '../chunk-J4TT33ZX.js';
@@ -2,17 +2,19 @@
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 chunkQAPYHLHC_cjs = require('../chunk-QAPYHLHC.cjs');
13
- require('../chunk-F3WBQKRI.cjs');
12
+ var chunkVCYXNIZ2_cjs = require('../chunk-VCYXNIZ2.cjs');
13
+ require('../chunk-ZTHJQJ5F.cjs');
14
+ require('../chunk-WKM6UVMG.cjs');
15
+ require('../chunk-7C7TQC5J.cjs');
14
16
 
15
17
  Object.defineProperty(exports, "extractFileName", {
16
18
  enumerable: true,
17
- get: function () { return chunkQAPYHLHC_cjs.extractFileName; }
19
+ get: function () { return chunkVCYXNIZ2_cjs.extractFileName; }
18
20
  });