@rzl-zone/utils-js 3.11.1 → 3.12.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.
- package/dist/assertions/index.cjs +11 -11
- package/dist/assertions/index.d.ts +5 -5
- package/dist/assertions/index.js +5 -5
- package/dist/{chunk-TER22LO4.cjs → chunk-2AFQ33D3.cjs} +8 -8
- package/dist/{chunk-SZUNAEMR.js → chunk-2CYDJVGM.js} +6 -6
- package/dist/{chunk-6EDFZJZ5.cjs → chunk-2MW4JDQ2.cjs} +126 -126
- package/dist/{chunk-M7ELWZXM.cjs → chunk-2VTDXC3N.cjs} +9 -9
- package/dist/{chunk-6YGBRENU.js → chunk-44XX2P34.js} +3 -3
- package/dist/{chunk-WLOQQFDS.cjs → chunk-4YLBKLGS.cjs} +3 -3
- package/dist/{chunk-Q4GEQS7X.cjs → chunk-566CXQW7.cjs} +163 -167
- package/dist/{chunk-MV3TSQSH.cjs → chunk-57EPKYID.cjs} +71 -71
- package/dist/{chunk-2XSZ2ANI.js → chunk-5MGEC3YG.js} +2 -2
- package/dist/{chunk-HYN6FC5A.cjs → chunk-6EF52423.cjs} +34 -34
- package/dist/{chunk-LJHPTLWB.js → chunk-6SCOKU3S.js} +7 -7
- package/dist/{chunk-AXDYWO67.js → chunk-6VUXD3CF.js} +2 -2
- package/dist/{chunk-C2PV3VWC.cjs → chunk-7B76BSNK.cjs} +6 -6
- package/dist/{chunk-ZPDMWDGZ.cjs → chunk-7Y6I2DSU.cjs} +14 -14
- package/dist/{chunk-KXJ7X325.cjs → chunk-A7S7E2EE.cjs} +37 -37
- package/dist/{chunk-BPYW5YL7.js → chunk-AJZ6PMMZ.js} +2 -2
- package/dist/{chunk-PGNL7JXO.cjs → chunk-AXGBL2IO.cjs} +40 -40
- package/dist/{chunk-NLZLXWAU.cjs → chunk-B4TC6FBV.cjs} +9 -9
- package/dist/chunk-BAV5T2E3.cjs +1 -1
- package/dist/{chunk-3T6VSWYX.js → chunk-BKIJBNIE.js} +2 -2
- package/dist/{chunk-RBWZII5I.js → chunk-BNIMTFK5.js} +3 -3
- package/dist/{chunk-5WIEDF2J.js → chunk-BXW7YXB7.js} +4 -4
- package/dist/{chunk-22V4WP3H.js → chunk-CFYZC4S6.js} +4 -4
- package/dist/{chunk-MSUW5VHZ.js → chunk-CSG4SCL3.js} +10 -13
- package/dist/{chunk-JIE447J5.js → chunk-CWQW7AKK.js} +3 -3
- package/dist/chunk-DVMHRLKP.cjs +1 -1
- package/dist/{chunk-U7HHN47R.js → chunk-EN7LVZBZ.js} +12 -16
- package/dist/{chunk-EBYFYZW4.cjs → chunk-EV4Y7HCY.cjs} +4 -4
- package/dist/{chunk-NVRZPF5M.cjs → chunk-F66VDYIZ.cjs} +3 -3
- package/dist/{chunk-BMZZXZJ2.cjs → chunk-FLJX37EL.cjs} +4 -4
- package/dist/{chunk-SYHPSOUU.cjs → chunk-GKC3UDMC.cjs} +10 -13
- package/dist/{chunk-GIKL4PUF.cjs → chunk-H65I3GRZ.cjs} +10 -10
- package/dist/{chunk-HNBRGN4R.js → chunk-HHYWB7VZ.js} +2 -2
- package/dist/{chunk-MUHRPRR7.cjs → chunk-HNGGISFL.cjs} +3 -3
- package/dist/{chunk-B6PMNZ4M.cjs → chunk-HNSQAVSZ.cjs} +6 -6
- package/dist/{chunk-RZOGBYIS.js → chunk-HSP6IWZK.js} +3 -7
- package/dist/{chunk-IZGVBYFN.js → chunk-IDZS7J6T.js} +13 -13
- package/dist/{chunk-ENMRZ4BE.js → chunk-JS6R55VL.js} +3 -3
- package/dist/{chunk-WETQI6HM.js → chunk-JZVT5FK7.js} +9 -9
- package/dist/chunk-KHO2SBNA.cjs +1 -1
- package/dist/{chunk-TJHGRQ4P.js → chunk-KIDJCMNJ.js} +2 -2
- package/dist/{chunk-7FGNVDEV.cjs → chunk-KOLEURVT.cjs} +7 -7
- package/dist/{chunk-K5536YHG.cjs → chunk-L4V53MQK.cjs} +50 -50
- package/dist/chunk-L5RDAVVH.js +1 -1
- package/dist/{chunk-CCJ2MSN7.js → chunk-NODTV4F3.js} +2 -2
- package/dist/{chunk-QYI2VJLS.cjs → chunk-NYK5K3V2.cjs} +9 -9
- package/dist/{chunk-XPVTIGU2.cjs → chunk-ODUO3RTL.cjs} +26 -26
- package/dist/chunk-ONZFBJVW.js +1 -1
- package/dist/{chunk-ZVWZEGQP.js → chunk-PFXCTE37.js} +2 -2
- package/dist/{chunk-FJ4BQFVO.js → chunk-PPST7QAQ.js} +8 -8
- package/dist/{chunk-RMP7VMPB.cjs → chunk-Q5IMYDFL.cjs} +12 -12
- package/dist/{chunk-UIAWUZ4H.js → chunk-QFFBIOJ4.js} +4 -4
- package/dist/chunk-QNKGP5DY.js +1 -1
- package/dist/{chunk-DLS3G6WQ.cjs → chunk-RRQHMOPE.cjs} +4 -8
- package/dist/{chunk-BLF7SD66.js → chunk-RU5OSRBU.js} +3 -3
- package/dist/{chunk-GOFINGT6.js → chunk-SDMPEJ4F.js} +2 -2
- package/dist/{chunk-K47GZDBH.js → chunk-SYNL5IKP.js} +3 -3
- package/dist/{chunk-ULQPCIA2.js → chunk-TCDOWZQE.js} +2 -2
- package/dist/{chunk-DAPAK2W3.cjs → chunk-TQPGXGKB.cjs} +31 -31
- package/dist/{chunk-DNMCR5JH.js → chunk-TULOI4GL.js} +9 -9
- package/dist/{chunk-SU3UELUB.cjs → chunk-UBHCP4N5.cjs} +3 -3
- package/dist/{chunk-U23I7JPB.cjs → chunk-UCHF3M34.cjs} +15 -15
- package/dist/chunk-UDA26MCU.cjs +1 -1
- package/dist/{chunk-XX6RUGTM.cjs → chunk-V3C4FYZL.cjs} +3 -3
- package/dist/{chunk-6LXWT2I5.js → chunk-VAAHZFBF.js} +2 -2
- package/dist/chunk-VJDDGRIK.cjs +1 -1
- package/dist/chunk-WVSPXFTY.js +1 -1
- package/dist/{chunk-GXKQ3LHF.js → chunk-WYP76WXB.js} +3 -3
- package/dist/{chunk-JXEIJM5M.cjs → chunk-YDE4ZBB7.cjs} +61 -61
- package/dist/{chunk-WXFTVXBF.cjs → chunk-YKQEOO7C.cjs} +4 -4
- package/dist/{chunk-BOYP3ARU.js → chunk-YSZC56SZ.js} +4 -4
- package/dist/chunk-YWHHVDT4.js +1 -1
- package/dist/conversions/index.cjs +34 -34
- package/dist/conversions/index.d.ts +1 -1
- package/dist/conversions/index.js +15 -15
- package/dist/events/index.cjs +8 -8
- package/dist/events/index.d.ts +1 -1
- package/dist/events/index.js +4 -4
- package/dist/formatters/index.cjs +19 -19
- package/dist/formatters/index.d.ts +1 -1
- package/dist/formatters/index.js +9 -9
- package/dist/generators/index.cjs +9 -9
- package/dist/generators/index.d.ts +1 -1
- package/dist/generators/index.js +4 -4
- package/dist/index.d.ts +1 -1
- package/dist/{isPlainObject-0p3VveWr.d.ts → isPlainObject-DTJVV2Kf.d.ts} +5 -3
- package/dist/next/index.cjs +41 -39
- package/dist/next/index.d.ts +1 -1
- package/dist/next/index.js +13 -11
- package/dist/next/server/index.cjs +4 -4
- package/dist/next/server/index.d.ts +1 -1
- package/dist/next/server/index.js +2 -2
- package/dist/operations/index.cjs +11 -11
- package/dist/operations/index.d.ts +1 -1
- package/dist/operations/index.js +8 -8
- package/dist/parsers/index.cjs +6 -6
- package/dist/parsers/index.d.ts +1 -1
- package/dist/parsers/index.js +5 -5
- package/dist/predicates/index.cjs +77 -77
- package/dist/predicates/index.d.ts +6 -6
- package/dist/predicates/index.js +14 -14
- package/dist/promises/index.cjs +6 -6
- package/dist/promises/index.d.ts +1 -1
- package/dist/promises/index.js +4 -4
- package/dist/rzl-utils.global.js +2 -2
- package/dist/strings/index.cjs +23 -23
- package/dist/strings/index.d.ts +1 -1
- package/dist/strings/index.js +7 -7
- package/dist/tailwind/index.cjs +13 -13
- package/dist/tailwind/index.d.ts +1 -1
- package/dist/tailwind/index.js +5 -5
- package/dist/urls/index.cjs +23 -23
- package/dist/urls/index.d.ts +1 -1
- package/dist/urls/index.js +16 -16
- package/package.json +18 -18
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
* ====================================================
|
|
3
3
|
* Rzl Utils-JS.
|
|
4
4
|
* ----------------------------------------------------
|
|
5
|
-
* Version: 3.
|
|
5
|
+
* Version: 3.12.0.
|
|
6
6
|
* Author: Rizalvin Dwiky.
|
|
7
7
|
* Repository: https://github.com/rzl-zone/utils-js.
|
|
8
8
|
* ====================================================
|
|
9
9
|
*/
|
|
10
|
-
import { punycodeUtilsJS } from './chunk-
|
|
11
|
-
import { isNonEmptyString, assertIsPlainObject, assertIsBoolean } from './chunk-
|
|
10
|
+
import { punycodeUtilsJS } from './chunk-44XX2P34.js';
|
|
11
|
+
import { isNonEmptyString, assertIsPlainObject, assertIsBoolean } from './chunk-CSG4SCL3.js';
|
|
12
12
|
|
|
13
13
|
var EXTENSIONS_FILE = /* @__PURE__ */ new Set([
|
|
14
14
|
// 📄 Text & Document
|
package/dist/chunk-DVMHRLKP.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* ====================================================
|
|
3
3
|
* Rzl Utils-JS.
|
|
4
4
|
* ----------------------------------------------------
|
|
5
|
-
* Version: 3.
|
|
5
|
+
* Version: 3.12.0.
|
|
6
6
|
* Author: Rizalvin Dwiky.
|
|
7
7
|
* Repository: https://github.com/rzl-zone/utils-js.
|
|
8
8
|
* ====================================================
|
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
* ====================================================
|
|
3
3
|
* Rzl Utils-JS.
|
|
4
4
|
* ----------------------------------------------------
|
|
5
|
-
* Version: 3.
|
|
5
|
+
* Version: 3.12.0.
|
|
6
6
|
* Author: Rizalvin Dwiky.
|
|
7
7
|
* Repository: https://github.com/rzl-zone/utils-js.
|
|
8
8
|
* ====================================================
|
|
9
9
|
*/
|
|
10
|
-
import { isNonEmptyValue, isTypedArray } from './chunk-
|
|
11
|
-
import { filterNilArray } from './chunk-
|
|
12
|
-
import { isEmptyString } from './chunk-
|
|
13
|
-
import { assertIsString } from './chunk-
|
|
14
|
-
import { isRegExp, isEqual } from './chunk-
|
|
15
|
-
import { isEmptyObject, isEmptyArray } from './chunk-
|
|
16
|
-
import { assertIsArray } from './chunk-
|
|
17
|
-
import { safeStableStringify, isDate, isMap } from './chunk-
|
|
10
|
+
import { isNonEmptyValue, isTypedArray } from './chunk-KIDJCMNJ.js';
|
|
11
|
+
import { filterNilArray } from './chunk-CFYZC4S6.js';
|
|
12
|
+
import { isEmptyString } from './chunk-TCDOWZQE.js';
|
|
13
|
+
import { assertIsString } from './chunk-BKIJBNIE.js';
|
|
14
|
+
import { isRegExp, isEqual } from './chunk-WYP76WXB.js';
|
|
15
|
+
import { isEmptyObject, isEmptyArray } from './chunk-SDMPEJ4F.js';
|
|
16
|
+
import { assertIsArray } from './chunk-HSP6IWZK.js';
|
|
17
|
+
import { safeStableStringify, isDate, isMap } from './chunk-6VUXD3CF.js';
|
|
18
18
|
import { isBigInt } from './chunk-QNKGP5DY.js';
|
|
19
|
-
import { assertIsPlainObject, hasOwnProp, assertIsBoolean, isArray, isNull, getPreciseType, isNaN, isString, isNumber, isBoolean, isNil, isNumberObject, isBooleanObject, isStringObject, isSymbol, isFunction, isObjectOrArray, isError, isSet, isObject, isNonEmptyString, isPlainObject, isUndefined, isInfinityNumber, isBuffer } from './chunk-
|
|
19
|
+
import { assertIsPlainObject, hasOwnProp, assertIsBoolean, isArray, isNull, getPreciseType, isNaN, isString, isNumber, isBoolean, isNil, isNumberObject, isBooleanObject, isStringObject, isSymbol, isFunction, isObjectOrArray, isError, isSet, isObject, isNonEmptyString, isPlainObject, isUndefined, isInfinityNumber, isBuffer } from './chunk-CSG4SCL3.js';
|
|
20
20
|
|
|
21
21
|
function toNumberArrayUnRecursive(array, options = {}) {
|
|
22
22
|
assertIsPlainObject(options, {
|
|
@@ -269,18 +269,14 @@ function removeObjectPaths(object, keysToDelete, deepClone = true) {
|
|
|
269
269
|
assertIsArray(keysToDelete, {
|
|
270
270
|
message: ({ currentType, validType }) => `Second parameter (\`keysToDelete\`) must be of type \`${validType}\` with value of { key: string, deep?: boolean } plain-object, but received: \`${currentType}\`, with value: \`${safeStableStringify(
|
|
271
271
|
keysToDelete,
|
|
272
|
-
{
|
|
273
|
-
keepUndefined: true
|
|
274
|
-
}
|
|
272
|
+
{ keepUndefined: true }
|
|
275
273
|
)}\`.`
|
|
276
274
|
});
|
|
277
275
|
if (!keysToDelete.every((k) => isPlainObject(k) && "key" in k)) {
|
|
278
276
|
throw new TypeError(
|
|
279
277
|
`Each element in Second Parameter (\`keysToDelete\`) must be of type \`plain-object\` with at least a "key" property (optionally "deep"), but received: \`${safeStableStringify(
|
|
280
278
|
keysToDelete,
|
|
281
|
-
{
|
|
282
|
-
keepUndefined: true
|
|
283
|
-
}
|
|
279
|
+
{ keepUndefined: true }
|
|
284
280
|
)}\`.`
|
|
285
281
|
);
|
|
286
282
|
}
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
* ====================================================
|
|
3
3
|
* Rzl Utils-JS.
|
|
4
4
|
* ----------------------------------------------------
|
|
5
|
-
* Version: 3.
|
|
5
|
+
* Version: 3.12.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
|
|
12
|
+
var chunkGKC3UDMC_cjs = require('./chunk-GKC3UDMC.cjs');
|
|
13
13
|
|
|
14
14
|
var removeSpaces = (value, options = {
|
|
15
15
|
trimOnly: false
|
|
16
16
|
}) => {
|
|
17
|
-
if (!
|
|
18
|
-
if (!
|
|
17
|
+
if (!chunkGKC3UDMC_cjs.isNonEmptyString(value)) return "";
|
|
18
|
+
if (!chunkGKC3UDMC_cjs.isPlainObject(options)) {
|
|
19
19
|
options = {};
|
|
20
20
|
}
|
|
21
21
|
const { trimOnly = false } = options;
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
* ====================================================
|
|
3
3
|
* Rzl Utils-JS.
|
|
4
4
|
* ----------------------------------------------------
|
|
5
|
-
* Version: 3.
|
|
5
|
+
* Version: 3.12.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
|
|
12
|
+
var chunkGKC3UDMC_cjs = require('./chunk-GKC3UDMC.cjs');
|
|
13
13
|
|
|
14
14
|
var normalizeString = (input) => {
|
|
15
|
-
return
|
|
15
|
+
return chunkGKC3UDMC_cjs.isNonEmptyString(input) ? input.trim() : "";
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
exports.normalizeString = normalizeString;
|
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
* ====================================================
|
|
3
3
|
* Rzl Utils-JS.
|
|
4
4
|
* ----------------------------------------------------
|
|
5
|
-
* Version: 3.
|
|
5
|
+
* Version: 3.12.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
|
|
12
|
+
var chunkGKC3UDMC_cjs = require('./chunk-GKC3UDMC.cjs');
|
|
13
13
|
|
|
14
14
|
var normalizeSpaces = (value, options = {
|
|
15
15
|
withTrim: true,
|
|
16
16
|
trimOnly: false
|
|
17
17
|
}) => {
|
|
18
|
-
if (!
|
|
19
|
-
if (!
|
|
18
|
+
if (!chunkGKC3UDMC_cjs.isNonEmptyString(value)) return "";
|
|
19
|
+
if (!chunkGKC3UDMC_cjs.isPlainObject(options)) {
|
|
20
20
|
options = {};
|
|
21
21
|
}
|
|
22
22
|
const { trimOnly = false, withTrim = true } = options;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* ====================================================
|
|
3
3
|
* Rzl Utils-JS.
|
|
4
4
|
* ----------------------------------------------------
|
|
5
|
-
* Version: 3.
|
|
5
|
+
* Version: 3.12.0.
|
|
6
6
|
* Author: Rizalvin Dwiky.
|
|
7
7
|
* Repository: https://github.com/rzl-zone/utils-js.
|
|
8
8
|
* ====================================================
|
|
@@ -896,10 +896,13 @@ var PreciseType = class _PreciseType {
|
|
|
896
896
|
* @internal
|
|
897
897
|
*/
|
|
898
898
|
static FIXES_CASTABLE_TABLE = Object.freeze(
|
|
899
|
-
Object.entries(_PreciseType.FIXES_RAW).reduce(
|
|
900
|
-
acc[
|
|
901
|
-
|
|
902
|
-
|
|
899
|
+
Object.entries(_PreciseType.FIXES_RAW).reduce(
|
|
900
|
+
(acc, [k, v]) => {
|
|
901
|
+
acc[_PreciseType.normalizeKeyForCase(k)] = v;
|
|
902
|
+
return acc;
|
|
903
|
+
},
|
|
904
|
+
{}
|
|
905
|
+
)
|
|
903
906
|
);
|
|
904
907
|
/** @internal */
|
|
905
908
|
formatCase = "toKebabCase";
|
|
@@ -1133,10 +1136,7 @@ var PreciseType = class _PreciseType {
|
|
|
1133
1136
|
if (key) {
|
|
1134
1137
|
return this.converter(
|
|
1135
1138
|
_PreciseType.FIXES_CASTABLE_TABLE[_PreciseType.normalizeKeyForCase(key)] ?? key,
|
|
1136
|
-
{
|
|
1137
|
-
formatCase,
|
|
1138
|
-
useAcronyms
|
|
1139
|
-
}
|
|
1139
|
+
{ formatCase, useAcronyms }
|
|
1140
1140
|
);
|
|
1141
1141
|
}
|
|
1142
1142
|
return this.converter(
|
|
@@ -1252,10 +1252,7 @@ var PreciseType = class _PreciseType {
|
|
|
1252
1252
|
];
|
|
1253
1253
|
if (skipTags.includes(tag)) return false;
|
|
1254
1254
|
try {
|
|
1255
|
-
Reflect.defineProperty(value, "__proxy_detect__", {
|
|
1256
|
-
configurable: true,
|
|
1257
|
-
value: 1
|
|
1258
|
-
});
|
|
1255
|
+
Reflect.defineProperty(value, "__proxy_detect__", { configurable: true, value: 1 });
|
|
1259
1256
|
Reflect.deleteProperty(value, "__proxy_detect__");
|
|
1260
1257
|
return false;
|
|
1261
1258
|
} catch {
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
* ====================================================
|
|
3
3
|
* Rzl Utils-JS.
|
|
4
4
|
* ----------------------------------------------------
|
|
5
|
-
* Version: 3.
|
|
5
|
+
* Version: 3.12.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
|
|
13
|
-
var
|
|
12
|
+
var chunkTQPGXGKB_cjs = require('./chunk-TQPGXGKB.cjs');
|
|
13
|
+
var chunkGKC3UDMC_cjs = require('./chunk-GKC3UDMC.cjs');
|
|
14
14
|
|
|
15
15
|
var isRegExp = (value) => {
|
|
16
16
|
return value instanceof RegExp;
|
|
@@ -23,7 +23,7 @@ function isArrayBuffer(value) {
|
|
|
23
23
|
function baseDeepEqual(value, other, customizer, seen = /* @__PURE__ */ new WeakMap()) {
|
|
24
24
|
if (value === other) return true;
|
|
25
25
|
if (value !== value && other !== other) return true;
|
|
26
|
-
if (!
|
|
26
|
+
if (!chunkGKC3UDMC_cjs.isObjectOrArray(value) || !chunkGKC3UDMC_cjs.isObjectOrArray(other)) {
|
|
27
27
|
return false;
|
|
28
28
|
}
|
|
29
29
|
if (seen.get(value) === other) return true;
|
|
@@ -31,14 +31,14 @@ function baseDeepEqual(value, other, customizer, seen = /* @__PURE__ */ new Weak
|
|
|
31
31
|
const callCustomizer = (v, o, key, valObj, othObj) => {
|
|
32
32
|
if (customizer) {
|
|
33
33
|
const result = customizer(v, o, key, valObj, othObj, seen);
|
|
34
|
-
if (!
|
|
34
|
+
if (!chunkGKC3UDMC_cjs.isUndefined(result)) return result;
|
|
35
35
|
}
|
|
36
36
|
return baseDeepEqual(v, o, customizer, seen);
|
|
37
37
|
};
|
|
38
|
-
if (
|
|
38
|
+
if (chunkTQPGXGKB_cjs.isDate(value) && chunkTQPGXGKB_cjs.isDate(other)) return value.getTime() === other.getTime();
|
|
39
39
|
if (isRegExp(value) && isRegExp(other))
|
|
40
40
|
return value.source === other.source && value.flags === other.flags;
|
|
41
|
-
if (
|
|
41
|
+
if (chunkGKC3UDMC_cjs.isError(value) && chunkGKC3UDMC_cjs.isError(other))
|
|
42
42
|
return value.name === other.name && value.message === other.message;
|
|
43
43
|
if (ArrayBuffer.isView(value) && ArrayBuffer.isView(other)) {
|
|
44
44
|
const v = new Uint8Array(value.buffer, value.byteOffset, value.byteLength);
|
|
@@ -53,7 +53,7 @@ function baseDeepEqual(value, other, customizer, seen = /* @__PURE__ */ new Weak
|
|
|
53
53
|
for (let i = 0; i < v.length; i++) if (v[i] !== o[i]) return false;
|
|
54
54
|
return true;
|
|
55
55
|
}
|
|
56
|
-
if (
|
|
56
|
+
if (chunkTQPGXGKB_cjs.isMap(value) && chunkTQPGXGKB_cjs.isMap(other)) {
|
|
57
57
|
if (value.size !== other.size) return false;
|
|
58
58
|
for (const [k, v] of value) {
|
|
59
59
|
if (!other.has(k)) return false;
|
|
@@ -61,7 +61,7 @@ function baseDeepEqual(value, other, customizer, seen = /* @__PURE__ */ new Weak
|
|
|
61
61
|
}
|
|
62
62
|
return true;
|
|
63
63
|
}
|
|
64
|
-
if (
|
|
64
|
+
if (chunkGKC3UDMC_cjs.isSet(value) && chunkGKC3UDMC_cjs.isSet(other)) {
|
|
65
65
|
if (value.size !== other.size) return false;
|
|
66
66
|
for (const v of value) {
|
|
67
67
|
let matched = false;
|
|
@@ -75,7 +75,7 @@ function baseDeepEqual(value, other, customizer, seen = /* @__PURE__ */ new Weak
|
|
|
75
75
|
}
|
|
76
76
|
return true;
|
|
77
77
|
}
|
|
78
|
-
if (
|
|
78
|
+
if (chunkGKC3UDMC_cjs.isArray(value) && chunkGKC3UDMC_cjs.isArray(other)) {
|
|
79
79
|
if (value.length !== other.length) return false;
|
|
80
80
|
for (let i = 0; i < value.length; i++) {
|
|
81
81
|
if (!callCustomizer(value[i], other[i], i, value, other)) return false;
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
* ====================================================
|
|
3
3
|
* Rzl Utils-JS.
|
|
4
4
|
* ----------------------------------------------------
|
|
5
|
-
* Version: 3.
|
|
5
|
+
* Version: 3.12.0.
|
|
6
6
|
* Author: Rizalvin Dwiky.
|
|
7
7
|
* Repository: https://github.com/rzl-zone/utils-js.
|
|
8
8
|
* ====================================================
|
|
9
9
|
*/
|
|
10
|
-
import { isNonEmptyString, isPlainObject } from './chunk-
|
|
10
|
+
import { isNonEmptyString, isPlainObject } from './chunk-CSG4SCL3.js';
|
|
11
11
|
|
|
12
12
|
var removeSpaces = (value, options = {
|
|
13
13
|
trimOnly: false
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
* ====================================================
|
|
3
3
|
* Rzl Utils-JS.
|
|
4
4
|
* ----------------------------------------------------
|
|
5
|
-
* Version: 3.
|
|
5
|
+
* Version: 3.12.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
|
|
12
|
+
var chunkGKC3UDMC_cjs = require('./chunk-GKC3UDMC.cjs');
|
|
13
13
|
|
|
14
14
|
var parseCurrencyString = (input) => {
|
|
15
|
-
if (!
|
|
15
|
+
if (!chunkGKC3UDMC_cjs.isNonEmptyString(input)) return 0;
|
|
16
16
|
let trimmed = input.trim().replace(/\u00A0/g, "").replace(/\u202F/g, "");
|
|
17
17
|
let isNegative = false;
|
|
18
18
|
if (/^\(.*\)$/.test(trimmed)) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* ====================================================
|
|
3
3
|
* Rzl Utils-JS.
|
|
4
4
|
* ----------------------------------------------------
|
|
5
|
-
* Version: 3.
|
|
5
|
+
* Version: 3.12.0.
|
|
6
6
|
* Author: Rizalvin Dwiky.
|
|
7
7
|
* Repository: https://github.com/rzl-zone/utils-js.
|
|
8
8
|
* ====================================================
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
'use strict';
|
|
11
11
|
|
|
12
12
|
var chunkUDA26MCU_cjs = require('./chunk-UDA26MCU.cjs');
|
|
13
|
-
var
|
|
13
|
+
var chunkGKC3UDMC_cjs = require('./chunk-GKC3UDMC.cjs');
|
|
14
14
|
|
|
15
15
|
var assertIsBigInt = (value, options = {}) => {
|
|
16
16
|
if (chunkUDA26MCU_cjs.isBigInt(value)) return;
|
|
17
|
-
|
|
17
|
+
chunkGKC3UDMC_cjs.resolveErrorMessageAssertions({
|
|
18
18
|
value,
|
|
19
19
|
options,
|
|
20
20
|
requiredValidType: "bigint"
|
|
@@ -22,9 +22,9 @@ var assertIsBigInt = (value, options = {}) => {
|
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
var assertIsNumber = (value, options = {}) => {
|
|
25
|
-
const includeNaN =
|
|
26
|
-
if (
|
|
27
|
-
|
|
25
|
+
const includeNaN = chunkGKC3UDMC_cjs.hasOwnProp(options, "includeNaN") ? options.includeNaN : void 0;
|
|
26
|
+
if (chunkGKC3UDMC_cjs.isNumber(value, { includeNaN })) return;
|
|
27
|
+
chunkGKC3UDMC_cjs.resolveErrorMessageAssertions({
|
|
28
28
|
value,
|
|
29
29
|
options,
|
|
30
30
|
requiredValidType: "number"
|
|
@@ -2,20 +2,16 @@
|
|
|
2
2
|
* ====================================================
|
|
3
3
|
* Rzl Utils-JS.
|
|
4
4
|
* ----------------------------------------------------
|
|
5
|
-
* Version: 3.
|
|
5
|
+
* Version: 3.12.0.
|
|
6
6
|
* Author: Rizalvin Dwiky.
|
|
7
7
|
* Repository: https://github.com/rzl-zone/utils-js.
|
|
8
8
|
* ====================================================
|
|
9
9
|
*/
|
|
10
|
-
import { isArray, resolveErrorMessageAssertions } from './chunk-
|
|
10
|
+
import { isArray, resolveErrorMessageAssertions } from './chunk-CSG4SCL3.js';
|
|
11
11
|
|
|
12
12
|
function assertIsArray(value, options) {
|
|
13
13
|
if (isArray(value)) return;
|
|
14
|
-
resolveErrorMessageAssertions({
|
|
15
|
-
value,
|
|
16
|
-
options,
|
|
17
|
-
requiredValidType: "array"
|
|
18
|
-
});
|
|
14
|
+
resolveErrorMessageAssertions({ value, options, requiredValidType: "array" });
|
|
19
15
|
}
|
|
20
16
|
|
|
21
17
|
export { assertIsArray };
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
* ====================================================
|
|
3
3
|
* Rzl Utils-JS.
|
|
4
4
|
* ----------------------------------------------------
|
|
5
|
-
* Version: 3.
|
|
5
|
+
* Version: 3.12.0.
|
|
6
6
|
* Author: Rizalvin Dwiky.
|
|
7
7
|
* Repository: https://github.com/rzl-zone/utils-js.
|
|
8
8
|
* ====================================================
|
|
9
9
|
*/
|
|
10
|
-
import { isEmptyString } from './chunk-
|
|
11
|
-
import { assertIsArray } from './chunk-
|
|
12
|
-
import { isPlainObject, isNumber, isNonEmptyString, isFunction, hasOwnProp, isNonEmptyArray, getPreciseType, isString, isObjectOrArray, isStringObject, isNumberObject, isBooleanObject, isArray } from './chunk-
|
|
10
|
+
import { isEmptyString } from './chunk-TCDOWZQE.js';
|
|
11
|
+
import { assertIsArray } from './chunk-HSP6IWZK.js';
|
|
12
|
+
import { isPlainObject, isNumber, isNonEmptyString, isFunction, hasOwnProp, isNonEmptyArray, getPreciseType, isString, isObjectOrArray, isStringObject, isNumberObject, isBooleanObject, isArray } from './chunk-CSG4SCL3.js';
|
|
13
13
|
import { getDefaultConfig, extendTailwindMerge } from 'tailwind-merge-v3';
|
|
14
14
|
import { getDefaultConfig as getDefaultConfig$1, extendTailwindMerge as extendTailwindMerge$1 } from 'tailwind-merge-v4';
|
|
15
15
|
|
|
@@ -174,15 +174,6 @@ var twMergeDefaultV4 = (options = {}) => {
|
|
|
174
174
|
});
|
|
175
175
|
};
|
|
176
176
|
|
|
177
|
-
var defaultTwMergeV3 = twMergeDefaultV3();
|
|
178
|
-
var defaultTwMergeV4 = twMergeDefaultV4();
|
|
179
|
-
var cnV3 = (...classes) => {
|
|
180
|
-
return defaultTwMergeV3(cx(...classes));
|
|
181
|
-
};
|
|
182
|
-
var cnV4 = (...classes) => {
|
|
183
|
-
return defaultTwMergeV4(cx(...classes));
|
|
184
|
-
};
|
|
185
|
-
|
|
186
177
|
var customCnV3 = (customTwMergeV3, ...classes) => {
|
|
187
178
|
if (!isFunction(customTwMergeV3)) {
|
|
188
179
|
throw new TypeError(
|
|
@@ -204,6 +195,15 @@ var customCnV4 = (customTwMergeV4, ...classes) => {
|
|
|
204
195
|
return customTwMergeV4(cx(...classes));
|
|
205
196
|
};
|
|
206
197
|
|
|
198
|
+
var defaultTwMergeV3 = twMergeDefaultV3();
|
|
199
|
+
var defaultTwMergeV4 = twMergeDefaultV4();
|
|
200
|
+
var cnV3 = (...classes) => {
|
|
201
|
+
return defaultTwMergeV3(cx(...classes));
|
|
202
|
+
};
|
|
203
|
+
var cnV4 = (...classes) => {
|
|
204
|
+
return defaultTwMergeV4(cx(...classes));
|
|
205
|
+
};
|
|
206
|
+
|
|
207
207
|
var shouldForwardProp = (props) => {
|
|
208
208
|
assertIsArray(props, {
|
|
209
209
|
message: ({ currentType, validType }) => `First parameter (\`props\`) must be of type \`${validType}\`, but received: \`${currentType}\`.`
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
* ====================================================
|
|
3
3
|
* Rzl Utils-JS.
|
|
4
4
|
* ----------------------------------------------------
|
|
5
|
-
* Version: 3.
|
|
5
|
+
* Version: 3.12.0.
|
|
6
6
|
* Author: Rizalvin Dwiky.
|
|
7
7
|
* Repository: https://github.com/rzl-zone/utils-js.
|
|
8
8
|
* ====================================================
|
|
9
9
|
*/
|
|
10
10
|
import { isInteger } from './chunk-WVSPXFTY.js';
|
|
11
|
-
import { safeStableStringify } from './chunk-
|
|
12
|
-
import { isNonEmptyArray, getPreciseType, isNumber, isPlainObject, assertIsBoolean, isNaN, isNonEmptyString, isBoolean } from './chunk-
|
|
11
|
+
import { safeStableStringify } from './chunk-6VUXD3CF.js';
|
|
12
|
+
import { isNonEmptyArray, getPreciseType, isNumber, isPlainObject, assertIsBoolean, isNaN, isNonEmptyString, isBoolean } from './chunk-CSG4SCL3.js';
|
|
13
13
|
|
|
14
14
|
function getRandomItem(array) {
|
|
15
15
|
if (!isNonEmptyArray(array)) return void 0;
|
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
* ====================================================
|
|
3
3
|
* Rzl Utils-JS.
|
|
4
4
|
* ----------------------------------------------------
|
|
5
|
-
* Version: 3.
|
|
5
|
+
* Version: 3.12.0.
|
|
6
6
|
* Author: Rizalvin Dwiky.
|
|
7
7
|
* Repository: https://github.com/rzl-zone/utils-js.
|
|
8
8
|
* ====================================================
|
|
9
9
|
*/
|
|
10
10
|
import { isURL } from './chunk-ONZFBJVW.js';
|
|
11
|
-
import { normalizeString } from './chunk-
|
|
12
|
-
import { toStringArrayUnRecursive } from './chunk-
|
|
13
|
-
import { isEmptyValue } from './chunk-
|
|
11
|
+
import { normalizeString } from './chunk-AJZ6PMMZ.js';
|
|
12
|
+
import { toStringArrayUnRecursive } from './chunk-CFYZC4S6.js';
|
|
13
|
+
import { isEmptyValue } from './chunk-QFFBIOJ4.js';
|
|
14
14
|
import { isInteger } from './chunk-WVSPXFTY.js';
|
|
15
|
-
import { normalizePathname } from './chunk-
|
|
16
|
-
import { isEmptyString } from './chunk-
|
|
17
|
-
import { assertIsArray } from './chunk-
|
|
18
|
-
import { safeStableStringify } from './chunk-
|
|
19
|
-
import { isString, getPreciseType, isUndefined, isNonEmptyString, isFunction, isNumber, isError, isArray, isNil, isNull, isPlainObject, isBoolean, isNonEmptyArray } from './chunk-
|
|
15
|
+
import { normalizePathname } from './chunk-2CYDJVGM.js';
|
|
16
|
+
import { isEmptyString } from './chunk-TCDOWZQE.js';
|
|
17
|
+
import { assertIsArray } from './chunk-HSP6IWZK.js';
|
|
18
|
+
import { safeStableStringify } from './chunk-6VUXD3CF.js';
|
|
19
|
+
import { isString, getPreciseType, isUndefined, isNonEmptyString, isFunction, isNumber, isError, isArray, isNil, isNull, isPlainObject, isBoolean, isNonEmptyArray } from './chunk-CSG4SCL3.js';
|
|
20
20
|
|
|
21
21
|
var constructURL = (baseUrl, queryParams, removeParams) => {
|
|
22
22
|
if (isString(baseUrl)) {
|
package/dist/chunk-KHO2SBNA.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* ====================================================
|
|
3
3
|
* Rzl Utils-JS.
|
|
4
4
|
* ----------------------------------------------------
|
|
5
|
-
* Version: 3.
|
|
5
|
+
* Version: 3.12.0.
|
|
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.
|
|
5
|
+
* Version: 3.12.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-
|
|
10
|
+
import { isEmptyValue } from './chunk-QFFBIOJ4.js';
|
|
11
11
|
|
|
12
12
|
var isNonEmptyValue = (value, options = {}) => {
|
|
13
13
|
return !isEmptyValue(value, options);
|
|
@@ -2,29 +2,29 @@
|
|
|
2
2
|
* ====================================================
|
|
3
3
|
* Rzl Utils-JS.
|
|
4
4
|
* ----------------------------------------------------
|
|
5
|
-
* Version: 3.
|
|
5
|
+
* Version: 3.12.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
|
|
12
|
+
var chunkGKC3UDMC_cjs = require('./chunk-GKC3UDMC.cjs');
|
|
13
13
|
|
|
14
14
|
var isEmptyArray = (value) => {
|
|
15
|
-
if (!
|
|
15
|
+
if (!chunkGKC3UDMC_cjs.isArray(value)) return true;
|
|
16
16
|
return value.length === 0;
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
function isEmptyObject(value, options = {}) {
|
|
20
|
-
if (!
|
|
20
|
+
if (!chunkGKC3UDMC_cjs.isObject(value)) {
|
|
21
21
|
return true;
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
chunkGKC3UDMC_cjs.assertIsPlainObject(options, {
|
|
24
24
|
message: ({ currentType, validType }) => `Second parameter (\`options\`) must be of type \`${validType}\`, but received: \`${currentType}\`.`
|
|
25
25
|
});
|
|
26
|
-
const checkSymbols =
|
|
27
|
-
|
|
26
|
+
const checkSymbols = chunkGKC3UDMC_cjs.hasOwnProp(options, "checkSymbols") ? options.checkSymbols : false;
|
|
27
|
+
chunkGKC3UDMC_cjs.assertIsBoolean(checkSymbols, {
|
|
28
28
|
message: ({ currentType, validType }) => `Parameter \`checkSymbols\` property of the \`options\` (second parameter) must be of type \`${validType}\`, but received: \`${currentType}\`.`
|
|
29
29
|
});
|
|
30
30
|
const hasNoKeys = Object.keys(value).length === 0;
|