@rzl-zone/utils-js 3.11.0 → 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/README.md +96 -112
- 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 +22 -20
|
@@ -2,22 +2,22 @@
|
|
|
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 chunk4YLBKLGS_cjs = require('./chunk-4YLBKLGS.cjs');
|
|
13
|
+
var chunkGKC3UDMC_cjs = require('./chunk-GKC3UDMC.cjs');
|
|
14
14
|
|
|
15
15
|
var capitalizeFirst = (string, options = {
|
|
16
16
|
lowerCaseNextRest: true,
|
|
17
17
|
trim: false
|
|
18
18
|
}) => {
|
|
19
|
-
if (!
|
|
20
|
-
if (!
|
|
19
|
+
if (!chunkGKC3UDMC_cjs.isNonEmptyString(string)) return "";
|
|
20
|
+
if (!chunkGKC3UDMC_cjs.isPlainObject(options)) {
|
|
21
21
|
options = {};
|
|
22
22
|
}
|
|
23
23
|
const lowerCaseNextRest = options.lowerCaseNextRest !== false;
|
|
@@ -30,9 +30,9 @@ var capitalizeWords = (value, options = {
|
|
|
30
30
|
collapseSpaces: false,
|
|
31
31
|
trim: false
|
|
32
32
|
}) => {
|
|
33
|
-
if (!
|
|
33
|
+
if (!chunkGKC3UDMC_cjs.isNonEmptyString(value)) return "";
|
|
34
34
|
let result = value;
|
|
35
|
-
if (!
|
|
35
|
+
if (!chunkGKC3UDMC_cjs.isPlainObject(options)) {
|
|
36
36
|
options = {};
|
|
37
37
|
}
|
|
38
38
|
const collapseSpaces = options.collapseSpaces === true;
|
|
@@ -50,10 +50,10 @@ var capitalizeWords = (value, options = {
|
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
function stripHtmlTags(input) {
|
|
53
|
-
if (!
|
|
53
|
+
if (!chunkGKC3UDMC_cjs.isString(input)) {
|
|
54
54
|
return void 0;
|
|
55
55
|
}
|
|
56
|
-
if (
|
|
56
|
+
if (chunk4YLBKLGS_cjs.isEmptyString(input)) {
|
|
57
57
|
return "";
|
|
58
58
|
}
|
|
59
59
|
const stripped = input.replace(/<\/?[a-zA-Z][^<>]*\/?>/g, " ").trim();
|
|
@@ -62,7 +62,7 @@ function stripHtmlTags(input) {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
var getInitialsName = (name) => {
|
|
65
|
-
if (!
|
|
65
|
+
if (!chunkGKC3UDMC_cjs.isNonEmptyString(name)) return "";
|
|
66
66
|
name = name.replace(/\s+/g, " ").trim();
|
|
67
67
|
const nameParts = name.split(" ");
|
|
68
68
|
if (nameParts.length > 1) {
|
|
@@ -75,13 +75,13 @@ var getInitialsName = (name) => {
|
|
|
75
75
|
};
|
|
76
76
|
|
|
77
77
|
var replaceAt = (index, originalString, replaceTo) => {
|
|
78
|
-
if (!
|
|
78
|
+
if (!chunkGKC3UDMC_cjs.isNumber(index) || !chunkGKC3UDMC_cjs.isString(replaceTo) || !chunkGKC3UDMC_cjs.isString(originalString)) {
|
|
79
79
|
throw new TypeError(
|
|
80
|
-
`First parameter (\`index\`) must be of type \`number\`, second parameter (\`originalString\`) and third parameter (\`replaceTo\`) must be of type \`string\`, but received: "['index': \`${
|
|
80
|
+
`First parameter (\`index\`) must be of type \`number\`, second parameter (\`originalString\`) and third parameter (\`replaceTo\`) must be of type \`string\`, but received: "['index': \`${chunkGKC3UDMC_cjs.getPreciseType(
|
|
81
81
|
index
|
|
82
|
-
)}\`, 'originalString': \`${
|
|
82
|
+
)}\`, 'originalString': \`${chunkGKC3UDMC_cjs.getPreciseType(
|
|
83
83
|
originalString
|
|
84
|
-
)}\`, 'replaceTo': \`${
|
|
84
|
+
)}\`, 'replaceTo': \`${chunkGKC3UDMC_cjs.getPreciseType(replaceTo)}\`]".`
|
|
85
85
|
);
|
|
86
86
|
}
|
|
87
87
|
if (index < 0 || index >= originalString.length) {
|
|
@@ -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 chunkDVMHRLKP_cjs = require('./chunk-DVMHRLKP.cjs');
|
|
13
|
-
var
|
|
14
|
-
var
|
|
13
|
+
var chunkTQPGXGKB_cjs = require('./chunk-TQPGXGKB.cjs');
|
|
14
|
+
var chunkGKC3UDMC_cjs = require('./chunk-GKC3UDMC.cjs');
|
|
15
15
|
|
|
16
16
|
function getRandomItem(array) {
|
|
17
|
-
if (!
|
|
17
|
+
if (!chunkGKC3UDMC_cjs.isNonEmptyArray(array)) return void 0;
|
|
18
18
|
const randomIndex = Math.floor(Math.random() * (array.length || 0));
|
|
19
19
|
return array[randomIndex];
|
|
20
20
|
}
|
|
@@ -25,11 +25,11 @@ var randomInt = (min, max) => {
|
|
|
25
25
|
`First parameter (\`min\`) and second parameter (\`max\`) must be of type \`integer-number\`${minValueNote(
|
|
26
26
|
min,
|
|
27
27
|
max
|
|
28
|
-
)}value, but received: ['min': \`${
|
|
28
|
+
)}value, but received: ['min': \`${chunkGKC3UDMC_cjs.getPreciseType(
|
|
29
29
|
min
|
|
30
|
-
)}\` - (with value: \`${
|
|
30
|
+
)}\` - (with value: \`${chunkTQPGXGKB_cjs.safeStableStringify(min, {
|
|
31
31
|
keepUndefined: true
|
|
32
|
-
})})\`, 'max': \`${
|
|
32
|
+
})})\`, 'max': \`${chunkGKC3UDMC_cjs.getPreciseType(max)}\` - (with value: \`${chunkTQPGXGKB_cjs.safeStableStringify(
|
|
33
33
|
max,
|
|
34
34
|
{
|
|
35
35
|
keepUndefined: true
|
|
@@ -41,9 +41,9 @@ var randomInt = (min, max) => {
|
|
|
41
41
|
throw new RangeError(
|
|
42
42
|
`First parameter (\`min\`) must be less than or equal to second parameter (\`max\`), but received: ['min': ${formatValue(
|
|
43
43
|
min
|
|
44
|
-
)} - (with value: \`${
|
|
44
|
+
)} - (with value: \`${chunkTQPGXGKB_cjs.safeStableStringify(min, {
|
|
45
45
|
keepUndefined: true
|
|
46
|
-
})})\`, 'max': ${formatValue(max)} - (with value: \`${
|
|
46
|
+
})})\`, 'max': ${formatValue(max)} - (with value: \`${chunkTQPGXGKB_cjs.safeStableStringify(max, {
|
|
47
47
|
keepUndefined: true
|
|
48
48
|
})})\`].`
|
|
49
49
|
);
|
|
@@ -53,31 +53,31 @@ var randomInt = (min, max) => {
|
|
|
53
53
|
return Math.floor(Math.random() * (max - min + 1)) + min;
|
|
54
54
|
};
|
|
55
55
|
var formatValue = (value) => {
|
|
56
|
-
return
|
|
56
|
+
return chunkGKC3UDMC_cjs.isNumber(value, { includeNaN: true }) ? value === Number.MIN_VALUE ? "`Number.MIN_VALUE`" : `${value}` : `\`${chunkGKC3UDMC_cjs.getPreciseType(value)}\``;
|
|
57
57
|
};
|
|
58
58
|
var minValueNote = (...values) => {
|
|
59
|
-
return values.some((v) =>
|
|
59
|
+
return values.some((v) => chunkGKC3UDMC_cjs.isNumber(v, { includeNaN: true }) && v === Number.MIN_VALUE) ? " and can't be `Number.MIN_VALUE` " : " ";
|
|
60
60
|
};
|
|
61
61
|
|
|
62
62
|
var randomIntByLength = (options) => {
|
|
63
|
-
if (!
|
|
63
|
+
if (!chunkGKC3UDMC_cjs.isPlainObject(options)) {
|
|
64
64
|
options = {};
|
|
65
65
|
}
|
|
66
66
|
const { minLength = 1, maxLength = 16, avoidZero = false } = options;
|
|
67
|
-
|
|
67
|
+
chunkGKC3UDMC_cjs.assertIsBoolean(avoidZero, {
|
|
68
68
|
message({ currentType, validType }) {
|
|
69
69
|
return `Parameters \`avoidZero\` must be of type \`${validType}\`, but received: \`${currentType}\`.`;
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
72
|
if (!chunkDVMHRLKP_cjs.isInteger(minLength) || !chunkDVMHRLKP_cjs.isInteger(maxLength)) {
|
|
73
73
|
throw new TypeError(
|
|
74
|
-
`Parameters \`minLength\` and \`maxLength\` must be of type \`integer-number\`, but received: ['minLength': \`${
|
|
74
|
+
`Parameters \`minLength\` and \`maxLength\` must be of type \`integer-number\`, but received: ['minLength': \`${chunkGKC3UDMC_cjs.getPreciseType(
|
|
75
75
|
minLength
|
|
76
|
-
)}\` - (with value: ${
|
|
76
|
+
)}\` - (with value: ${chunkTQPGXGKB_cjs.safeStableStringify(minLength, {
|
|
77
77
|
keepUndefined: true
|
|
78
|
-
})}), 'maxLength': \`${
|
|
78
|
+
})}), 'maxLength': \`${chunkGKC3UDMC_cjs.getPreciseType(
|
|
79
79
|
maxLength
|
|
80
|
-
)}\` - (with value: ${
|
|
80
|
+
)}\` - (with value: ${chunkTQPGXGKB_cjs.safeStableStringify(maxLength, {
|
|
81
81
|
keepUndefined: true
|
|
82
82
|
})})].`
|
|
83
83
|
);
|
|
@@ -98,7 +98,7 @@ var randomIntByLength = (options) => {
|
|
|
98
98
|
};
|
|
99
99
|
|
|
100
100
|
var randomStr = (options) => {
|
|
101
|
-
if (!
|
|
101
|
+
if (!chunkGKC3UDMC_cjs.isPlainObject(options)) {
|
|
102
102
|
options = {};
|
|
103
103
|
}
|
|
104
104
|
const {
|
|
@@ -107,20 +107,20 @@ var randomStr = (options) => {
|
|
|
107
107
|
type = "string",
|
|
108
108
|
avoidWhiteSpace = true
|
|
109
109
|
} = options;
|
|
110
|
-
|
|
110
|
+
chunkGKC3UDMC_cjs.assertIsBoolean(avoidWhiteSpace, {
|
|
111
111
|
message({ currentType, validType }) {
|
|
112
112
|
return `Parameters \`avoidWhiteSpace\` property of the \`options\` (first-parameter) must be of type \`${validType}\`, but received: \`${currentType}\`.`;
|
|
113
113
|
}
|
|
114
114
|
});
|
|
115
115
|
if (!chunkDVMHRLKP_cjs.isInteger(minLength) || !chunkDVMHRLKP_cjs.isInteger(maxLength)) {
|
|
116
116
|
throw new TypeError(
|
|
117
|
-
`Parameters \`minLength\` and \`maxLength\` must be of type \`integer-number\`, but received: ['minLength': \`${
|
|
117
|
+
`Parameters \`minLength\` and \`maxLength\` must be of type \`integer-number\`, but received: ['minLength': \`${chunkGKC3UDMC_cjs.getPreciseType(
|
|
118
118
|
minLength
|
|
119
|
-
)}\` - (with value: ${
|
|
119
|
+
)}\` - (with value: ${chunkTQPGXGKB_cjs.safeStableStringify(minLength, {
|
|
120
120
|
keepUndefined: true
|
|
121
|
-
})}), 'maxLength': \`${
|
|
121
|
+
})}), 'maxLength': \`${chunkGKC3UDMC_cjs.getPreciseType(
|
|
122
122
|
maxLength
|
|
123
|
-
)}\` - (with value: ${
|
|
123
|
+
)}\` - (with value: ${chunkTQPGXGKB_cjs.safeStableStringify(maxLength, {
|
|
124
124
|
keepUndefined: true
|
|
125
125
|
})})].`
|
|
126
126
|
);
|
|
@@ -132,9 +132,9 @@ var randomStr = (options) => {
|
|
|
132
132
|
}
|
|
133
133
|
if (type !== "string" && type !== "number") {
|
|
134
134
|
throw new TypeError(
|
|
135
|
-
`Parameter \`type\` must be of type \`string\` with value one of "string" | "number", but received: \`${
|
|
135
|
+
`Parameter \`type\` must be of type \`string\` with value one of "string" | "number", but received: \`${chunkGKC3UDMC_cjs.getPreciseType(
|
|
136
136
|
type
|
|
137
|
-
)}\`, with value: ${
|
|
137
|
+
)}\`, with value: ${chunkTQPGXGKB_cjs.safeStableStringify(type, {
|
|
138
138
|
keepUndefined: true
|
|
139
139
|
})}.`
|
|
140
140
|
);
|
|
@@ -145,7 +145,7 @@ var randomStr = (options) => {
|
|
|
145
145
|
};
|
|
146
146
|
const defaultNumberSet = "0123456789";
|
|
147
147
|
const defaultStringSet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
148
|
-
const baseCharSet = type === "number" ? (!
|
|
148
|
+
const baseCharSet = type === "number" ? (!chunkGKC3UDMC_cjs.isNaN(Number(options.replaceGenInt)) ? options.replaceGenInt : void 0) ?? defaultNumberSet : (options.replaceGenStr ? options.replaceGenStr : void 0) ?? defaultStringSet;
|
|
149
149
|
const characterSet = cleanCharacters(baseCharSet) + (options.addChar || "");
|
|
150
150
|
if (!characterSet.length) {
|
|
151
151
|
const errCharSet = () => {
|
|
@@ -167,24 +167,24 @@ var randomStr = (options) => {
|
|
|
167
167
|
};
|
|
168
168
|
|
|
169
169
|
function randomUUID(options = {}) {
|
|
170
|
-
if (!
|
|
170
|
+
if (!chunkGKC3UDMC_cjs.isPlainObject(options)) {
|
|
171
171
|
throw new TypeError(
|
|
172
|
-
`First parameter (\`options\`) must be a plain object with optional properties \`version\` and \`monotonic\`, but received: \`${
|
|
172
|
+
`First parameter (\`options\`) must be a plain object with optional properties \`version\` and \`monotonic\`, but received: \`${chunkGKC3UDMC_cjs.getPreciseType(
|
|
173
173
|
options
|
|
174
|
-
)}\` - (with value: \`${
|
|
174
|
+
)}\` - (with value: \`${chunkTQPGXGKB_cjs.safeStableStringify(options, { keepUndefined: true })}\`).`
|
|
175
175
|
);
|
|
176
176
|
}
|
|
177
177
|
const { version = "v4", monotonic = false } = options;
|
|
178
|
-
if (!
|
|
178
|
+
if (!chunkGKC3UDMC_cjs.isNonEmptyString(version)) {
|
|
179
179
|
throw new TypeError(
|
|
180
|
-
`Parameter \`version\` property of the \`options\` (first parameter) must be a \`string\` of either "v4" or "v7", but received type: \`${
|
|
180
|
+
`Parameter \`version\` property of the \`options\` (first parameter) must be a \`string\` of either "v4" or "v7", but received type: \`${chunkGKC3UDMC_cjs.getPreciseType(
|
|
181
181
|
version
|
|
182
|
-
)}\` - (with value: \`${
|
|
182
|
+
)}\` - (with value: \`${chunkTQPGXGKB_cjs.safeStableStringify(version, { keepUndefined: true })}\`).`
|
|
183
183
|
);
|
|
184
184
|
}
|
|
185
185
|
if (version !== "v4" && version !== "v7") {
|
|
186
186
|
throw new RangeError(
|
|
187
|
-
`Unsupported UUID version. Allowed values are "v4" or "v7". (received: \`${
|
|
187
|
+
`Unsupported UUID version. Allowed values are "v4" or "v7". (received: \`${chunkTQPGXGKB_cjs.safeStableStringify(
|
|
188
188
|
version,
|
|
189
189
|
{
|
|
190
190
|
keepUndefined: true
|
|
@@ -192,18 +192,18 @@ function randomUUID(options = {}) {
|
|
|
192
192
|
)}\`).`
|
|
193
193
|
);
|
|
194
194
|
}
|
|
195
|
-
if (!
|
|
195
|
+
if (!chunkGKC3UDMC_cjs.isBoolean(monotonic)) {
|
|
196
196
|
throw new TypeError(
|
|
197
|
-
`Parameter \`monotonic\` property of the \`options\` (first parameter) must be a \`boolean\` when provided, but received type: \`${
|
|
197
|
+
`Parameter \`monotonic\` property of the \`options\` (first parameter) must be a \`boolean\` when provided, but received type: \`${chunkGKC3UDMC_cjs.getPreciseType(
|
|
198
198
|
monotonic
|
|
199
|
-
)}\` - (with value: \`${
|
|
199
|
+
)}\` - (with value: \`${chunkTQPGXGKB_cjs.safeStableStringify(monotonic, {
|
|
200
200
|
keepUndefined: true
|
|
201
201
|
})}\`).`
|
|
202
202
|
);
|
|
203
203
|
}
|
|
204
204
|
if (monotonic && version !== "v7") {
|
|
205
205
|
throw new TypeError(
|
|
206
|
-
`Parameter \`monotonic\` property of the \`options\` (first parameter) is only supported for version "v7". Received: version=${
|
|
206
|
+
`Parameter \`monotonic\` property of the \`options\` (first parameter) is only supported for version "v7". Received: version=${chunkTQPGXGKB_cjs.safeStableStringify(
|
|
207
207
|
version,
|
|
208
208
|
{ keepUndefined: true }
|
|
209
209
|
)}.`
|
|
@@ -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 } from './chunk-
|
|
10
|
+
import { isNonEmptyString } from './chunk-CSG4SCL3.js';
|
|
11
11
|
|
|
12
12
|
var normalizeString = (input) => {
|
|
13
13
|
return isNonEmptyString(input) ? input.trim() : "";
|
|
@@ -2,28 +2,28 @@
|
|
|
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
|
|
14
|
-
var
|
|
12
|
+
var chunk4YLBKLGS_cjs = require('./chunk-4YLBKLGS.cjs');
|
|
13
|
+
var chunkRRQHMOPE_cjs = require('./chunk-RRQHMOPE.cjs');
|
|
14
|
+
var chunkGKC3UDMC_cjs = require('./chunk-GKC3UDMC.cjs');
|
|
15
15
|
var tailwindMergeV3 = require('tailwind-merge-v3');
|
|
16
16
|
var tailwindMergeV4 = require('tailwind-merge-v4');
|
|
17
17
|
|
|
18
18
|
function toStringValue(value) {
|
|
19
19
|
let str = "";
|
|
20
|
-
if (
|
|
20
|
+
if (chunkGKC3UDMC_cjs.isNonEmptyString(value) || chunkGKC3UDMC_cjs.isNumber(value)) {
|
|
21
21
|
str += value;
|
|
22
|
-
} else if (
|
|
23
|
-
if (
|
|
22
|
+
} else if (chunkGKC3UDMC_cjs.isObjectOrArray(value)) {
|
|
23
|
+
if (chunkGKC3UDMC_cjs.isStringObject(value) || chunkGKC3UDMC_cjs.isNumberObject(value) || chunkGKC3UDMC_cjs.isBooleanObject(value)) {
|
|
24
24
|
const val = value.valueOf();
|
|
25
25
|
if (val) str += val;
|
|
26
|
-
} else if (
|
|
26
|
+
} else if (chunkGKC3UDMC_cjs.isArray(value)) {
|
|
27
27
|
for (const item of value) {
|
|
28
28
|
if (!item) continue;
|
|
29
29
|
const y = toStringValue(item);
|
|
@@ -54,22 +54,22 @@ function cx(...values) {
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
var validatorPropsTwMerge = (options) => {
|
|
57
|
-
if (!
|
|
57
|
+
if (!chunkGKC3UDMC_cjs.isPlainObject(options)) options = {};
|
|
58
58
|
let { config, prefix, extend, override, cacheSize, experimentalParseClassName } = options;
|
|
59
|
-
if (!
|
|
60
|
-
if (!
|
|
61
|
-
if (!
|
|
62
|
-
if (!
|
|
63
|
-
if (!
|
|
64
|
-
if (!
|
|
65
|
-
const theme =
|
|
66
|
-
const classGroups =
|
|
67
|
-
const conflictingClassGroupModifiers =
|
|
59
|
+
if (!chunkGKC3UDMC_cjs.isPlainObject(config)) config = {};
|
|
60
|
+
if (!chunkGKC3UDMC_cjs.isPlainObject(extend)) extend = {};
|
|
61
|
+
if (!chunkGKC3UDMC_cjs.isPlainObject(override)) override = {};
|
|
62
|
+
if (!chunkGKC3UDMC_cjs.isNumber(cacheSize)) cacheSize = void 0;
|
|
63
|
+
if (!chunkGKC3UDMC_cjs.isNonEmptyString(prefix)) prefix = void 0;
|
|
64
|
+
if (!chunkGKC3UDMC_cjs.isFunction(experimentalParseClassName)) experimentalParseClassName = void 0;
|
|
65
|
+
const theme = chunkGKC3UDMC_cjs.hasOwnProp(extend, "theme") ? extend.theme : {};
|
|
66
|
+
const classGroups = chunkGKC3UDMC_cjs.hasOwnProp(extend, "classGroups") ? extend.classGroups : {};
|
|
67
|
+
const conflictingClassGroupModifiers = chunkGKC3UDMC_cjs.hasOwnProp(
|
|
68
68
|
extend,
|
|
69
69
|
"conflictingClassGroupModifiers"
|
|
70
70
|
) ? extend.conflictingClassGroupModifiers : {};
|
|
71
|
-
const conflictingClassGroups =
|
|
72
|
-
const orderSensitiveModifiers =
|
|
71
|
+
const conflictingClassGroups = chunkGKC3UDMC_cjs.hasOwnProp(extend, "conflictingClassGroups") ? extend.conflictingClassGroups : {};
|
|
72
|
+
const orderSensitiveModifiers = chunkGKC3UDMC_cjs.hasOwnProp(extend, "orderSensitiveModifiers") && chunkGKC3UDMC_cjs.isNonEmptyArray(extend.orderSensitiveModifiers) ? extend.orderSensitiveModifiers : [];
|
|
73
73
|
return {
|
|
74
74
|
config,
|
|
75
75
|
override,
|
|
@@ -86,7 +86,7 @@ var validatorPropsTwMerge = (options) => {
|
|
|
86
86
|
|
|
87
87
|
var defaultConfig = tailwindMergeV3.getDefaultConfig();
|
|
88
88
|
var twMergeDefaultV3 = (options = {}) => {
|
|
89
|
-
if (!
|
|
89
|
+
if (!chunkGKC3UDMC_cjs.isPlainObject(options)) options = {};
|
|
90
90
|
const {
|
|
91
91
|
cacheSize,
|
|
92
92
|
classGroups,
|
|
@@ -129,7 +129,7 @@ var twMergeDefaultV3 = (options = {}) => {
|
|
|
129
129
|
};
|
|
130
130
|
var defaultConfig2 = tailwindMergeV4.getDefaultConfig();
|
|
131
131
|
var twMergeDefaultV4 = (options = {}) => {
|
|
132
|
-
if (!
|
|
132
|
+
if (!chunkGKC3UDMC_cjs.isPlainObject(options)) options = {};
|
|
133
133
|
const {
|
|
134
134
|
cacheSize,
|
|
135
135
|
classGroups,
|
|
@@ -176,19 +176,10 @@ var twMergeDefaultV4 = (options = {}) => {
|
|
|
176
176
|
});
|
|
177
177
|
};
|
|
178
178
|
|
|
179
|
-
var defaultTwMergeV3 = twMergeDefaultV3();
|
|
180
|
-
var defaultTwMergeV4 = twMergeDefaultV4();
|
|
181
|
-
var cnV3 = (...classes) => {
|
|
182
|
-
return defaultTwMergeV3(cx(...classes));
|
|
183
|
-
};
|
|
184
|
-
var cnV4 = (...classes) => {
|
|
185
|
-
return defaultTwMergeV4(cx(...classes));
|
|
186
|
-
};
|
|
187
|
-
|
|
188
179
|
var customCnV3 = (customTwMergeV3, ...classes) => {
|
|
189
|
-
if (!
|
|
180
|
+
if (!chunkGKC3UDMC_cjs.isFunction(customTwMergeV3)) {
|
|
190
181
|
throw new TypeError(
|
|
191
|
-
`first Parameter (\`customTwMergeV3\`) must be of type \`function\`, but received: \`${
|
|
182
|
+
`first Parameter (\`customTwMergeV3\`) must be of type \`function\`, but received: \`${chunkGKC3UDMC_cjs.getPreciseType(
|
|
192
183
|
customTwMergeV3
|
|
193
184
|
)}\`.`
|
|
194
185
|
);
|
|
@@ -196,9 +187,9 @@ var customCnV3 = (customTwMergeV3, ...classes) => {
|
|
|
196
187
|
return customTwMergeV3(cx(...classes));
|
|
197
188
|
};
|
|
198
189
|
var customCnV4 = (customTwMergeV4, ...classes) => {
|
|
199
|
-
if (!
|
|
190
|
+
if (!chunkGKC3UDMC_cjs.isFunction(customTwMergeV4)) {
|
|
200
191
|
throw new TypeError(
|
|
201
|
-
`first Parameter (\`customTwMergeV4\`) must be of type \`function\`, but received: \`${
|
|
192
|
+
`first Parameter (\`customTwMergeV4\`) must be of type \`function\`, but received: \`${chunkGKC3UDMC_cjs.getPreciseType(
|
|
202
193
|
customTwMergeV4
|
|
203
194
|
)}\`.`
|
|
204
195
|
);
|
|
@@ -206,27 +197,36 @@ var customCnV4 = (customTwMergeV4, ...classes) => {
|
|
|
206
197
|
return customTwMergeV4(cx(...classes));
|
|
207
198
|
};
|
|
208
199
|
|
|
200
|
+
var defaultTwMergeV3 = twMergeDefaultV3();
|
|
201
|
+
var defaultTwMergeV4 = twMergeDefaultV4();
|
|
202
|
+
var cnV3 = (...classes) => {
|
|
203
|
+
return defaultTwMergeV3(cx(...classes));
|
|
204
|
+
};
|
|
205
|
+
var cnV4 = (...classes) => {
|
|
206
|
+
return defaultTwMergeV4(cx(...classes));
|
|
207
|
+
};
|
|
208
|
+
|
|
209
209
|
var shouldForwardProp = (props) => {
|
|
210
|
-
|
|
210
|
+
chunkRRQHMOPE_cjs.assertIsArray(props, {
|
|
211
211
|
message: ({ currentType, validType }) => `First parameter (\`props\`) must be of type \`${validType}\`, but received: \`${currentType}\`.`
|
|
212
212
|
});
|
|
213
213
|
const invalidItems = [];
|
|
214
214
|
props.forEach((p, idx) => {
|
|
215
|
-
if (!
|
|
215
|
+
if (!chunkGKC3UDMC_cjs.isString(p)) {
|
|
216
216
|
invalidItems.push({
|
|
217
217
|
index: idx,
|
|
218
|
-
reason: `Expected a non-empty string, but received ${
|
|
218
|
+
reason: `Expected a non-empty string, but received ${chunkGKC3UDMC_cjs.getPreciseType(p, {
|
|
219
219
|
formatCase: "toPascalCaseSpace"
|
|
220
220
|
})}.`
|
|
221
221
|
});
|
|
222
|
-
} else if (
|
|
222
|
+
} else if (chunk4YLBKLGS_cjs.isEmptyString(p)) {
|
|
223
223
|
invalidItems.push({
|
|
224
224
|
index: idx,
|
|
225
225
|
reason: `Expected a non-empty string, but received EmptyString.`
|
|
226
226
|
});
|
|
227
227
|
}
|
|
228
228
|
});
|
|
229
|
-
if (
|
|
229
|
+
if (chunkGKC3UDMC_cjs.isNonEmptyArray(invalidItems)) {
|
|
230
230
|
const maxWidth = Math.max(...invalidItems.map((item) => String(item.index).length));
|
|
231
231
|
const details = invalidItems.map(
|
|
232
232
|
(item) => `\u2022 [Index ${String(item.index).padStart(maxWidth, "0")}] ${item.reason}`
|
|
@@ -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 chunkNYK5K3V2_cjs = require('./chunk-NYK5K3V2.cjs');
|
|
13
|
+
var chunkGKC3UDMC_cjs = require('./chunk-GKC3UDMC.cjs');
|
|
14
14
|
|
|
15
15
|
var EXTENSIONS_FILE = /* @__PURE__ */ new Set([
|
|
16
16
|
// 📄 Text & Document
|
|
@@ -586,24 +586,24 @@ var SPECIAL_FILENAMES = /* @__PURE__ */ new Set([
|
|
|
586
586
|
]);
|
|
587
587
|
|
|
588
588
|
var extractFileName = (input, options = {}) => {
|
|
589
|
-
if (!
|
|
590
|
-
|
|
589
|
+
if (!chunkGKC3UDMC_cjs.isNonEmptyString(input)) return null;
|
|
590
|
+
chunkGKC3UDMC_cjs.assertIsPlainObject(options, {
|
|
591
591
|
message: ({ currentType, validType }) => `Second parameter (\`options\`) must be of type \`${validType}\`, but received: \`${currentType}\`.`
|
|
592
592
|
});
|
|
593
593
|
const { domainName, domainAware = false } = options;
|
|
594
|
-
|
|
594
|
+
chunkGKC3UDMC_cjs.assertIsBoolean(domainAware, {
|
|
595
595
|
message: ({ currentType, validType }) => `Parameter \`domainAware\` property of the \`options\` (second parameter) must be of type \`${validType}\`, but received: \`${currentType}\`.`
|
|
596
596
|
});
|
|
597
597
|
let pathname = input.trim();
|
|
598
598
|
pathname = pathname.replace(/\\/g, "/");
|
|
599
599
|
if (domainAware) {
|
|
600
|
-
if (!
|
|
600
|
+
if (!chunkGKC3UDMC_cjs.isNonEmptyString(domainName)) {
|
|
601
601
|
throw new TypeError(
|
|
602
602
|
`If parameter \`domainAware\` is set to \`true\`, the option parameter \`domainName\` is required as string, and cant be an empty-string.`
|
|
603
603
|
);
|
|
604
604
|
}
|
|
605
|
-
const cleanDomain =
|
|
606
|
-
const inputDomain =
|
|
605
|
+
const cleanDomain = chunkNYK5K3V2_cjs.punycodeUtilsJS.toASCII(domainName).replace(/^https?:\/\//i, "").replace(/^www\./, "").replace(/\/.*$/, "").toLowerCase();
|
|
606
|
+
const inputDomain = chunkNYK5K3V2_cjs.punycodeUtilsJS.toASCII(input).replace(/^https?:\/\//i, "").replace(/^www\./, "").toLowerCase();
|
|
607
607
|
const inputHost = inputDomain.split("/")[0].split(/[?#]/)[0];
|
|
608
608
|
const matchesDomain = inputHost === cleanDomain || inputHost.endsWith(`.${cleanDomain}`);
|
|
609
609
|
const hasPath = /\/[^/]+$/.test(inputDomain);
|
package/dist/chunk-BAV5T2E3.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 { isString, resolveErrorMessageAssertions } from './chunk-
|
|
10
|
+
import { isString, resolveErrorMessageAssertions } from './chunk-CSG4SCL3.js';
|
|
11
11
|
|
|
12
12
|
var assertIsString = (value, options = {}) => {
|
|
13
13
|
if (isString(value)) return;
|
|
@@ -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 { isServer } from './chunk-L5RDAVVH.js';
|
|
11
|
-
import { assertIsString } from './chunk-
|
|
12
|
-
import { isPlainObject, hasOwnProp, isNonEmptyString, isNumber } from './chunk-
|
|
11
|
+
import { assertIsString } from './chunk-BKIJBNIE.js';
|
|
12
|
+
import { isPlainObject, hasOwnProp, isNonEmptyString, isNumber } from './chunk-CSG4SCL3.js';
|
|
13
13
|
|
|
14
14
|
var disableUserInteraction = (className = "on_processing") => {
|
|
15
15
|
if (isServer()) return;
|
|
@@ -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 { punycodeUtilsJS } from './chunk-
|
|
11
|
-
import { safeStableStringify } from './chunk-
|
|
12
|
-
import { isString, assertIsPlainObject, isBoolean, getPreciseType } from './chunk-
|
|
10
|
+
import { punycodeUtilsJS } from './chunk-44XX2P34.js';
|
|
11
|
+
import { safeStableStringify } from './chunk-6VUXD3CF.js';
|
|
12
|
+
import { isString, assertIsPlainObject, isBoolean, getPreciseType } from './chunk-CSG4SCL3.js';
|
|
13
13
|
|
|
14
14
|
var sldMap_default = {
|
|
15
15
|
"com.ac": true,
|
|
@@ -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
|
-
import { isFinite } from './chunk-
|
|
11
|
-
import { isEmptyArray } from './chunk-
|
|
10
|
+
import { isFinite } from './chunk-NODTV4F3.js';
|
|
11
|
+
import { isEmptyArray } from './chunk-SDMPEJ4F.js';
|
|
12
12
|
import { isBigInt } from './chunk-QNKGP5DY.js';
|
|
13
|
-
import { isNil, isArray, assertIsPlainObject, hasOwnProp, assertIsBoolean, isString, isBoolean, isNull } from './chunk-
|
|
13
|
+
import { isNil, isArray, assertIsPlainObject, hasOwnProp, assertIsBoolean, isString, isBoolean, isNull } from './chunk-CSG4SCL3.js';
|
|
14
14
|
|
|
15
15
|
function filterNilArray(input) {
|
|
16
16
|
if (isNil(input)) return void 0;
|
|
@@ -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
|
* ====================================================
|
|
@@ -894,10 +894,13 @@ var PreciseType = class _PreciseType {
|
|
|
894
894
|
* @internal
|
|
895
895
|
*/
|
|
896
896
|
static FIXES_CASTABLE_TABLE = Object.freeze(
|
|
897
|
-
Object.entries(_PreciseType.FIXES_RAW).reduce(
|
|
898
|
-
acc[
|
|
899
|
-
|
|
900
|
-
|
|
897
|
+
Object.entries(_PreciseType.FIXES_RAW).reduce(
|
|
898
|
+
(acc, [k, v]) => {
|
|
899
|
+
acc[_PreciseType.normalizeKeyForCase(k)] = v;
|
|
900
|
+
return acc;
|
|
901
|
+
},
|
|
902
|
+
{}
|
|
903
|
+
)
|
|
901
904
|
);
|
|
902
905
|
/** @internal */
|
|
903
906
|
formatCase = "toKebabCase";
|
|
@@ -1131,10 +1134,7 @@ var PreciseType = class _PreciseType {
|
|
|
1131
1134
|
if (key) {
|
|
1132
1135
|
return this.converter(
|
|
1133
1136
|
_PreciseType.FIXES_CASTABLE_TABLE[_PreciseType.normalizeKeyForCase(key)] ?? key,
|
|
1134
|
-
{
|
|
1135
|
-
formatCase,
|
|
1136
|
-
useAcronyms
|
|
1137
|
-
}
|
|
1137
|
+
{ formatCase, useAcronyms }
|
|
1138
1138
|
);
|
|
1139
1139
|
}
|
|
1140
1140
|
return this.converter(
|
|
@@ -1250,10 +1250,7 @@ var PreciseType = class _PreciseType {
|
|
|
1250
1250
|
];
|
|
1251
1251
|
if (skipTags.includes(tag)) return false;
|
|
1252
1252
|
try {
|
|
1253
|
-
Reflect.defineProperty(value, "__proxy_detect__", {
|
|
1254
|
-
configurable: true,
|
|
1255
|
-
value: 1
|
|
1256
|
-
});
|
|
1253
|
+
Reflect.defineProperty(value, "__proxy_detect__", { configurable: true, value: 1 });
|
|
1257
1254
|
Reflect.deleteProperty(value, "__proxy_detect__");
|
|
1258
1255
|
return false;
|
|
1259
1256
|
} catch {
|