@rzl-zone/utils-js 3.11.1 → 3.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assertions/index.cjs +11 -11
- package/dist/assertions/index.d.ts +5 -5
- package/dist/assertions/index.js +5 -5
- package/dist/{chunk-TER22LO4.cjs → chunk-2AFQ33D3.cjs} +8 -8
- package/dist/{chunk-SZUNAEMR.js → chunk-2CYDJVGM.js} +6 -6
- package/dist/{chunk-6EDFZJZ5.cjs → chunk-2MW4JDQ2.cjs} +126 -126
- package/dist/{chunk-M7ELWZXM.cjs → chunk-2VTDXC3N.cjs} +9 -9
- package/dist/{chunk-6YGBRENU.js → chunk-44XX2P34.js} +3 -3
- package/dist/{chunk-WLOQQFDS.cjs → chunk-4YLBKLGS.cjs} +3 -3
- package/dist/{chunk-Q4GEQS7X.cjs → chunk-566CXQW7.cjs} +163 -167
- package/dist/{chunk-MV3TSQSH.cjs → chunk-57EPKYID.cjs} +71 -71
- package/dist/{chunk-2XSZ2ANI.js → chunk-5MGEC3YG.js} +2 -2
- package/dist/{chunk-HYN6FC5A.cjs → chunk-6EF52423.cjs} +34 -34
- package/dist/{chunk-LJHPTLWB.js → chunk-6SCOKU3S.js} +7 -7
- package/dist/{chunk-AXDYWO67.js → chunk-6VUXD3CF.js} +2 -2
- package/dist/{chunk-C2PV3VWC.cjs → chunk-7B76BSNK.cjs} +6 -6
- package/dist/{chunk-ZPDMWDGZ.cjs → chunk-7Y6I2DSU.cjs} +14 -14
- package/dist/{chunk-KXJ7X325.cjs → chunk-A7S7E2EE.cjs} +37 -37
- package/dist/{chunk-BPYW5YL7.js → chunk-AJZ6PMMZ.js} +2 -2
- package/dist/{chunk-PGNL7JXO.cjs → chunk-AXGBL2IO.cjs} +40 -40
- package/dist/{chunk-NLZLXWAU.cjs → chunk-B4TC6FBV.cjs} +9 -9
- package/dist/chunk-BAV5T2E3.cjs +1 -1
- package/dist/{chunk-3T6VSWYX.js → chunk-BKIJBNIE.js} +2 -2
- package/dist/{chunk-RBWZII5I.js → chunk-BNIMTFK5.js} +3 -3
- package/dist/{chunk-5WIEDF2J.js → chunk-BXW7YXB7.js} +4 -4
- package/dist/{chunk-22V4WP3H.js → chunk-CFYZC4S6.js} +4 -4
- package/dist/{chunk-MSUW5VHZ.js → chunk-CSG4SCL3.js} +10 -13
- package/dist/{chunk-JIE447J5.js → chunk-CWQW7AKK.js} +3 -3
- package/dist/chunk-DVMHRLKP.cjs +1 -1
- package/dist/{chunk-U7HHN47R.js → chunk-EN7LVZBZ.js} +12 -16
- package/dist/{chunk-EBYFYZW4.cjs → chunk-EV4Y7HCY.cjs} +4 -4
- package/dist/{chunk-NVRZPF5M.cjs → chunk-F66VDYIZ.cjs} +3 -3
- package/dist/{chunk-BMZZXZJ2.cjs → chunk-FLJX37EL.cjs} +4 -4
- package/dist/{chunk-SYHPSOUU.cjs → chunk-GKC3UDMC.cjs} +10 -13
- package/dist/{chunk-GIKL4PUF.cjs → chunk-H65I3GRZ.cjs} +10 -10
- package/dist/{chunk-HNBRGN4R.js → chunk-HHYWB7VZ.js} +2 -2
- package/dist/{chunk-MUHRPRR7.cjs → chunk-HNGGISFL.cjs} +3 -3
- package/dist/{chunk-B6PMNZ4M.cjs → chunk-HNSQAVSZ.cjs} +6 -6
- package/dist/{chunk-RZOGBYIS.js → chunk-HSP6IWZK.js} +3 -7
- package/dist/{chunk-IZGVBYFN.js → chunk-IDZS7J6T.js} +13 -13
- package/dist/{chunk-ENMRZ4BE.js → chunk-JS6R55VL.js} +3 -3
- package/dist/{chunk-WETQI6HM.js → chunk-JZVT5FK7.js} +9 -9
- package/dist/chunk-KHO2SBNA.cjs +1 -1
- package/dist/{chunk-TJHGRQ4P.js → chunk-KIDJCMNJ.js} +2 -2
- package/dist/{chunk-7FGNVDEV.cjs → chunk-KOLEURVT.cjs} +7 -7
- package/dist/{chunk-K5536YHG.cjs → chunk-L4V53MQK.cjs} +50 -50
- package/dist/chunk-L5RDAVVH.js +1 -1
- package/dist/{chunk-CCJ2MSN7.js → chunk-NODTV4F3.js} +2 -2
- package/dist/{chunk-QYI2VJLS.cjs → chunk-NYK5K3V2.cjs} +9 -9
- package/dist/{chunk-XPVTIGU2.cjs → chunk-ODUO3RTL.cjs} +26 -26
- package/dist/chunk-ONZFBJVW.js +1 -1
- package/dist/{chunk-ZVWZEGQP.js → chunk-PFXCTE37.js} +2 -2
- package/dist/{chunk-FJ4BQFVO.js → chunk-PPST7QAQ.js} +8 -8
- package/dist/{chunk-RMP7VMPB.cjs → chunk-Q5IMYDFL.cjs} +12 -12
- package/dist/{chunk-UIAWUZ4H.js → chunk-QFFBIOJ4.js} +4 -4
- package/dist/chunk-QNKGP5DY.js +1 -1
- package/dist/{chunk-DLS3G6WQ.cjs → chunk-RRQHMOPE.cjs} +4 -8
- package/dist/{chunk-BLF7SD66.js → chunk-RU5OSRBU.js} +3 -3
- package/dist/{chunk-GOFINGT6.js → chunk-SDMPEJ4F.js} +2 -2
- package/dist/{chunk-K47GZDBH.js → chunk-SYNL5IKP.js} +3 -3
- package/dist/{chunk-ULQPCIA2.js → chunk-TCDOWZQE.js} +2 -2
- package/dist/{chunk-DAPAK2W3.cjs → chunk-TQPGXGKB.cjs} +31 -31
- package/dist/{chunk-DNMCR5JH.js → chunk-TULOI4GL.js} +9 -9
- package/dist/{chunk-SU3UELUB.cjs → chunk-UBHCP4N5.cjs} +3 -3
- package/dist/{chunk-U23I7JPB.cjs → chunk-UCHF3M34.cjs} +15 -15
- package/dist/chunk-UDA26MCU.cjs +1 -1
- package/dist/{chunk-XX6RUGTM.cjs → chunk-V3C4FYZL.cjs} +3 -3
- package/dist/{chunk-6LXWT2I5.js → chunk-VAAHZFBF.js} +2 -2
- package/dist/chunk-VJDDGRIK.cjs +1 -1
- package/dist/chunk-WVSPXFTY.js +1 -1
- package/dist/{chunk-GXKQ3LHF.js → chunk-WYP76WXB.js} +3 -3
- package/dist/{chunk-JXEIJM5M.cjs → chunk-YDE4ZBB7.cjs} +61 -61
- package/dist/{chunk-WXFTVXBF.cjs → chunk-YKQEOO7C.cjs} +4 -4
- package/dist/{chunk-BOYP3ARU.js → chunk-YSZC56SZ.js} +4 -4
- package/dist/chunk-YWHHVDT4.js +1 -1
- package/dist/conversions/index.cjs +34 -34
- package/dist/conversions/index.d.ts +1 -1
- package/dist/conversions/index.js +15 -15
- package/dist/events/index.cjs +8 -8
- package/dist/events/index.d.ts +1 -1
- package/dist/events/index.js +4 -4
- package/dist/formatters/index.cjs +19 -19
- package/dist/formatters/index.d.ts +1 -1
- package/dist/formatters/index.js +9 -9
- package/dist/generators/index.cjs +9 -9
- package/dist/generators/index.d.ts +1 -1
- package/dist/generators/index.js +4 -4
- package/dist/index.d.ts +1 -1
- package/dist/{isPlainObject-0p3VveWr.d.ts → isPlainObject-DTJVV2Kf.d.ts} +5 -3
- package/dist/next/index.cjs +41 -39
- package/dist/next/index.d.ts +1 -1
- package/dist/next/index.js +13 -11
- package/dist/next/server/index.cjs +4 -4
- package/dist/next/server/index.d.ts +1 -1
- package/dist/next/server/index.js +2 -2
- package/dist/operations/index.cjs +11 -11
- package/dist/operations/index.d.ts +1 -1
- package/dist/operations/index.js +8 -8
- package/dist/parsers/index.cjs +6 -6
- package/dist/parsers/index.d.ts +1 -1
- package/dist/parsers/index.js +5 -5
- package/dist/predicates/index.cjs +77 -77
- package/dist/predicates/index.d.ts +6 -6
- package/dist/predicates/index.js +14 -14
- package/dist/promises/index.cjs +6 -6
- package/dist/promises/index.d.ts +1 -1
- package/dist/promises/index.js +4 -4
- package/dist/rzl-utils.global.js +2 -2
- package/dist/strings/index.cjs +23 -23
- package/dist/strings/index.d.ts +1 -1
- package/dist/strings/index.js +7 -7
- package/dist/tailwind/index.cjs +13 -13
- package/dist/tailwind/index.d.ts +1 -1
- package/dist/tailwind/index.js +5 -5
- package/dist/urls/index.cjs +23 -23
- package/dist/urls/index.d.ts +1 -1
- package/dist/urls/index.js +16 -16
- package/package.json +18 -18
|
@@ -2,40 +2,40 @@
|
|
|
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 chunkHNSQAVSZ_cjs = require('../chunk-HNSQAVSZ.cjs');
|
|
13
|
+
var chunkYKQEOO7C_cjs = require('../chunk-YKQEOO7C.cjs');
|
|
14
|
+
var chunkRRQHMOPE_cjs = require('../chunk-RRQHMOPE.cjs');
|
|
15
15
|
require('../chunk-UDA26MCU.cjs');
|
|
16
|
-
var
|
|
16
|
+
var chunkGKC3UDMC_cjs = require('../chunk-GKC3UDMC.cjs');
|
|
17
17
|
|
|
18
18
|
Object.defineProperty(exports, "assertIsBigInt", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunkHNSQAVSZ_cjs.assertIsBigInt; }
|
|
21
21
|
});
|
|
22
22
|
Object.defineProperty(exports, "assertIsNumber", {
|
|
23
23
|
enumerable: true,
|
|
24
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunkHNSQAVSZ_cjs.assertIsNumber; }
|
|
25
25
|
});
|
|
26
26
|
Object.defineProperty(exports, "assertIsString", {
|
|
27
27
|
enumerable: true,
|
|
28
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunkYKQEOO7C_cjs.assertIsString; }
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "assertIsArray", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function () { return
|
|
32
|
+
get: function () { return chunkRRQHMOPE_cjs.assertIsArray; }
|
|
33
33
|
});
|
|
34
34
|
Object.defineProperty(exports, "assertIsBoolean", {
|
|
35
35
|
enumerable: true,
|
|
36
|
-
get: function () { return
|
|
36
|
+
get: function () { return chunkGKC3UDMC_cjs.assertIsBoolean; }
|
|
37
37
|
});
|
|
38
38
|
Object.defineProperty(exports, "assertIsPlainObject", {
|
|
39
39
|
enumerable: true,
|
|
40
|
-
get: function () { return
|
|
40
|
+
get: function () { return chunkGKC3UDMC_cjs.assertIsPlainObject; }
|
|
41
41
|
});
|
|
@@ -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
10
|
import { Prettify, PickStrict } from '@rzl-zone/ts-types-plus';
|
|
11
|
-
import { G as GetPreciseTypeOptions, I as IsNumberOptions, a as IsPlainObjectResult } from '../isPlainObject-
|
|
11
|
+
import { G as GetPreciseTypeOptions, I as IsNumberOptions, c as ArrayFallback, a as IsPlainObjectResult } from '../isPlainObject-DTJVV2Kf.js';
|
|
12
12
|
|
|
13
13
|
/** -------------------------------------------------------
|
|
14
14
|
* * ***Shape of the object passed to custom error message functions.***
|
|
@@ -50,7 +50,7 @@ type OptionsMessageFunctionAssertIs = {
|
|
|
50
50
|
* - A static string message.
|
|
51
51
|
* - A function receiving `{ currentType, validType }` and returning a string.
|
|
52
52
|
*/
|
|
53
|
-
type OptionsMessageAssertIs =
|
|
53
|
+
type OptionsMessageAssertIs = (({ currentType, validType }: OptionsMessageFunctionAssertIs) => string) | string;
|
|
54
54
|
/** ---------------------------------------------------------------------------
|
|
55
55
|
* * ***Base options for `assertIs*` functions.***
|
|
56
56
|
* ---------------------------------------------------------------------------
|
|
@@ -576,8 +576,8 @@ declare const assertIsNumber: (value: unknown, options?: OptionsAssertIsNumber)
|
|
|
576
576
|
* console.log(result.push(1, 2, 3)); // ➔ Safe to use array methods
|
|
577
577
|
* ```
|
|
578
578
|
*/
|
|
579
|
-
declare function assertIsArray
|
|
580
|
-
declare function assertIsArray<T
|
|
579
|
+
declare function assertIsArray(value: [], options?: OptionsAssertIs): asserts value is [];
|
|
580
|
+
declare function assertIsArray<T>(value: T, options?: OptionsAssertIs): asserts value is ArrayFallback<T>;
|
|
581
581
|
declare function assertIsArray(value: unknown, options?: OptionsAssertIs): asserts value is unknown[];
|
|
582
582
|
|
|
583
583
|
/** -------------------------------------------------------
|
package/dist/assertions/index.js
CHANGED
|
@@ -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
|
-
export { assertIsBigInt, assertIsNumber } from '../chunk-
|
|
11
|
-
export { assertIsString } from '../chunk-
|
|
12
|
-
export { assertIsArray } from '../chunk-
|
|
10
|
+
export { assertIsBigInt, assertIsNumber } from '../chunk-VAAHZFBF.js';
|
|
11
|
+
export { assertIsString } from '../chunk-BKIJBNIE.js';
|
|
12
|
+
export { assertIsArray } from '../chunk-HSP6IWZK.js';
|
|
13
13
|
import '../chunk-QNKGP5DY.js';
|
|
14
|
-
export { assertIsBoolean, assertIsPlainObject } from '../chunk-
|
|
14
|
+
export { assertIsBoolean, assertIsPlainObject } from '../chunk-CSG4SCL3.js';
|
|
@@ -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,12 +10,12 @@
|
|
|
10
10
|
'use strict';
|
|
11
11
|
|
|
12
12
|
var chunkVJDDGRIK_cjs = require('./chunk-VJDDGRIK.cjs');
|
|
13
|
-
var
|
|
14
|
-
var
|
|
13
|
+
var chunkYKQEOO7C_cjs = require('./chunk-YKQEOO7C.cjs');
|
|
14
|
+
var chunkGKC3UDMC_cjs = require('./chunk-GKC3UDMC.cjs');
|
|
15
15
|
|
|
16
16
|
var disableUserInteraction = (className = "on_processing") => {
|
|
17
17
|
if (chunkVJDDGRIK_cjs.isServer()) return;
|
|
18
|
-
|
|
18
|
+
chunkYKQEOO7C_cjs.assertIsString(className, {
|
|
19
19
|
message({ validType, currentType }) {
|
|
20
20
|
return `First parameter \`className\` must be of type \`${validType}\`, but received: \`${currentType}\`.`;
|
|
21
21
|
}
|
|
@@ -28,7 +28,7 @@ var disableUserInteraction = (className = "on_processing") => {
|
|
|
28
28
|
|
|
29
29
|
var enableUserInteraction = (className = "on_processing") => {
|
|
30
30
|
if (chunkVJDDGRIK_cjs.isServer()) return;
|
|
31
|
-
|
|
31
|
+
chunkYKQEOO7C_cjs.assertIsString(className, {
|
|
32
32
|
message({ validType, currentType }) {
|
|
33
33
|
return `First parameter \`className\` must be of type \`${validType}\`, but received: \`${currentType}\`.`;
|
|
34
34
|
}
|
|
@@ -49,11 +49,11 @@ var removeElementFocus = () => {
|
|
|
49
49
|
|
|
50
50
|
var scrollToTop = (options) => {
|
|
51
51
|
if (chunkVJDDGRIK_cjs.isServer()) return;
|
|
52
|
-
if (!
|
|
52
|
+
if (!chunkGKC3UDMC_cjs.isPlainObject(options)) {
|
|
53
53
|
options = {};
|
|
54
54
|
}
|
|
55
|
-
const behavior =
|
|
56
|
-
let timeout =
|
|
55
|
+
const behavior = chunkGKC3UDMC_cjs.hasOwnProp(options, "behavior") && chunkGKC3UDMC_cjs.isNonEmptyString(options.behavior) && ["auto", "instant", "smooth"].includes(options.behavior) ? options.behavior : "smooth";
|
|
56
|
+
let timeout = chunkGKC3UDMC_cjs.hasOwnProp(options, "timeout") && chunkGKC3UDMC_cjs.isNumber(options.timeout) && options.timeout >= 1 ? options.timeout : 1;
|
|
57
57
|
timeout = timeout > 2147483647 ? 2147483647 : timeout;
|
|
58
58
|
setTimeout(() => window.scrollTo({ top: 0, left: 0, behavior }), timeout);
|
|
59
59
|
};
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
* ====================================================
|
|
3
3
|
* Rzl Utils-JS.
|
|
4
4
|
* ----------------------------------------------------
|
|
5
|
-
* Version: 3.
|
|
5
|
+
* Version: 3.12.0.
|
|
6
6
|
* Author: Rizalvin Dwiky.
|
|
7
7
|
* Repository: https://github.com/rzl-zone/utils-js.
|
|
8
8
|
* ====================================================
|
|
9
9
|
*/
|
|
10
|
-
import { isValidDomain } from './chunk-
|
|
11
|
-
import { removeSpaces } from './chunk-
|
|
12
|
-
import { isEmptyString } from './chunk-
|
|
13
|
-
import { safeStableStringify } from './chunk-
|
|
14
|
-
import { assertIsPlainObject, isNonEmptyString, getPreciseType, assertIsBoolean, isUndefined, isSet, isArray, isNil, isString, isNull, isError, hasOwnProp, isBoolean, isFunction } from './chunk-
|
|
10
|
+
import { isValidDomain } from './chunk-BXW7YXB7.js';
|
|
11
|
+
import { removeSpaces } from './chunk-HHYWB7VZ.js';
|
|
12
|
+
import { isEmptyString } from './chunk-TCDOWZQE.js';
|
|
13
|
+
import { safeStableStringify } from './chunk-6VUXD3CF.js';
|
|
14
|
+
import { assertIsPlainObject, isNonEmptyString, getPreciseType, assertIsBoolean, isUndefined, isSet, isArray, isNil, isString, isNull, isError, hasOwnProp, isBoolean, isFunction } from './chunk-CSG4SCL3.js';
|
|
15
15
|
|
|
16
16
|
var NormalizePathnameError = class _NormalizePathnameError extends Error {
|
|
17
17
|
/** * ***The original error that triggered this normalization failure.***
|