@rzl-zone/utils-js 3.5.3 → 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 +1 -1
package/dist/events/index.cjs
CHANGED
|
@@ -2,31 +2,31 @@
|
|
|
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 chunkYGB2BQPB_cjs = require('../chunk-YGB2BQPB.cjs');
|
|
13
13
|
require('../chunk-VJDDGRIK.cjs');
|
|
14
|
-
require('../chunk-
|
|
15
|
-
require('../chunk-
|
|
14
|
+
require('../chunk-K63WO3XA.cjs');
|
|
15
|
+
require('../chunk-F3WBQKRI.cjs');
|
|
16
16
|
|
|
17
17
|
Object.defineProperty(exports, "disableUserInteraction", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunkYGB2BQPB_cjs.disableUserInteraction; }
|
|
20
20
|
});
|
|
21
21
|
Object.defineProperty(exports, "enableUserInteraction", {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunkYGB2BQPB_cjs.enableUserInteraction; }
|
|
24
24
|
});
|
|
25
25
|
Object.defineProperty(exports, "removeElementFocus", {
|
|
26
26
|
enumerable: true,
|
|
27
|
-
get: function () { return
|
|
27
|
+
get: function () { return chunkYGB2BQPB_cjs.removeElementFocus; }
|
|
28
28
|
});
|
|
29
29
|
Object.defineProperty(exports, "scrollToTop", {
|
|
30
30
|
enumerable: true,
|
|
31
|
-
get: function () { return
|
|
31
|
+
get: function () { return chunkYGB2BQPB_cjs.scrollToTop; }
|
|
32
32
|
});
|
package/dist/events/index.d.ts
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
|
* ====================================================
|
package/dist/events/index.js
CHANGED
|
@@ -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
|
-
export { disableUserInteraction, enableUserInteraction, removeElementFocus, scrollToTop } from '../chunk-
|
|
10
|
+
export { disableUserInteraction, enableUserInteraction, removeElementFocus, scrollToTop } from '../chunk-4ZOXSUXB.js';
|
|
11
11
|
import '../chunk-L5RDAVVH.js';
|
|
12
|
-
import '../chunk-
|
|
13
|
-
import '../chunk-
|
|
12
|
+
import '../chunk-FI76UZRF.js';
|
|
13
|
+
import '../chunk-3KTD3QDI.js';
|
|
@@ -2,61 +2,61 @@
|
|
|
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
|
-
require('../chunk-
|
|
14
|
-
require('../chunk-
|
|
15
|
-
require('../chunk-
|
|
12
|
+
var chunkOS5OT5JA_cjs = require('../chunk-OS5OT5JA.cjs');
|
|
13
|
+
require('../chunk-B6UIKBHR.cjs');
|
|
14
|
+
require('../chunk-EK7FSI7F.cjs');
|
|
15
|
+
require('../chunk-B4SDEBN7.cjs');
|
|
16
16
|
require('../chunk-DVMHRLKP.cjs');
|
|
17
|
-
require('../chunk-
|
|
18
|
-
require('../chunk-
|
|
19
|
-
require('../chunk-
|
|
17
|
+
require('../chunk-NREACG6M.cjs');
|
|
18
|
+
require('../chunk-K63WO3XA.cjs');
|
|
19
|
+
require('../chunk-YC7AK3KX.cjs');
|
|
20
20
|
require('../chunk-UDA26MCU.cjs');
|
|
21
|
-
require('../chunk-
|
|
21
|
+
require('../chunk-F3WBQKRI.cjs');
|
|
22
22
|
|
|
23
23
|
Object.defineProperty(exports, "censorEmail", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkOS5OT5JA_cjs.censorEmail; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "chunkString", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkOS5OT5JA_cjs.chunkString; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "formatCurrency", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkOS5OT5JA_cjs.formatCurrency; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "formatDateFns", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkOS5OT5JA_cjs.formatDateFns; }
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "formatDateIntl", {
|
|
40
40
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkOS5OT5JA_cjs.formatDateIntl; }
|
|
42
42
|
});
|
|
43
43
|
Object.defineProperty(exports, "formatDateTime", {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunkOS5OT5JA_cjs.formatDateTime; }
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "formatNumber", {
|
|
48
48
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkOS5OT5JA_cjs.formatNumber; }
|
|
50
50
|
});
|
|
51
51
|
Object.defineProperty(exports, "formatPhoneNumber", {
|
|
52
52
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunkOS5OT5JA_cjs.formatPhoneNumber; }
|
|
54
54
|
});
|
|
55
55
|
Object.defineProperty(exports, "getGMTOffset", {
|
|
56
56
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunkOS5OT5JA_cjs.getGMTOffset; }
|
|
58
58
|
});
|
|
59
59
|
Object.defineProperty(exports, "truncateString", {
|
|
60
60
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
61
|
+
get: function () { return chunkOS5OT5JA_cjs.truncateString; }
|
|
62
62
|
});
|
|
@@ -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
|
* ====================================================
|
package/dist/formatters/index.js
CHANGED
|
@@ -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
|
-
export { censorEmail, chunkString, formatCurrency, formatDateFns, formatDateIntl, formatDateTime, formatNumber, formatPhoneNumber, getGMTOffset, truncateString } from '../chunk-
|
|
11
|
-
import '../chunk-
|
|
12
|
-
import '../chunk-
|
|
13
|
-
import '../chunk-
|
|
10
|
+
export { censorEmail, chunkString, formatCurrency, formatDateFns, formatDateIntl, formatDateTime, formatNumber, formatPhoneNumber, getGMTOffset, truncateString } from '../chunk-QUITZ3GP.js';
|
|
11
|
+
import '../chunk-OFBFGFVH.js';
|
|
12
|
+
import '../chunk-DPLL67OT.js';
|
|
13
|
+
import '../chunk-7ZNEUWYP.js';
|
|
14
14
|
import '../chunk-WVSPXFTY.js';
|
|
15
|
-
import '../chunk-
|
|
16
|
-
import '../chunk-
|
|
17
|
-
import '../chunk-
|
|
15
|
+
import '../chunk-JY4HLZ4W.js';
|
|
16
|
+
import '../chunk-FI76UZRF.js';
|
|
17
|
+
import '../chunk-2VO2CBTU.js';
|
|
18
18
|
import '../chunk-QNKGP5DY.js';
|
|
19
|
-
import '../chunk-
|
|
19
|
+
import '../chunk-3KTD3QDI.js';
|
|
@@ -2,35 +2,35 @@
|
|
|
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 chunkK3SONK25_cjs = require('../chunk-K3SONK25.cjs');
|
|
13
13
|
require('../chunk-DVMHRLKP.cjs');
|
|
14
14
|
var chunkBAV5T2E3_cjs = require('../chunk-BAV5T2E3.cjs');
|
|
15
|
-
require('../chunk-
|
|
15
|
+
require('../chunk-YC7AK3KX.cjs');
|
|
16
16
|
require('../chunk-UDA26MCU.cjs');
|
|
17
|
-
require('../chunk-
|
|
17
|
+
require('../chunk-F3WBQKRI.cjs');
|
|
18
18
|
|
|
19
19
|
Object.defineProperty(exports, "getRandomItem", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkK3SONK25_cjs.getRandomItem; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "randomInt", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkK3SONK25_cjs.randomInt; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "randomIntByLength", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkK3SONK25_cjs.randomIntByLength; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "randomStr", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkK3SONK25_cjs.randomStr; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "noop", {
|
|
36
36
|
enumerable: true,
|
|
@@ -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
|
* ====================================================
|
package/dist/generators/index.js
CHANGED
|
@@ -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
|
-
export { getRandomItem, randomInt, randomIntByLength, randomStr } from '../chunk-
|
|
10
|
+
export { getRandomItem, randomInt, randomIntByLength, randomStr } from '../chunk-ABA2ZSBQ.js';
|
|
11
11
|
import '../chunk-WVSPXFTY.js';
|
|
12
12
|
export { noop } from '../chunk-YWHHVDT4.js';
|
|
13
|
-
import '../chunk-
|
|
13
|
+
import '../chunk-2VO2CBTU.js';
|
|
14
14
|
import '../chunk-QNKGP5DY.js';
|
|
15
|
-
import '../chunk-
|
|
15
|
+
import '../chunk-3KTD3QDI.js';
|
package/dist/index.d.ts
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
|
* ====================================================
|
|
@@ -14,19 +14,6 @@
|
|
|
14
14
|
/// <reference path="./formatters/index.d.ts" />
|
|
15
15
|
/// <reference path="./generators/index.d.ts" />
|
|
16
16
|
/// <reference path="./next/index.d.ts" />
|
|
17
|
-
/// <reference path="./operations/index.d.ts" />
|
|
18
|
-
/// <reference path="./parsers/index.d.ts" />
|
|
19
|
-
/// <reference path="./predicates/index.d.ts" />
|
|
20
|
-
/// <reference path="./promises/index.d.ts" />
|
|
21
|
-
/// <reference path="./strings/index.d.ts" />
|
|
22
|
-
/// <reference path="./tailwind/index.d.ts" />
|
|
23
|
-
/// <reference path="./urls/index.d.ts" />
|
|
24
|
-
/// <reference path="./assertions/index.d.ts" />
|
|
25
|
-
/// <reference path="./conversions/index.d.ts" />
|
|
26
|
-
/// <reference path="./events/index.d.ts" />
|
|
27
|
-
/// <reference path="./formatters/index.d.ts" />
|
|
28
|
-
/// <reference path="./generators/index.d.ts" />
|
|
29
|
-
/// <reference path="./next/index.d.ts" />
|
|
30
17
|
/// <reference path="./next/server/index.d.ts" />
|
|
31
18
|
/// <reference path="./operations/index.d.ts" />
|
|
32
19
|
/// <reference path="./parsers/index.d.ts" />
|
|
@@ -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
|
* ====================================================
|
package/dist/next/index.cjs
CHANGED
|
@@ -2,39 +2,39 @@
|
|
|
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
|
|
14
|
-
var
|
|
15
|
-
var
|
|
16
|
-
var
|
|
12
|
+
var chunkURDI3IMY_cjs = require('../chunk-URDI3IMY.cjs');
|
|
13
|
+
var chunkLIU4S3JA_cjs = require('../chunk-LIU4S3JA.cjs');
|
|
14
|
+
var chunkNREACG6M_cjs = require('../chunk-NREACG6M.cjs');
|
|
15
|
+
var chunkK63WO3XA_cjs = require('../chunk-K63WO3XA.cjs');
|
|
16
|
+
var chunkYC7AK3KX_cjs = require('../chunk-YC7AK3KX.cjs');
|
|
17
17
|
require('../chunk-UDA26MCU.cjs');
|
|
18
|
-
var
|
|
18
|
+
var chunkF3WBQKRI_cjs = require('../chunk-F3WBQKRI.cjs');
|
|
19
19
|
|
|
20
20
|
function generateRoute(route, params) {
|
|
21
|
-
if (!
|
|
21
|
+
if (!chunkF3WBQKRI_cjs.isString(route) || chunkNREACG6M_cjs.isEmptyString(route)) {
|
|
22
22
|
throw new TypeError(
|
|
23
23
|
`\u274C 'generateRoute' Failed:
|
|
24
24
|
- Invalid 'route' value.
|
|
25
|
-
- Must be of type \`string\` and non-empty string, but received: "${
|
|
25
|
+
- Must be of type \`string\` and non-empty string, but received: "${chunkF3WBQKRI_cjs.getPreciseType(
|
|
26
26
|
route
|
|
27
|
-
)}": \`${
|
|
27
|
+
)}": \`${chunkYC7AK3KX_cjs.safeStableStringify(route)}\`.`
|
|
28
28
|
);
|
|
29
29
|
}
|
|
30
30
|
if (!/[\\[\]]/.test(route)) {
|
|
31
31
|
return route;
|
|
32
32
|
}
|
|
33
|
-
|
|
33
|
+
chunkF3WBQKRI_cjs.assertIsPlainObject(params, {
|
|
34
34
|
message: ({ validType }) => `\u274C 'generateRoute' Failed cause in route "${route}":
|
|
35
35
|
- Missing or invalid parameters \`${validType}\` for route: "${route}", must be of type \`${validType}\` mapping parameters.`
|
|
36
36
|
});
|
|
37
|
-
if (
|
|
37
|
+
if (chunkF3WBQKRI_cjs.isNil(params)) {
|
|
38
38
|
throw new TypeError(
|
|
39
39
|
`\u274C 'generateRoute' Failed cause in route "${route}":
|
|
40
40
|
- Missing parameters \`plain-object\` for route: "${route}".`
|
|
@@ -63,15 +63,15 @@ function generateRoute(route, params) {
|
|
|
63
63
|
const requiredKeys = Array.from(route.matchAll(/\[(\w+)\]/g)).map((m) => m[1]);
|
|
64
64
|
for (const key of requiredKeys) {
|
|
65
65
|
const value = params[key];
|
|
66
|
-
if (!
|
|
66
|
+
if (!chunkF3WBQKRI_cjs.isString(value)) {
|
|
67
67
|
errors.push(
|
|
68
|
-
`- Invalid parameter: "${key}" must be of type \`string\`, but received: \`${
|
|
68
|
+
`- Invalid parameter: "${key}" must be of type \`string\`, but received: \`${chunkF3WBQKRI_cjs.getPreciseType(
|
|
69
69
|
value
|
|
70
70
|
)}\`.`
|
|
71
71
|
);
|
|
72
72
|
continue;
|
|
73
73
|
}
|
|
74
|
-
if (
|
|
74
|
+
if (chunkNREACG6M_cjs.isEmptyString(value)) {
|
|
75
75
|
errors.push(`- Parameter "${key}" cannot be empty string.`);
|
|
76
76
|
continue;
|
|
77
77
|
}
|
|
@@ -96,14 +96,14 @@ function generateRoute(route, params) {
|
|
|
96
96
|
);
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
|
-
if (
|
|
99
|
+
if (chunkF3WBQKRI_cjs.isNonEmptyArray(errors)) {
|
|
100
100
|
throw new Error(
|
|
101
101
|
`\u274C 'generateRoute' Failed cause in route "${route}":
|
|
102
102
|
${errors.join("\n")}.`
|
|
103
103
|
);
|
|
104
104
|
}
|
|
105
105
|
return route.replace(/\[(\w+)\]/g, (_, key) => {
|
|
106
|
-
const paramKey =
|
|
106
|
+
const paramKey = chunkF3WBQKRI_cjs.isNonEmptyString(params[key]) ? params[key] : "";
|
|
107
107
|
return paramKey.trim().replace(/^\/+|\/+$/g, "");
|
|
108
108
|
}).replace(/\/+/g, "/");
|
|
109
109
|
}
|
|
@@ -114,40 +114,40 @@ var createBeApiUrl = (pathname, options = {}) => {
|
|
|
114
114
|
return `${a.replace(/\/+$/, "")}/${b.replace(/^\/+/, "")}`;
|
|
115
115
|
};
|
|
116
116
|
var joinPath = joinPath2;
|
|
117
|
-
|
|
117
|
+
chunkK63WO3XA_cjs.assertIsString(chunkF3WBQKRI_cjs.isNil(pathname) ? "" : pathname, {
|
|
118
118
|
message({ currentType, validType }) {
|
|
119
119
|
return `First parameter (\`pathname\`) must be of type \`${validType}\`, but received: \`${currentType}\`.`;
|
|
120
120
|
}
|
|
121
121
|
});
|
|
122
|
-
if (!
|
|
122
|
+
if (!chunkF3WBQKRI_cjs.isPlainObject(options)) {
|
|
123
123
|
options = {};
|
|
124
124
|
}
|
|
125
125
|
let {
|
|
126
126
|
prefix = "/api",
|
|
127
127
|
withOrigin = true
|
|
128
128
|
} = options;
|
|
129
|
-
if (!
|
|
129
|
+
if (!chunkF3WBQKRI_cjs.isUndefined(prefix) && !chunkF3WBQKRI_cjs.isString(prefix)) {
|
|
130
130
|
throw new TypeError(
|
|
131
|
-
`Parameter \`prefix\` property of the \`options\` (second parameter) must be of type \`string\`, but received: \`${
|
|
131
|
+
`Parameter \`prefix\` property of the \`options\` (second parameter) must be of type \`string\`, but received: \`${chunkF3WBQKRI_cjs.getPreciseType(
|
|
132
132
|
prefix
|
|
133
133
|
)}\`.`
|
|
134
134
|
);
|
|
135
135
|
}
|
|
136
|
-
|
|
136
|
+
chunkF3WBQKRI_cjs.assertIsBoolean(withOrigin, {
|
|
137
137
|
message: ({ currentType, validType }) => `Parameter \`withOrigin\` property of the \`options\` (second parameter) must be of type \`${validType}\`, but received: \`${currentType}\`.`
|
|
138
138
|
});
|
|
139
|
-
pathname =
|
|
140
|
-
prefix =
|
|
139
|
+
pathname = chunkURDI3IMY_cjs.normalizePathname(pathname);
|
|
140
|
+
prefix = chunkURDI3IMY_cjs.normalizePathname(prefix);
|
|
141
141
|
const normalizedPrefix = prefix.endsWith("/") ? prefix : prefix + "/";
|
|
142
142
|
if (pathname === prefix || pathname === prefix + "/" || pathname.startsWith(normalizedPrefix)) {
|
|
143
143
|
pathname = pathname.slice(prefix.length);
|
|
144
|
-
pathname =
|
|
144
|
+
pathname = chunkURDI3IMY_cjs.normalizePathname(pathname);
|
|
145
145
|
}
|
|
146
146
|
const baseApiUrl = getBeApiUrl({ suffix: prefix });
|
|
147
147
|
const fullPath = withOrigin ? joinPath2(baseApiUrl, pathname) : joinPath2(new URL(baseApiUrl).pathname, pathname);
|
|
148
148
|
return fullPath.replace(/\/+$/, "");
|
|
149
149
|
} catch (err) {
|
|
150
|
-
if (
|
|
150
|
+
if (chunkF3WBQKRI_cjs.isError(err)) {
|
|
151
151
|
throw err;
|
|
152
152
|
} else
|
|
153
153
|
throw new Error(
|
|
@@ -157,9 +157,9 @@ var createBeApiUrl = (pathname, options = {}) => {
|
|
|
157
157
|
};
|
|
158
158
|
|
|
159
159
|
var getBeApiUrl = (options = {}) => {
|
|
160
|
-
if (!
|
|
161
|
-
let suffix =
|
|
162
|
-
|
|
160
|
+
if (!chunkF3WBQKRI_cjs.isPlainObject(options)) options = {};
|
|
161
|
+
let suffix = chunkF3WBQKRI_cjs.hasOwnProp(options, "suffix") ? options.suffix : "/";
|
|
162
|
+
chunkK63WO3XA_cjs.assertIsString(suffix, {
|
|
163
163
|
message({ currentType, validType }) {
|
|
164
164
|
return `Parameter \`suffix\` property of the first parameter must be of type \`${validType}\`, but received: \`${currentType}\`.`;
|
|
165
165
|
}
|
|
@@ -167,20 +167,20 @@ var getBeApiUrl = (options = {}) => {
|
|
|
167
167
|
try {
|
|
168
168
|
let rawBaseUrl = process.env.NEXT_PUBLIC_BACKEND_API_URL?.trim();
|
|
169
169
|
if (rawBaseUrl) {
|
|
170
|
-
rawBaseUrl =
|
|
170
|
+
rawBaseUrl = chunkLIU4S3JA_cjs.removeSpaces(rawBaseUrl);
|
|
171
171
|
const urlObj = new URL(rawBaseUrl);
|
|
172
172
|
const hasPort = !!urlObj.port;
|
|
173
173
|
if (!hasPort && process.env.NEXT_PUBLIC_PORT_BE) {
|
|
174
|
-
rawBaseUrl = urlObj.origin +
|
|
174
|
+
rawBaseUrl = urlObj.origin + chunkURDI3IMY_cjs.formatEnvPort(process.env.NEXT_PUBLIC_PORT_BE, {
|
|
175
175
|
prefixColon: true
|
|
176
176
|
});
|
|
177
177
|
}
|
|
178
178
|
} else {
|
|
179
|
-
rawBaseUrl = "http://localhost" +
|
|
179
|
+
rawBaseUrl = "http://localhost" + chunkURDI3IMY_cjs.formatEnvPort(process.env.NEXT_PUBLIC_PORT_BE || "8000", {
|
|
180
180
|
prefixColon: true
|
|
181
181
|
});
|
|
182
182
|
}
|
|
183
|
-
suffix =
|
|
183
|
+
suffix = chunkLIU4S3JA_cjs.removeSpaces(suffix).length ? chunkLIU4S3JA_cjs.removeSpaces(suffix) : "/";
|
|
184
184
|
const baseApiUrl = new URL(rawBaseUrl.replace(/\/+$/, "")).origin;
|
|
185
185
|
const finalSuffix = suffix === "/" ? "/" : `${suffix.startsWith("/") ? "" : "/"}${suffix.replace(/\/+$/, "")}`;
|
|
186
186
|
return `${baseApiUrl}${finalSuffix}`;
|
|
@@ -196,10 +196,10 @@ var getBaseUrl = () => {
|
|
|
196
196
|
const baseEnv = process.env.NEXT_PUBLIC_BASE_URL?.trim();
|
|
197
197
|
const portEnv = process.env.NEXT_PUBLIC_PORT_FE?.trim();
|
|
198
198
|
let baseUrl = baseEnv || "http://localhost";
|
|
199
|
-
baseUrl =
|
|
199
|
+
baseUrl = chunkLIU4S3JA_cjs.removeSpaces(baseUrl).replace(/\/+$/, "");
|
|
200
200
|
const hasPort = /:\/\/[^/]+:\d+/.test(baseUrl);
|
|
201
201
|
if (!hasPort && portEnv) {
|
|
202
|
-
baseUrl +=
|
|
202
|
+
baseUrl += chunkURDI3IMY_cjs.formatEnvPort(portEnv, { prefixColon: true });
|
|
203
203
|
} else if (!hasPort && !baseEnv) {
|
|
204
204
|
baseUrl += ":3000";
|
|
205
205
|
}
|
package/dist/next/index.d.ts
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
|
* ====================================================
|
package/dist/next/index.js
CHANGED
|
@@ -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
|
-
import { normalizePathname, formatEnvPort } from '../chunk-
|
|
11
|
-
import { removeSpaces } from '../chunk-
|
|
12
|
-
import { isEmptyString } from '../chunk-
|
|
13
|
-
import { assertIsString } from '../chunk-
|
|
14
|
-
import { safeStableStringify } from '../chunk-
|
|
10
|
+
import { normalizePathname, formatEnvPort } from '../chunk-LBNOZIZ6.js';
|
|
11
|
+
import { removeSpaces } from '../chunk-4ACKNPL5.js';
|
|
12
|
+
import { isEmptyString } from '../chunk-JY4HLZ4W.js';
|
|
13
|
+
import { assertIsString } from '../chunk-FI76UZRF.js';
|
|
14
|
+
import { safeStableStringify } from '../chunk-2VO2CBTU.js';
|
|
15
15
|
import '../chunk-QNKGP5DY.js';
|
|
16
|
-
import { isString, getPreciseType, assertIsPlainObject, isNil, isNonEmptyArray, isNonEmptyString, isPlainObject, isUndefined, assertIsBoolean, isError, hasOwnProp } from '../chunk-
|
|
16
|
+
import { isString, getPreciseType, assertIsPlainObject, isNil, isNonEmptyArray, isNonEmptyString, isPlainObject, isUndefined, assertIsBoolean, isError, hasOwnProp } from '../chunk-3KTD3QDI.js';
|
|
17
17
|
|
|
18
18
|
function generateRoute(route, params) {
|
|
19
19
|
if (!isString(route) || isEmptyString(route)) {
|
|
@@ -2,19 +2,19 @@
|
|
|
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
|
require('server-only');
|
|
14
14
|
var server = require('next/server');
|
|
15
15
|
|
|
16
16
|
var getClientIpOrUrl = (request, includeFullUrl = true) => {
|
|
17
|
-
if (!
|
|
17
|
+
if (!chunkF3WBQKRI_cjs.isFunction(server.NextRequest)) {
|
|
18
18
|
throw new Error(
|
|
19
19
|
"Function `getClientIpOrUrl` is designed to be used in a `NextJS` environment."
|
|
20
20
|
);
|
|
@@ -24,7 +24,7 @@ var getClientIpOrUrl = (request, includeFullUrl = true) => {
|
|
|
24
24
|
"First parameter (`request`) must be an `instance of NextRequest` from `NextJS`."
|
|
25
25
|
);
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
chunkF3WBQKRI_cjs.assertIsBoolean(includeFullUrl, {
|
|
28
28
|
message: ({ currentType, validType }) => `Second parameter (\`includeFullUrl\`) must be of type \`${validType}\`, but received: \`${currentType}\`.`
|
|
29
29
|
});
|
|
30
30
|
const forwardedIps = (request.headers.get("x-forwarded-for") ?? "127.0.0.1").trim().split(",");
|
|
@@ -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,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 { isFunction, assertIsBoolean } from '../../chunk-
|
|
10
|
+
import { isFunction, assertIsBoolean } from '../../chunk-3KTD3QDI.js';
|
|
11
11
|
import 'server-only';
|
|
12
12
|
import { NextRequest } from 'next/server';
|
|
13
13
|
|
|
@@ -2,32 +2,32 @@
|
|
|
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
|
-
require('../chunk-
|
|
14
|
-
require('../chunk-
|
|
15
|
-
require('../chunk-
|
|
16
|
-
require('../chunk-
|
|
12
|
+
var chunkRMJC3B5P_cjs = require('../chunk-RMJC3B5P.cjs');
|
|
13
|
+
require('../chunk-66WLOZOD.cjs');
|
|
14
|
+
require('../chunk-7QQV66RX.cjs');
|
|
15
|
+
require('../chunk-ATLFMKAF.cjs');
|
|
16
|
+
require('../chunk-7WBMA2VE.cjs');
|
|
17
17
|
require('../chunk-BAV5T2E3.cjs');
|
|
18
|
-
require('../chunk-
|
|
18
|
+
require('../chunk-YC7AK3KX.cjs');
|
|
19
19
|
require('../chunk-UDA26MCU.cjs');
|
|
20
|
-
require('../chunk-
|
|
20
|
+
require('../chunk-F3WBQKRI.cjs');
|
|
21
21
|
|
|
22
22
|
Object.defineProperty(exports, "findDuplicates", {
|
|
23
23
|
enumerable: true,
|
|
24
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunkRMJC3B5P_cjs.findDuplicates; }
|
|
25
25
|
});
|
|
26
26
|
Object.defineProperty(exports, "omitKeys", {
|
|
27
27
|
enumerable: true,
|
|
28
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunkRMJC3B5P_cjs.omitKeys; }
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "omitKeysDeep", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function () { return
|
|
32
|
+
get: function () { return chunkRMJC3B5P_cjs.omitKeysDeep; }
|
|
33
33
|
});
|
|
@@ -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
|
* ====================================================
|