@rzl-zone/utils-js 3.5.2 → 3.5.4
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 +1 -1
- package/dist/assertions/index.js +5 -5
- package/dist/{chunk-RZW35UN5.cjs → chunk-2CQI36UD.cjs} +6 -6
- package/dist/{chunk-CDCERIZ2.js → chunk-2RZGZEE2.js} +3 -3
- package/dist/{chunk-PET42Z7W.js → chunk-2VO2CBTU.js} +2 -2
- package/dist/{chunk-CMW2TBOQ.js → chunk-3KTD3QDI.js} +2 -7
- package/dist/{chunk-XEDXFSGI.js → chunk-4ACKNPL5.js} +2 -2
- package/dist/{chunk-SIM77PU4.js → chunk-4ZOXSUXB.js} +3 -3
- package/dist/{chunk-IVL7CKVH.cjs → chunk-5NN4ZDE2.cjs} +6 -6
- package/dist/{chunk-FJZGG54N.cjs → chunk-66WLOZOD.cjs} +50 -50
- package/dist/{chunk-SBFNXGTJ.js → chunk-6DSPJA5U.js} +9 -9
- package/dist/{chunk-D3ENH7H6.cjs → chunk-6RFNZ2ZZ.cjs} +14 -14
- package/dist/{chunk-CKTLUNWX.js → chunk-6WMB5AJR.js} +2 -2
- package/dist/{chunk-JBQMXC5I.cjs → chunk-7QQV66RX.cjs} +10 -10
- package/dist/{chunk-6JFZL7YE.cjs → chunk-7WBMA2VE.cjs} +4 -4
- package/dist/{chunk-3IBQ5MOM.js → chunk-7ZNEUWYP.js} +2 -2
- package/dist/{chunk-JEQEF5WD.js → chunk-A3YI6Y2P.js} +3 -3
- package/dist/{chunk-DEZZUYE2.js → chunk-ABA2ZSBQ.js} +3 -3
- package/dist/{chunk-NRF6LWBC.cjs → chunk-AKKM6MOX.cjs} +15 -15
- package/dist/{chunk-ZETAZZLD.cjs → chunk-ATLFMKAF.cjs} +7 -7
- package/dist/{chunk-V45XJKHW.cjs → chunk-B4SDEBN7.cjs} +3 -3
- package/dist/{chunk-2IOOEY45.cjs → chunk-B6UIKBHR.cjs} +4 -4
- package/dist/chunk-BAV5T2E3.cjs +1 -1
- package/dist/{chunk-E74U6CYP.cjs → chunk-BYUT376O.cjs} +3 -3
- package/dist/{chunk-OYTYSY7G.js → chunk-D53CE4BT.js} +7 -7
- package/dist/{chunk-IRFL4MAX.js → chunk-DPLL67OT.js} +2 -2
- package/dist/chunk-DVMHRLKP.cjs +1 -1
- package/dist/{chunk-5KJFVIQT.cjs → chunk-EK7FSI7F.cjs} +3 -3
- package/dist/{chunk-PZQ6I4JJ.cjs → chunk-F3WBQKRI.cjs} +1 -8
- package/dist/{chunk-SBKGWRS5.js → chunk-FI76UZRF.js} +2 -2
- package/dist/{chunk-IZPBKKPO.js → chunk-GAJBF6DR.js} +2 -2
- package/dist/{chunk-DWF2R5GD.cjs → chunk-H5NWBTHW.cjs} +61 -61
- package/dist/{chunk-W2WNBUDE.js → chunk-JY4HLZ4W.js} +2 -2
- package/dist/{chunk-5757UBXJ.cjs → chunk-K3SONK25.cjs} +24 -24
- package/dist/{chunk-HYRQMTRH.cjs → chunk-K63WO3XA.cjs} +4 -4
- package/dist/chunk-KHO2SBNA.cjs +1 -1
- package/dist/{chunk-RIPKY4RU.js → chunk-KPCDDYTZ.js} +2 -2
- package/dist/{chunk-F6IPNNSJ.cjs → chunk-KTQLDIIT.cjs} +161 -161
- package/dist/chunk-L5RDAVVH.js +1 -1
- package/dist/{chunk-GGEADHZO.js → chunk-LBNOZIZ6.js} +5 -5
- package/dist/{chunk-3VA554KW.js → chunk-LEX4TQW2.js} +2 -2
- package/dist/{chunk-KVAL5PAG.cjs → chunk-LIU4S3JA.cjs} +4 -4
- package/dist/{chunk-2WA36TC5.cjs → chunk-ME7Q2M5I.cjs} +22 -22
- package/dist/{chunk-E55EQK2U.cjs → chunk-NREACG6M.cjs} +3 -3
- package/dist/{chunk-T2T7K3KR.js → chunk-OFBFGFVH.js} +2 -2
- package/dist/chunk-ONZFBJVW.js +1 -1
- package/dist/{chunk-XABCB3Y7.cjs → chunk-OS5OT5JA.cjs} +126 -126
- package/dist/{chunk-GQR4R5WY.js → chunk-PZQC3FZY.js} +4 -4
- package/dist/{chunk-FWHNWL2P.cjs → chunk-QAPYHLHC.cjs} +3 -3
- package/dist/chunk-QNKGP5DY.js +1 -1
- package/dist/{chunk-YKPSRP5G.js → chunk-QUITZ3GP.js} +8 -8
- package/dist/{chunk-7ODAAXX5.cjs → chunk-RIEYB2AW.cjs} +71 -71
- package/dist/{chunk-LS6U7FAY.cjs → chunk-RMJC3B5P.cjs} +26 -26
- package/dist/{chunk-JMJQCN74.js → chunk-SN6YRDLG.js} +9 -9
- package/dist/{chunk-NBZWMBO6.js → chunk-SZJ7OI4S.js} +3 -3
- package/dist/{chunk-FWCKOJZM.js → chunk-TDPYR5JY.js} +10 -10
- package/dist/{chunk-OI5XKNZO.js → chunk-TDYGYHSH.js} +4 -4
- package/dist/{chunk-CAH33WOQ.cjs → chunk-TFDXRT6D.cjs} +3 -3
- package/dist/chunk-UDA26MCU.cjs +1 -1
- package/dist/{chunk-HQWOFR56.cjs → chunk-UKAUXY2U.cjs} +12 -12
- package/dist/{chunk-H66AC7GK.cjs → chunk-URDI3IMY.cjs} +19 -19
- package/dist/{chunk-6JFCSH7J.js → chunk-VCVND6CH.js} +2 -2
- package/dist/chunk-VJDDGRIK.cjs +1 -1
- package/dist/{chunk-QBKAEVYG.js → chunk-VNADVWSJ.js} +3 -3
- package/dist/chunk-WVSPXFTY.js +1 -1
- package/dist/{chunk-2CQX5CBG.js → chunk-XFTUHS4Y.js} +4 -4
- package/dist/{chunk-T7PU2V7X.cjs → chunk-YC7AK3KX.cjs} +31 -31
- package/dist/{chunk-EL6A35UR.cjs → chunk-YGB2BQPB.cjs} +8 -8
- package/dist/chunk-YWHHVDT4.js +1 -1
- package/dist/{chunk-5IGC6PBH.js → chunk-ZN53RM3R.js} +2 -2
- 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 +8 -8
- package/dist/generators/index.d.ts +1 -1
- package/dist/generators/index.js +4 -4
- package/dist/index.d.ts +1 -14
- package/dist/isPlainObject-FWmcJF6k.d.ts +1 -1
- package/dist/next/index.cjs +35 -35
- package/dist/next/index.d.ts +1 -1
- package/dist/next/index.js +7 -7
- 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 +4 -4
- package/dist/parsers/index.d.ts +1 -1
- package/dist/parsers/index.js +3 -3
- package/dist/predicates/index.cjs +74 -82
- package/dist/predicates/index.d.ts +2 -23
- package/dist/predicates/index.js +12 -12
- 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 -17
- 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 +11 -11
- package/dist/tailwind/index.d.ts +1 -1
- package/dist/tailwind/index.js +4 -4
- package/dist/urls/index.cjs +19 -19
- package/dist/urls/index.d.ts +1 -1
- package/dist/urls/index.js +13 -13
- package/package.json +50 -1
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
* ====================================================
|
|
3
3
|
* Rzl Utils-JS.
|
|
4
4
|
* ----------------------------------------------------
|
|
5
|
-
* Version: 3.5.
|
|
5
|
+
* Version: 3.5.4.
|
|
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 chunkYC7AK3KX_cjs = require('./chunk-YC7AK3KX.cjs');
|
|
13
|
+
var chunkF3WBQKRI_cjs = require('./chunk-F3WBQKRI.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 (!chunkF3WBQKRI_cjs.isObjectOrArray(value) || !chunkF3WBQKRI_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 (!chunkF3WBQKRI_cjs.isUndefined(result)) return result;
|
|
35
35
|
}
|
|
36
36
|
return baseDeepEqual(v, o, customizer, seen);
|
|
37
37
|
};
|
|
38
|
-
if (
|
|
38
|
+
if (chunkYC7AK3KX_cjs.isDate(value) && chunkYC7AK3KX_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 (chunkF3WBQKRI_cjs.isError(value) && chunkF3WBQKRI_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 (chunkYC7AK3KX_cjs.isMap(value) && chunkYC7AK3KX_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 (chunkF3WBQKRI_cjs.isSet(value) && chunkF3WBQKRI_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 (chunkF3WBQKRI_cjs.isArray(value) && chunkF3WBQKRI_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,18 +2,18 @@
|
|
|
2
2
|
* ====================================================
|
|
3
3
|
* Rzl Utils-JS.
|
|
4
4
|
* ----------------------------------------------------
|
|
5
|
-
* Version: 3.5.
|
|
5
|
+
* Version: 3.5.4.
|
|
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 chunkF3WBQKRI_cjs = require('./chunk-F3WBQKRI.cjs');
|
|
13
13
|
|
|
14
14
|
function assertIsArray(value, options) {
|
|
15
|
-
if (
|
|
16
|
-
const errorMessage =
|
|
15
|
+
if (chunkF3WBQKRI_cjs.isArray(value)) return;
|
|
16
|
+
const errorMessage = chunkF3WBQKRI_cjs.resolveErrorMessageAssertions({
|
|
17
17
|
value,
|
|
18
18
|
options,
|
|
19
19
|
requiredValidType: "array"
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
* ====================================================
|
|
3
3
|
* Rzl Utils-JS.
|
|
4
4
|
* ----------------------------------------------------
|
|
5
|
-
* Version: 3.5.
|
|
5
|
+
* Version: 3.5.4.
|
|
6
6
|
* Author: Rizalvin Dwiky.
|
|
7
7
|
* Repository: https://github.com/rzl-zone/utils-js.
|
|
8
8
|
* ====================================================
|
|
9
9
|
*/
|
|
10
|
-
import { isNumber } from './chunk-
|
|
10
|
+
import { isNumber } from './chunk-3KTD3QDI.js';
|
|
11
11
|
|
|
12
12
|
function isFinite(value) {
|
|
13
13
|
return isNumber(value) && Number.isFinite(value);
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
* ====================================================
|
|
3
3
|
* Rzl Utils-JS.
|
|
4
4
|
* ----------------------------------------------------
|
|
5
|
-
* Version: 3.5.
|
|
5
|
+
* Version: 3.5.4.
|
|
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 { isNonEmptyString, isPlainObject, isString, isNumber, getPreciseType } from './chunk-
|
|
10
|
+
import { isEmptyString } from './chunk-JY4HLZ4W.js';
|
|
11
|
+
import { isNonEmptyString, isPlainObject, isString, isNumber, getPreciseType } from './chunk-3KTD3QDI.js';
|
|
12
12
|
|
|
13
13
|
var capitalizeFirst = (string, options = {
|
|
14
14
|
lowerCaseNextRest: true,
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
* ====================================================
|
|
3
3
|
* Rzl Utils-JS.
|
|
4
4
|
* ----------------------------------------------------
|
|
5
|
-
* Version: 3.5.
|
|
5
|
+
* Version: 3.5.4.
|
|
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 } from './chunk-
|
|
11
|
+
import { safeStableStringify } from './chunk-2VO2CBTU.js';
|
|
12
|
+
import { isNonEmptyArray, getPreciseType, isNumber, isPlainObject, assertIsBoolean, isNaN } from './chunk-3KTD3QDI.js';
|
|
13
13
|
|
|
14
14
|
function getRandomItem(array) {
|
|
15
15
|
if (!isNonEmptyArray(array)) return void 0;
|
|
@@ -2,26 +2,26 @@
|
|
|
2
2
|
* ====================================================
|
|
3
3
|
* Rzl Utils-JS.
|
|
4
4
|
* ----------------------------------------------------
|
|
5
|
-
* Version: 3.5.
|
|
5
|
+
* Version: 3.5.4.
|
|
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 chunkB4SDEBN7_cjs = require('./chunk-B4SDEBN7.cjs');
|
|
13
|
+
var chunkATLFMKAF_cjs = require('./chunk-ATLFMKAF.cjs');
|
|
14
14
|
var chunkUDA26MCU_cjs = require('./chunk-UDA26MCU.cjs');
|
|
15
|
-
var
|
|
15
|
+
var chunkF3WBQKRI_cjs = require('./chunk-F3WBQKRI.cjs');
|
|
16
16
|
|
|
17
17
|
function filterNilArray(input) {
|
|
18
|
-
if (
|
|
19
|
-
if (!
|
|
18
|
+
if (chunkF3WBQKRI_cjs.isNil(input)) return void 0;
|
|
19
|
+
if (!chunkF3WBQKRI_cjs.isArray(input)) return [];
|
|
20
20
|
const filtered = input.reduce((output, element) => {
|
|
21
|
-
if (!
|
|
22
|
-
if (
|
|
21
|
+
if (!chunkF3WBQKRI_cjs.isNil(element)) {
|
|
22
|
+
if (chunkF3WBQKRI_cjs.isArray(element)) {
|
|
23
23
|
const cleanedNested = filterNilArray(element);
|
|
24
|
-
if (cleanedNested && !
|
|
24
|
+
if (cleanedNested && !chunkATLFMKAF_cjs.isEmptyArray(cleanedNested)) {
|
|
25
25
|
output.push(cleanedNested);
|
|
26
26
|
}
|
|
27
27
|
} else {
|
|
@@ -34,17 +34,17 @@ function filterNilArray(input) {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
function toStringArrayUnRecursive(array, options = {}) {
|
|
37
|
-
|
|
37
|
+
chunkF3WBQKRI_cjs.assertIsPlainObject(options, {
|
|
38
38
|
message: ({ currentType, validType }) => `Second parameter (\`options\`) must be of type \`${validType}\`, but received: \`${currentType}\`.`
|
|
39
39
|
});
|
|
40
|
-
const riv =
|
|
41
|
-
|
|
40
|
+
const riv = chunkF3WBQKRI_cjs.hasOwnProp(options, "removeInvalidValue") ? options.removeInvalidValue : true;
|
|
41
|
+
chunkF3WBQKRI_cjs.assertIsBoolean(riv, {
|
|
42
42
|
message: ({ currentType, validType }) => `Parameter \`removeInvalidValue\` property of the \`options\` (second parameter) must be of type \`${validType}\`, but received: \`${currentType}\`.`
|
|
43
43
|
});
|
|
44
|
-
if (
|
|
44
|
+
if (chunkF3WBQKRI_cjs.isArray(array)) {
|
|
45
45
|
const result = Array.from(array, (x) => {
|
|
46
|
-
if (
|
|
47
|
-
return
|
|
46
|
+
if (chunkF3WBQKRI_cjs.isString(x) || chunkB4SDEBN7_cjs.isFinite(x) || chunkF3WBQKRI_cjs.isBoolean(x) || chunkUDA26MCU_cjs.isBigInt(x)) return String(x);
|
|
47
|
+
return chunkF3WBQKRI_cjs.isNull(x) ? null : void 0;
|
|
48
48
|
});
|
|
49
49
|
if (riv) return filterNilArray(result);
|
|
50
50
|
return result;
|
|
@@ -2,29 +2,29 @@
|
|
|
2
2
|
* ====================================================
|
|
3
3
|
* Rzl Utils-JS.
|
|
4
4
|
* ----------------------------------------------------
|
|
5
|
-
* Version: 3.5.
|
|
5
|
+
* Version: 3.5.4.
|
|
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 chunkF3WBQKRI_cjs = require('./chunk-F3WBQKRI.cjs');
|
|
13
13
|
|
|
14
14
|
var isEmptyArray = (value) => {
|
|
15
|
-
if (!
|
|
15
|
+
if (!chunkF3WBQKRI_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 (!chunkF3WBQKRI_cjs.isObject(value)) {
|
|
21
21
|
return true;
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
chunkF3WBQKRI_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 = chunkF3WBQKRI_cjs.hasOwnProp(options, "checkSymbols") ? options.checkSymbols : false;
|
|
27
|
+
chunkF3WBQKRI_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;
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
* ====================================================
|
|
3
3
|
* Rzl Utils-JS.
|
|
4
4
|
* ----------------------------------------------------
|
|
5
|
-
* Version: 3.5.
|
|
5
|
+
* Version: 3.5.4.
|
|
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 chunkF3WBQKRI_cjs = require('./chunk-F3WBQKRI.cjs');
|
|
13
13
|
|
|
14
14
|
function isFinite(value) {
|
|
15
|
-
return
|
|
15
|
+
return chunkF3WBQKRI_cjs.isNumber(value) && Number.isFinite(value);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
exports.isFinite = isFinite;
|
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
* ====================================================
|
|
3
3
|
* Rzl Utils-JS.
|
|
4
4
|
* ----------------------------------------------------
|
|
5
|
-
* Version: 3.5.
|
|
5
|
+
* Version: 3.5.4.
|
|
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 chunkF3WBQKRI_cjs = require('./chunk-F3WBQKRI.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 (!chunkF3WBQKRI_cjs.isNonEmptyString(value)) return "";
|
|
19
|
+
if (!chunkF3WBQKRI_cjs.isPlainObject(options)) {
|
|
20
20
|
options = {};
|
|
21
21
|
}
|
|
22
22
|
const { trimOnly = false, withTrim = true } = options;
|
package/dist/chunk-BAV5T2E3.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* ====================================================
|
|
3
3
|
* Rzl Utils-JS.
|
|
4
4
|
* ----------------------------------------------------
|
|
5
|
-
* Version: 3.5.
|
|
5
|
+
* Version: 3.5.4.
|
|
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.5.
|
|
5
|
+
* Version: 3.5.4.
|
|
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 chunkF3WBQKRI_cjs = require('./chunk-F3WBQKRI.cjs');
|
|
13
13
|
|
|
14
14
|
var normalizeString = (input) => {
|
|
15
|
-
return
|
|
15
|
+
return chunkF3WBQKRI_cjs.isNonEmptyString(input) ? input.trim() : "";
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
exports.normalizeString = normalizeString;
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
* ====================================================
|
|
3
3
|
* Rzl Utils-JS.
|
|
4
4
|
* ----------------------------------------------------
|
|
5
|
-
* Version: 3.5.
|
|
5
|
+
* Version: 3.5.4.
|
|
6
6
|
* Author: Rizalvin Dwiky.
|
|
7
7
|
* Repository: https://github.com/rzl-zone/utils-js.
|
|
8
8
|
* ====================================================
|
|
9
9
|
*/
|
|
10
|
-
import { safeJsonParse } from './chunk-
|
|
11
|
-
import { isEqual } from './chunk-
|
|
12
|
-
import { isEmptyArray } from './chunk-
|
|
13
|
-
import { assertIsArray } from './chunk-
|
|
14
|
-
import { safeStableStringify } from './chunk-
|
|
15
|
-
import { isPlainObject, isNonEmptyArray, isObjectOrArray, isArray, isNaN, isUndefined } from './chunk-
|
|
10
|
+
import { safeJsonParse } from './chunk-XFTUHS4Y.js';
|
|
11
|
+
import { isEqual } from './chunk-SZJ7OI4S.js';
|
|
12
|
+
import { isEmptyArray } from './chunk-VCVND6CH.js';
|
|
13
|
+
import { assertIsArray } from './chunk-6WMB5AJR.js';
|
|
14
|
+
import { safeStableStringify } from './chunk-2VO2CBTU.js';
|
|
15
|
+
import { isPlainObject, isNonEmptyArray, isObjectOrArray, isArray, isNaN, isUndefined } from './chunk-3KTD3QDI.js';
|
|
16
16
|
|
|
17
17
|
var findDuplicates = (values) => {
|
|
18
18
|
assertIsArray(values, {
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
* ====================================================
|
|
3
3
|
* Rzl Utils-JS.
|
|
4
4
|
* ----------------------------------------------------
|
|
5
|
-
* Version: 3.5.
|
|
5
|
+
* Version: 3.5.4.
|
|
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-3KTD3QDI.js';
|
|
11
11
|
|
|
12
12
|
var parseCurrencyString = (input) => {
|
|
13
13
|
if (!isNonEmptyString(input)) return 0;
|
package/dist/chunk-DVMHRLKP.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* ====================================================
|
|
3
3
|
* Rzl Utils-JS.
|
|
4
4
|
* ----------------------------------------------------
|
|
5
|
-
* Version: 3.5.
|
|
5
|
+
* Version: 3.5.4.
|
|
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.5.
|
|
5
|
+
* Version: 3.5.4.
|
|
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 chunkF3WBQKRI_cjs = require('./chunk-F3WBQKRI.cjs');
|
|
13
13
|
|
|
14
14
|
var parseCurrencyString = (input) => {
|
|
15
|
-
if (!
|
|
15
|
+
if (!chunkF3WBQKRI_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.
|
|
5
|
+
* Version: 3.5.4.
|
|
6
6
|
* Author: Rizalvin Dwiky.
|
|
7
7
|
* Repository: https://github.com/rzl-zone/utils-js.
|
|
8
8
|
* ====================================================
|
|
@@ -540,11 +540,6 @@ var getPreciseType = (value, options = { formatCase: "toLowerCase" }) => {
|
|
|
540
540
|
}
|
|
541
541
|
return converterHelper(tag, formatCase);
|
|
542
542
|
};
|
|
543
|
-
|
|
544
|
-
Object.values({
|
|
545
|
-
...FIXES_RAW,
|
|
546
|
-
plainobject: "Plain Object"
|
|
547
|
-
});
|
|
548
543
|
function resolveErrorMessageAssertions(params) {
|
|
549
544
|
const { requiredValidType, value, options } = params || {};
|
|
550
545
|
const { message, formatCase } = isPlainObject(options) ? options : {};
|
|
@@ -566,8 +561,6 @@ function assertIsPlainObject(value, options = {}) {
|
|
|
566
561
|
throw new TypeError(errorMessage);
|
|
567
562
|
}
|
|
568
563
|
|
|
569
|
-
exports.FIXES_RAW = FIXES_RAW;
|
|
570
|
-
exports.__internalAcronyms__ = __internalAcronyms__;
|
|
571
564
|
exports.assertIsBoolean = assertIsBoolean;
|
|
572
565
|
exports.assertIsPlainObject = assertIsPlainObject;
|
|
573
566
|
exports.getPreciseType = getPreciseType;
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
* ====================================================
|
|
3
3
|
* Rzl Utils-JS.
|
|
4
4
|
* ----------------------------------------------------
|
|
5
|
-
* Version: 3.5.
|
|
5
|
+
* Version: 3.5.4.
|
|
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-3KTD3QDI.js';
|
|
11
11
|
|
|
12
12
|
var assertIsString = (value, options = {}) => {
|
|
13
13
|
if (isString(value)) return;
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
* ====================================================
|
|
3
3
|
* Rzl Utils-JS.
|
|
4
4
|
* ----------------------------------------------------
|
|
5
|
-
* Version: 3.5.
|
|
5
|
+
* Version: 3.5.4.
|
|
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-3KTD3QDI.js';
|
|
11
11
|
|
|
12
12
|
var normalizeString = (input) => {
|
|
13
13
|
return isNonEmptyString(input) ? input.trim() : "";
|