@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,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
|
|
12
|
+
var chunkKOLEURVT_cjs = require('./chunk-KOLEURVT.cjs');
|
|
13
13
|
var chunkBAV5T2E3_cjs = require('./chunk-BAV5T2E3.cjs');
|
|
14
|
-
var
|
|
15
|
-
var
|
|
14
|
+
var chunkTQPGXGKB_cjs = require('./chunk-TQPGXGKB.cjs');
|
|
15
|
+
var chunkGKC3UDMC_cjs = require('./chunk-GKC3UDMC.cjs');
|
|
16
16
|
|
|
17
17
|
var parseCustomDate = (dateString, format) => {
|
|
18
|
-
if (!
|
|
18
|
+
if (!chunkGKC3UDMC_cjs.isNonEmptyString(dateString) || !chunkGKC3UDMC_cjs.isNonEmptyString(format)) {
|
|
19
19
|
throw new TypeError(
|
|
20
|
-
`Parameter \`dateString\` and \`format\` must be of type \`string\` and not empty-string, but received: "['dateString': \`${
|
|
20
|
+
`Parameter \`dateString\` and \`format\` must be of type \`string\` and not empty-string, but received: "['dateString': \`${chunkGKC3UDMC_cjs.getPreciseType(
|
|
21
21
|
dateString
|
|
22
|
-
)}\` - (current value: \`${
|
|
22
|
+
)}\` - (current value: \`${chunkTQPGXGKB_cjs.safeStableStringify(dateString, {
|
|
23
23
|
keepUndefined: true
|
|
24
|
-
})}\`), 'format': \`${
|
|
24
|
+
})}\`), 'format': \`${chunkGKC3UDMC_cjs.getPreciseType(
|
|
25
25
|
format
|
|
26
|
-
)}\` - (current value: \`${
|
|
26
|
+
)}\` - (current value: \`${chunkTQPGXGKB_cjs.safeStableStringify(format, {
|
|
27
27
|
keepUndefined: true
|
|
28
28
|
})}\`)]".`
|
|
29
29
|
);
|
|
@@ -47,45 +47,45 @@ var parseCustomDate = (dateString, format) => {
|
|
|
47
47
|
};
|
|
48
48
|
|
|
49
49
|
var validateJsonParsingOptions = (optionsValue = {}) => {
|
|
50
|
-
|
|
50
|
+
chunkGKC3UDMC_cjs.assertIsPlainObject(optionsValue, {
|
|
51
51
|
message: ({ currentType, validType }) => `Second parameter (\`options\`) must be of type \`${validType}\`, but received: \`${currentType}\`.`
|
|
52
52
|
});
|
|
53
|
-
const convertBooleans =
|
|
54
|
-
const convertDates =
|
|
55
|
-
const convertNumbers =
|
|
56
|
-
const loggingOnFail =
|
|
57
|
-
const removeEmptyArrays =
|
|
58
|
-
const removeEmptyObjects =
|
|
59
|
-
const removeNulls =
|
|
60
|
-
const removeUndefined =
|
|
61
|
-
const strictMode =
|
|
62
|
-
const checkSymbols =
|
|
63
|
-
const convertNaN =
|
|
64
|
-
const customDateFormats =
|
|
65
|
-
const onError =
|
|
66
|
-
if (!(
|
|
53
|
+
const convertBooleans = chunkGKC3UDMC_cjs.hasOwnProp(optionsValue, "convertBooleans") ? optionsValue.convertBooleans : false;
|
|
54
|
+
const convertDates = chunkGKC3UDMC_cjs.hasOwnProp(optionsValue, "convertDates") ? optionsValue.convertDates : false;
|
|
55
|
+
const convertNumbers = chunkGKC3UDMC_cjs.hasOwnProp(optionsValue, "convertNumbers") ? optionsValue.convertNumbers : false;
|
|
56
|
+
const loggingOnFail = chunkGKC3UDMC_cjs.hasOwnProp(optionsValue, "loggingOnFail") ? optionsValue.loggingOnFail : false;
|
|
57
|
+
const removeEmptyArrays = chunkGKC3UDMC_cjs.hasOwnProp(optionsValue, "removeEmptyArrays") ? optionsValue.removeEmptyArrays : false;
|
|
58
|
+
const removeEmptyObjects = chunkGKC3UDMC_cjs.hasOwnProp(optionsValue, "removeEmptyObjects") ? optionsValue.removeEmptyObjects : false;
|
|
59
|
+
const removeNulls = chunkGKC3UDMC_cjs.hasOwnProp(optionsValue, "removeNulls") ? optionsValue.removeNulls : false;
|
|
60
|
+
const removeUndefined = chunkGKC3UDMC_cjs.hasOwnProp(optionsValue, "removeUndefined") ? optionsValue.removeUndefined : false;
|
|
61
|
+
const strictMode = chunkGKC3UDMC_cjs.hasOwnProp(optionsValue, "strictMode") ? optionsValue.strictMode : false;
|
|
62
|
+
const checkSymbols = chunkGKC3UDMC_cjs.hasOwnProp(optionsValue, "checkSymbols") ? optionsValue.checkSymbols : false;
|
|
63
|
+
const convertNaN = chunkGKC3UDMC_cjs.hasOwnProp(optionsValue, "convertNaN") ? optionsValue.convertNaN : false;
|
|
64
|
+
const customDateFormats = chunkGKC3UDMC_cjs.hasOwnProp(optionsValue, "customDateFormats") ? optionsValue.customDateFormats : [];
|
|
65
|
+
const onError = chunkGKC3UDMC_cjs.hasOwnProp(optionsValue, "onError") ? optionsValue.onError : chunkBAV5T2E3_cjs.noop;
|
|
66
|
+
if (!(chunkGKC3UDMC_cjs.isBoolean(convertBooleans) && chunkGKC3UDMC_cjs.isBoolean(convertDates) && chunkGKC3UDMC_cjs.isBoolean(convertNumbers) && chunkGKC3UDMC_cjs.isBoolean(convertNaN) && chunkGKC3UDMC_cjs.isBoolean(checkSymbols) && chunkGKC3UDMC_cjs.isBoolean(loggingOnFail) && chunkGKC3UDMC_cjs.isBoolean(removeEmptyArrays) && chunkGKC3UDMC_cjs.isBoolean(removeEmptyObjects) && chunkGKC3UDMC_cjs.isBoolean(removeNulls) && chunkGKC3UDMC_cjs.isBoolean(removeUndefined) && chunkGKC3UDMC_cjs.isBoolean(strictMode) && chunkGKC3UDMC_cjs.isArray(customDateFormats) && chunkGKC3UDMC_cjs.isFunction(onError))) {
|
|
67
67
|
throw new TypeError(
|
|
68
|
-
`Invalid \`options\` parameter (second argument): \`convertBooleans\`, \`convertDates\`, \`convertNumbers\`, \`loggingOnFail\`, \`removeEmptyArrays\`, \`removeEmptyObjects\`, \`removeNulls\`, \`removeUndefined\`, \`strictMode\` expected to be a \`boolean\` type, \`customDateFormats\` expected to be a \`array\` type and \`onError\` expected to be a \`void function\` type. But received: ['convertBooleans': \`${
|
|
68
|
+
`Invalid \`options\` parameter (second argument): \`convertBooleans\`, \`convertDates\`, \`convertNumbers\`, \`loggingOnFail\`, \`removeEmptyArrays\`, \`removeEmptyObjects\`, \`removeNulls\`, \`removeUndefined\`, \`strictMode\` expected to be a \`boolean\` type, \`customDateFormats\` expected to be a \`array\` type and \`onError\` expected to be a \`void function\` type. But received: ['convertBooleans': \`${chunkGKC3UDMC_cjs.getPreciseType(
|
|
69
69
|
convertBooleans
|
|
70
|
-
)}\`, 'convertDates': \`${
|
|
70
|
+
)}\`, 'convertDates': \`${chunkGKC3UDMC_cjs.getPreciseType(
|
|
71
71
|
convertDates
|
|
72
|
-
)}\`, 'convertNumbers': \`${
|
|
72
|
+
)}\`, 'convertNumbers': \`${chunkGKC3UDMC_cjs.getPreciseType(
|
|
73
73
|
convertNumbers
|
|
74
|
-
)}\`, 'loggingOnFail': \`${
|
|
74
|
+
)}\`, 'loggingOnFail': \`${chunkGKC3UDMC_cjs.getPreciseType(
|
|
75
75
|
loggingOnFail
|
|
76
|
-
)}\`, 'removeEmptyArrays': \`${
|
|
76
|
+
)}\`, 'removeEmptyArrays': \`${chunkGKC3UDMC_cjs.getPreciseType(
|
|
77
77
|
removeEmptyArrays
|
|
78
|
-
)}\`, 'removeEmptyObjects': \`${
|
|
78
|
+
)}\`, 'removeEmptyObjects': \`${chunkGKC3UDMC_cjs.getPreciseType(
|
|
79
79
|
removeEmptyObjects
|
|
80
|
-
)}\`, 'removeNulls': \`${
|
|
80
|
+
)}\`, 'removeNulls': \`${chunkGKC3UDMC_cjs.getPreciseType(
|
|
81
81
|
removeNulls
|
|
82
|
-
)}\`, 'removeUndefined': \`${
|
|
82
|
+
)}\`, 'removeUndefined': \`${chunkGKC3UDMC_cjs.getPreciseType(
|
|
83
83
|
removeUndefined
|
|
84
|
-
)}\`, 'strictMode': \`${
|
|
84
|
+
)}\`, 'strictMode': \`${chunkGKC3UDMC_cjs.getPreciseType(
|
|
85
85
|
strictMode
|
|
86
|
-
)}\`, 'customDateFormats': \`${
|
|
86
|
+
)}\`, 'customDateFormats': \`${chunkGKC3UDMC_cjs.getPreciseType(
|
|
87
87
|
customDateFormats
|
|
88
|
-
)}\`, 'onError': \`${
|
|
88
|
+
)}\`, 'onError': \`${chunkGKC3UDMC_cjs.getPreciseType(onError)}\`].`
|
|
89
89
|
);
|
|
90
90
|
}
|
|
91
91
|
return {
|
|
@@ -107,9 +107,9 @@ var validateJsonParsingOptions = (optionsValue = {}) => {
|
|
|
107
107
|
|
|
108
108
|
var cleanParsedData = (data, options = {}) => {
|
|
109
109
|
const validOptions = validateJsonParsingOptions(options);
|
|
110
|
-
if (
|
|
111
|
-
if (
|
|
112
|
-
if (
|
|
110
|
+
if (chunkGKC3UDMC_cjs.isNull(data)) return validOptions.removeNulls ? void 0 : null;
|
|
111
|
+
if (chunkGKC3UDMC_cjs.isUndefined(data)) return validOptions.removeUndefined ? void 0 : void 0;
|
|
112
|
+
if (chunkGKC3UDMC_cjs.isString(data)) {
|
|
113
113
|
const trimmed = data.trim();
|
|
114
114
|
if (validOptions.convertNaN && trimmed === "NaN") return NaN;
|
|
115
115
|
if (validOptions.convertNumbers && !isNaN(Number(trimmed))) {
|
|
@@ -132,27 +132,27 @@ var cleanParsedData = (data, options = {}) => {
|
|
|
132
132
|
}
|
|
133
133
|
return validOptions.strictMode ? void 0 : trimmed;
|
|
134
134
|
}
|
|
135
|
-
if (
|
|
136
|
-
const cleanedArray = data.map((item) => cleanParsedData(item, validOptions)).filter((item) => !
|
|
137
|
-
return validOptions.removeEmptyArrays &&
|
|
135
|
+
if (chunkGKC3UDMC_cjs.isArray(data)) {
|
|
136
|
+
const cleanedArray = data.map((item) => cleanParsedData(item, validOptions)).filter((item) => !chunkGKC3UDMC_cjs.isUndefined(item));
|
|
137
|
+
return validOptions.removeEmptyArrays && chunkKOLEURVT_cjs.isEmptyArray(cleanedArray) ? void 0 : cleanedArray;
|
|
138
138
|
}
|
|
139
|
-
if (
|
|
139
|
+
if (chunkGKC3UDMC_cjs.isObject(data)) {
|
|
140
140
|
const cleanedObject = {};
|
|
141
141
|
for (const key in data) {
|
|
142
142
|
if (Object.prototype.hasOwnProperty.call(data, key)) {
|
|
143
143
|
const cleanedValue = cleanParsedData(data[key], validOptions);
|
|
144
|
-
if (!
|
|
144
|
+
if (!chunkGKC3UDMC_cjs.isUndefined(cleanedValue)) {
|
|
145
145
|
cleanedObject[key] = cleanedValue;
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
|
-
return validOptions.removeEmptyObjects &&
|
|
149
|
+
return validOptions.removeEmptyObjects && chunkKOLEURVT_cjs.isEmptyObject(cleanedObject, { checkSymbols: validOptions.checkSymbols }) ? void 0 : cleanedObject;
|
|
150
150
|
}
|
|
151
151
|
return validOptions.strictMode ? void 0 : data;
|
|
152
152
|
};
|
|
153
153
|
|
|
154
154
|
var extractDigits = (value) => {
|
|
155
|
-
if (!
|
|
155
|
+
if (!chunkGKC3UDMC_cjs.isString(value) && !chunkGKC3UDMC_cjs.isNumber(value)) return 0;
|
|
156
156
|
const cleaned = String(value).trim().replace(/[^0-9]/g, "");
|
|
157
157
|
return Number(cleaned) || 0;
|
|
158
158
|
};
|
|
@@ -228,15 +228,15 @@ function fixSingleQuotesEscapeBackslash(input) {
|
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
function safeJsonParse(value, options = {}) {
|
|
231
|
-
if (
|
|
231
|
+
if (chunkGKC3UDMC_cjs.isNull(value)) return null;
|
|
232
232
|
const validOptions = validateJsonParsingOptions(options);
|
|
233
|
-
if (validOptions.convertNaN && (
|
|
233
|
+
if (validOptions.convertNaN && (chunkGKC3UDMC_cjs.isNaN(value) || chunkGKC3UDMC_cjs.isNonEmptyString(value) && value === "NaN")) {
|
|
234
234
|
return NaN;
|
|
235
235
|
}
|
|
236
|
-
if (validOptions.convertNumbers && !
|
|
236
|
+
if (validOptions.convertNumbers && !chunkGKC3UDMC_cjs.isNaN(Number(value)) && chunkGKC3UDMC_cjs.isNumber(extractDigits(value))) {
|
|
237
237
|
return Number(value);
|
|
238
238
|
}
|
|
239
|
-
if (!
|
|
239
|
+
if (!chunkGKC3UDMC_cjs.isString(value)) return void 0;
|
|
240
240
|
try {
|
|
241
241
|
let normalized = fixSingleQuotesEscapeBackslash(value);
|
|
242
242
|
if (validOptions.removeUndefined) {
|
|
@@ -257,7 +257,7 @@ function safeJsonParse(value, options = {}) {
|
|
|
257
257
|
console.error("Failed to parsing at `safeJsonParse`:", error);
|
|
258
258
|
}
|
|
259
259
|
validOptions.onError(
|
|
260
|
-
|
|
260
|
+
chunkGKC3UDMC_cjs.isError(error) ? new Error(error.message.replace(/^JSON\.parse:/, "Failed to parsing")) : new Error(String(error))
|
|
261
261
|
);
|
|
262
262
|
return void 0;
|
|
263
263
|
}
|
package/dist/chunk-L5RDAVVH.js
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 { isNumber } from './chunk-
|
|
10
|
+
import { isNumber } from './chunk-CSG4SCL3.js';
|
|
11
11
|
|
|
12
12
|
function isFinite(value) {
|
|
13
13
|
return isNumber(value) && Number.isFinite(value);
|
|
@@ -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 chunkYKQEOO7C_cjs = require('./chunk-YKQEOO7C.cjs');
|
|
13
|
+
var chunkGKC3UDMC_cjs = require('./chunk-GKC3UDMC.cjs');
|
|
14
14
|
|
|
15
15
|
var maxInt = 2147483647;
|
|
16
16
|
var base = 36;
|
|
@@ -52,7 +52,7 @@ function mapDomain(domain, fn) {
|
|
|
52
52
|
return result + map(labels, fn).join(".");
|
|
53
53
|
}
|
|
54
54
|
function ucs2decode(input) {
|
|
55
|
-
|
|
55
|
+
chunkYKQEOO7C_cjs.assertIsString(input, {
|
|
56
56
|
message: ({ currentType, validType }) => `Utils \`punycodeUtilsJS.ucs2.decode\`, parameter \`input\` must be of type \`${validType}\`, but received: \`${currentType}\`.`
|
|
57
57
|
});
|
|
58
58
|
const output = [];
|
|
@@ -75,7 +75,7 @@ function ucs2decode(input) {
|
|
|
75
75
|
var ucs2encode = (points) => {
|
|
76
76
|
if (!Array.isArray(points) || !points.every((p) => typeof p === "number" && Number.isFinite(p))) {
|
|
77
77
|
throw new TypeError(
|
|
78
|
-
`Utils \`punycodeUtilsJS.ucs2.encode\`, parameter \`points\` must be an array of numbers, but received: \`${
|
|
78
|
+
`Utils \`punycodeUtilsJS.ucs2.encode\`, parameter \`points\` must be an array of numbers, but received: \`${chunkGKC3UDMC_cjs.getPreciseType(
|
|
79
79
|
points
|
|
80
80
|
)}\`.`
|
|
81
81
|
);
|
|
@@ -102,7 +102,7 @@ function adapt(delta, numPoints, firstTime) {
|
|
|
102
102
|
return floor(k + (base - tMin + 1) * delta / (delta + skew));
|
|
103
103
|
}
|
|
104
104
|
function decode(input) {
|
|
105
|
-
|
|
105
|
+
chunkYKQEOO7C_cjs.assertIsString(input, {
|
|
106
106
|
message: ({ currentType, validType }) => `Utils \`punycodeUtilsJS.decode\`, parameter \`input\` must be of type \`${validType}\`, but received: \`${currentType}\`.`
|
|
107
107
|
});
|
|
108
108
|
const output = [];
|
|
@@ -139,7 +139,7 @@ function decode(input) {
|
|
|
139
139
|
return String.fromCodePoint(...output);
|
|
140
140
|
}
|
|
141
141
|
function encode(input) {
|
|
142
|
-
|
|
142
|
+
chunkYKQEOO7C_cjs.assertIsString(input, {
|
|
143
143
|
message: ({ currentType, validType }) => `Utils \`punycodeUtilsJS.encode\`, parameter \`input\` must be of type \`${validType}\`, but received: \`${currentType}\`.`
|
|
144
144
|
});
|
|
145
145
|
const output = [];
|
|
@@ -179,7 +179,7 @@ function encode(input) {
|
|
|
179
179
|
return output.join("");
|
|
180
180
|
}
|
|
181
181
|
function toUnicode(input) {
|
|
182
|
-
|
|
182
|
+
chunkYKQEOO7C_cjs.assertIsString(input, {
|
|
183
183
|
message: ({ currentType, validType }) => `Utils \`punycodeUtilsJS.toUnicode\`, parameter \`input\` must be of type \`${validType}\`, but received: \`${currentType}\`.`
|
|
184
184
|
});
|
|
185
185
|
return mapDomain(
|
|
@@ -188,7 +188,7 @@ function toUnicode(input) {
|
|
|
188
188
|
);
|
|
189
189
|
}
|
|
190
190
|
function toASCII(input) {
|
|
191
|
-
|
|
191
|
+
chunkYKQEOO7C_cjs.assertIsString(input, {
|
|
192
192
|
message: ({ currentType, validType }) => `Utils \`punycodeUtilsJS.toASCII\`, parameter \`input\` must be of type \`${validType}\`, but received: \`${currentType}\`.`
|
|
193
193
|
});
|
|
194
194
|
return mapDomain(
|
|
@@ -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
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
16
|
-
var
|
|
17
|
-
var
|
|
12
|
+
var chunkL4V53MQK_cjs = require('./chunk-L4V53MQK.cjs');
|
|
13
|
+
var chunkH65I3GRZ_cjs = require('./chunk-H65I3GRZ.cjs');
|
|
14
|
+
var chunkKOLEURVT_cjs = require('./chunk-KOLEURVT.cjs');
|
|
15
|
+
var chunkRRQHMOPE_cjs = require('./chunk-RRQHMOPE.cjs');
|
|
16
|
+
var chunkTQPGXGKB_cjs = require('./chunk-TQPGXGKB.cjs');
|
|
17
|
+
var chunkGKC3UDMC_cjs = require('./chunk-GKC3UDMC.cjs');
|
|
18
18
|
|
|
19
19
|
var findDuplicates = (values) => {
|
|
20
|
-
|
|
20
|
+
chunkRRQHMOPE_cjs.assertIsArray(values, {
|
|
21
21
|
message: ({ currentType, validType }) => `First parameter (\`values\`) must be of type \`${validType}\` (array literal or instance), but received: \`${currentType}\`.`
|
|
22
22
|
});
|
|
23
23
|
const duplicates = [];
|
|
24
24
|
values.forEach((item, index) => {
|
|
25
25
|
for (let i = index + 1; i < values.length; i++) {
|
|
26
|
-
if (
|
|
27
|
-
if (!duplicates.some((dup) =>
|
|
26
|
+
if (chunkH65I3GRZ_cjs.isEqual(item, values[i])) {
|
|
27
|
+
if (!duplicates.some((dup) => chunkH65I3GRZ_cjs.isEqual(dup, item))) {
|
|
28
28
|
duplicates.push(item);
|
|
29
29
|
}
|
|
30
30
|
break;
|
|
@@ -35,8 +35,8 @@ var findDuplicates = (values) => {
|
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
var omitKeys = (object, keysToOmit) => {
|
|
38
|
-
if (!
|
|
39
|
-
|
|
38
|
+
if (!chunkGKC3UDMC_cjs.isPlainObject(object)) return {};
|
|
39
|
+
chunkRRQHMOPE_cjs.assertIsArray(keysToOmit, {
|
|
40
40
|
message: ({ currentType, validType }) => `Second parameter (\`keysToOmit\`) must be of type \`${validType}\` (array literal or instance), but received: \`${currentType}\`.`
|
|
41
41
|
});
|
|
42
42
|
const duplicates = findDuplicates(keysToOmit);
|
|
@@ -51,14 +51,14 @@ var omitKeys = (object, keysToOmit) => {
|
|
|
51
51
|
};
|
|
52
52
|
|
|
53
53
|
var omitKeysDeep = (object, keysToOmit) => {
|
|
54
|
-
if (!
|
|
55
|
-
|
|
54
|
+
if (!chunkGKC3UDMC_cjs.isPlainObject(object)) return {};
|
|
55
|
+
chunkRRQHMOPE_cjs.assertIsArray(keysToOmit, {
|
|
56
56
|
message: ({ currentType, validType }) => `Second parameter (\`keysToOmit\`) must be of type \`${validType}\` (array literal or instance), but received: \`${currentType}\`.`
|
|
57
57
|
});
|
|
58
58
|
const duplicates = findDuplicates(keysToOmit);
|
|
59
|
-
if (
|
|
59
|
+
if (chunkGKC3UDMC_cjs.isNonEmptyArray(duplicates)) {
|
|
60
60
|
throw new Error(
|
|
61
|
-
`Function "omitKeysDeep" Error: Duplicate keys detected - \`${
|
|
61
|
+
`Function "omitKeysDeep" Error: Duplicate keys detected - \`${chunkTQPGXGKB_cjs.safeStableStringify(
|
|
62
62
|
duplicates,
|
|
63
63
|
{
|
|
64
64
|
keepUndefined: true
|
|
@@ -67,12 +67,12 @@ var omitKeysDeep = (object, keysToOmit) => {
|
|
|
67
67
|
);
|
|
68
68
|
}
|
|
69
69
|
const omitAtPath = (obj, pathParts) => {
|
|
70
|
-
if (!
|
|
70
|
+
if (!chunkGKC3UDMC_cjs.isObjectOrArray(obj)) return obj;
|
|
71
71
|
const [current, ...rest] = pathParts;
|
|
72
|
-
if (
|
|
73
|
-
if (
|
|
72
|
+
if (chunkKOLEURVT_cjs.isEmptyArray(rest)) {
|
|
73
|
+
if (chunkGKC3UDMC_cjs.isArray(obj)) {
|
|
74
74
|
const index = parseInt(current);
|
|
75
|
-
if (!
|
|
75
|
+
if (!chunkGKC3UDMC_cjs.isNaN(index) && index in obj) {
|
|
76
76
|
obj.splice(index, 1);
|
|
77
77
|
}
|
|
78
78
|
} else {
|
|
@@ -80,27 +80,27 @@ var omitKeysDeep = (object, keysToOmit) => {
|
|
|
80
80
|
}
|
|
81
81
|
} else {
|
|
82
82
|
const next = obj[current];
|
|
83
|
-
if (
|
|
83
|
+
if (chunkGKC3UDMC_cjs.isObjectOrArray(next)) {
|
|
84
84
|
obj[current] = omitAtPath(next, rest);
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
return obj;
|
|
88
88
|
};
|
|
89
89
|
const deepRemoveEmptyObjects = (obj) => {
|
|
90
|
-
if (
|
|
91
|
-
return obj.map(deepRemoveEmptyObjects).filter((item) => !(
|
|
90
|
+
if (chunkGKC3UDMC_cjs.isArray(obj)) {
|
|
91
|
+
return obj.map(deepRemoveEmptyObjects).filter((item) => !(chunkGKC3UDMC_cjs.isObjectOrArray(item) && Object.keys(item).length === 0));
|
|
92
92
|
}
|
|
93
|
-
if (
|
|
93
|
+
if (chunkGKC3UDMC_cjs.isObjectOrArray(obj)) {
|
|
94
94
|
const cleaned = Object.fromEntries(
|
|
95
95
|
Object.entries(obj).map(([k, v]) => [k, deepRemoveEmptyObjects(v)]).filter(
|
|
96
|
-
([, v]) => !
|
|
96
|
+
([, v]) => !chunkGKC3UDMC_cjs.isUndefined(v) && !(chunkGKC3UDMC_cjs.isObjectOrArray(v) && Object.keys(v).length === 0)
|
|
97
97
|
)
|
|
98
98
|
);
|
|
99
99
|
return cleaned;
|
|
100
100
|
}
|
|
101
101
|
return obj;
|
|
102
102
|
};
|
|
103
|
-
const result =
|
|
103
|
+
const result = chunkL4V53MQK_cjs.safeJsonParse(chunkTQPGXGKB_cjs.safeStableStringify(object));
|
|
104
104
|
for (const key of keysToOmit) {
|
|
105
105
|
const parts = key.split(".");
|
|
106
106
|
omitAtPath(result, parts);
|
package/dist/chunk-ONZFBJVW.js
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 { isNonEmptyString, isPlainObject } from './chunk-
|
|
10
|
+
import { isNonEmptyString, isPlainObject } from './chunk-CSG4SCL3.js';
|
|
11
11
|
|
|
12
12
|
var normalizeSpaces = (value, options = {
|
|
13
13
|
withTrim: true,
|
|
@@ -2,19 +2,19 @@
|
|
|
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 { normalizeSpaces } from './chunk-
|
|
11
|
-
import { parseCurrencyString } from './chunk-
|
|
12
|
-
import { isFinite } from './chunk-
|
|
10
|
+
import { normalizeSpaces } from './chunk-PFXCTE37.js';
|
|
11
|
+
import { parseCurrencyString } from './chunk-5MGEC3YG.js';
|
|
12
|
+
import { isFinite } from './chunk-NODTV4F3.js';
|
|
13
13
|
import { isInteger } from './chunk-WVSPXFTY.js';
|
|
14
|
-
import { isEmptyString } from './chunk-
|
|
15
|
-
import { assertIsString } from './chunk-
|
|
16
|
-
import { safeStableStringify, isDate } from './chunk-
|
|
17
|
-
import { isString, getPreciseType, assertIsPlainObject, hasOwnProp, isBoolean, isPlainObject, isNaN, isUndefined, isFunction, assertIsBoolean, isNil, isNumber, isNonEmptyString } from './chunk-
|
|
14
|
+
import { isEmptyString } from './chunk-TCDOWZQE.js';
|
|
15
|
+
import { assertIsString } from './chunk-BKIJBNIE.js';
|
|
16
|
+
import { safeStableStringify, isDate } from './chunk-6VUXD3CF.js';
|
|
17
|
+
import { isString, getPreciseType, assertIsPlainObject, hasOwnProp, isBoolean, isPlainObject, isNaN, isUndefined, isFunction, assertIsBoolean, isNil, isNumber, isNonEmptyString } from './chunk-CSG4SCL3.js';
|
|
18
18
|
import { isSupportedCountry, AsYouType } from 'libphonenumber-js/max';
|
|
19
19
|
import { id, enUS } from 'date-fns/locale';
|
|
20
20
|
import { parse, format } from 'date-fns';
|
|
@@ -2,30 +2,30 @@
|
|
|
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 chunkKOLEURVT_cjs = require('./chunk-KOLEURVT.cjs');
|
|
14
|
+
var chunkGKC3UDMC_cjs = require('./chunk-GKC3UDMC.cjs');
|
|
15
15
|
|
|
16
16
|
var isEmptyValue = (value, options = {}) => {
|
|
17
|
-
|
|
17
|
+
chunkGKC3UDMC_cjs.assertIsPlainObject(options, {
|
|
18
18
|
message: ({ currentType, validType }) => `Second parameter (\`options\`) must be of type \`${validType}\`, but received: \`${currentType}\`.`
|
|
19
19
|
});
|
|
20
|
-
const checkSymbols =
|
|
21
|
-
|
|
20
|
+
const checkSymbols = chunkGKC3UDMC_cjs.hasOwnProp(options, "checkSymbols") ? options.checkSymbols : false;
|
|
21
|
+
chunkGKC3UDMC_cjs.assertIsBoolean(checkSymbols, {
|
|
22
22
|
message: ({ currentType, validType }) => `Parameter \`checkSymbols\` property of the \`options\` (second parameter) must be of type \`${validType}\`, but received: \`${currentType}\`.`
|
|
23
23
|
});
|
|
24
|
-
if (
|
|
25
|
-
if (
|
|
26
|
-
if (
|
|
27
|
-
if (
|
|
28
|
-
return
|
|
24
|
+
if (chunkGKC3UDMC_cjs.isNil(value) || value === false || chunkGKC3UDMC_cjs.isNaN(value)) return true;
|
|
25
|
+
if (chunkGKC3UDMC_cjs.isString(value)) return chunk4YLBKLGS_cjs.isEmptyString(value);
|
|
26
|
+
if (chunkGKC3UDMC_cjs.isArray(value)) return chunkKOLEURVT_cjs.isEmptyArray(value);
|
|
27
|
+
if (chunkGKC3UDMC_cjs.isObject(value)) {
|
|
28
|
+
return chunkKOLEURVT_cjs.isEmptyObject(value, { checkSymbols });
|
|
29
29
|
}
|
|
30
30
|
return false;
|
|
31
31
|
};
|
|
@@ -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 { isEmptyArray, isEmptyObject } from './chunk-
|
|
12
|
-
import { assertIsPlainObject, hasOwnProp, assertIsBoolean, isNil, isNaN, isString, isArray, isObject } from './chunk-
|
|
10
|
+
import { isEmptyString } from './chunk-TCDOWZQE.js';
|
|
11
|
+
import { isEmptyArray, isEmptyObject } from './chunk-SDMPEJ4F.js';
|
|
12
|
+
import { assertIsPlainObject, hasOwnProp, assertIsBoolean, isNil, isNaN, isString, isArray, isObject } from './chunk-CSG4SCL3.js';
|
|
13
13
|
|
|
14
14
|
var isEmptyValue = (value, options = {}) => {
|
|
15
15
|
assertIsPlainObject(options, {
|
package/dist/chunk-QNKGP5DY.js
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,22 +2,18 @@
|
|
|
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
|
function assertIsArray(value, options) {
|
|
15
|
-
if (
|
|
16
|
-
|
|
17
|
-
value,
|
|
18
|
-
options,
|
|
19
|
-
requiredValidType: "array"
|
|
20
|
-
});
|
|
15
|
+
if (chunkGKC3UDMC_cjs.isArray(value)) return;
|
|
16
|
+
chunkGKC3UDMC_cjs.resolveErrorMessageAssertions({ value, options, requiredValidType: "array" });
|
|
21
17
|
}
|
|
22
18
|
|
|
23
19
|
exports.assertIsArray = assertIsArray;
|
|
@@ -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 { isEmptyString } from './chunk-
|
|
11
|
-
import { isNonEmptyString, isPlainObject, isString, isNumber, getPreciseType } from './chunk-
|
|
10
|
+
import { isEmptyString } from './chunk-TCDOWZQE.js';
|
|
11
|
+
import { isNonEmptyString, isPlainObject, isString, isNumber, getPreciseType } from './chunk-CSG4SCL3.js';
|
|
12
12
|
|
|
13
13
|
var capitalizeFirst = (string, options = {
|
|
14
14
|
lowerCaseNextRest: true,
|
|
@@ -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 { isArray, isObject, assertIsPlainObject, hasOwnProp, assertIsBoolean } from './chunk-
|
|
10
|
+
import { isArray, isObject, assertIsPlainObject, hasOwnProp, assertIsBoolean } from './chunk-CSG4SCL3.js';
|
|
11
11
|
|
|
12
12
|
var isEmptyArray = (value) => {
|
|
13
13
|
if (!isArray(value)) return true;
|
|
@@ -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 { getPreciseType, isNull } from './chunk-
|
|
11
|
+
import { safeStableStringify } from './chunk-6VUXD3CF.js';
|
|
12
|
+
import { getPreciseType, isNull } from './chunk-CSG4SCL3.js';
|
|
13
13
|
|
|
14
14
|
var CustomPromise = class extends Promise {
|
|
15
15
|
_value;
|
|
@@ -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 isEmptyString = (value, options = {}) => {
|
|
13
13
|
return !isNonEmptyString(value, options);
|