@rzl-zone/utils-js 3.13.1 → 3.14.0-beta.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 +7 -6
- package/dist/.references/index.d.cts +2 -1
- package/dist/.references/index.d.ts +2 -1
- package/dist/AbortError-DK6kpzbu.cjs +26 -0
- package/dist/AbortError-DK6kpzbu.cjs.map +1 -0
- package/dist/AbortError-DVT8lAKn.js +20 -0
- package/dist/AbortError-DVT8lAKn.js.map +1 -0
- package/dist/{assertIsArray-HgzPQIAM.js → assertIsArray-CG7L7vlt.js} +3 -3
- package/dist/assertIsArray-CG7L7vlt.js.map +1 -0
- package/dist/{assertIsArray-CeXL4xv5.cjs → assertIsArray-CtCRD-_G.cjs} +5 -5
- package/dist/assertIsArray-CtCRD-_G.cjs.map +1 -0
- package/dist/assertIsPlainObject-DPZLj-Ho.cjs +26 -0
- package/dist/assertIsPlainObject-DPZLj-Ho.cjs.map +1 -0
- package/dist/assertIsPlainObject-j9bDqNLo.js +20 -0
- package/dist/assertIsPlainObject-j9bDqNLo.js.map +1 -0
- package/dist/{assertIsString-CY_WkCLr.js → assertIsString-CHIwE12y.js} +4 -4
- package/dist/assertIsString-CHIwE12y.js.map +1 -0
- package/dist/{assertIsString-DUrVt82d.cjs → assertIsString-CjE9kbQ_.cjs} +6 -6
- package/dist/assertIsString-CjE9kbQ_.cjs.map +1 -0
- package/dist/assertions/index.cjs +14 -12
- package/dist/assertions/index.cjs.map +1 -1
- package/dist/assertions/index.d.cts +2 -2
- package/dist/assertions/index.d.ts +2 -2
- package/dist/assertions/index.js +10 -8
- package/dist/assertions/index.js.map +1 -1
- package/dist/conversions/index.cjs +6 -6
- package/dist/conversions/index.d.cts +2 -2
- package/dist/conversions/index.d.ts +2 -2
- package/dist/conversions/index.js +6 -6
- package/dist/conversions-BFz6MKaV.cjs +449 -0
- package/dist/conversions-BFz6MKaV.cjs.map +1 -0
- package/dist/{conversions-1s7xMBe_.js → conversions-Ben5p5Ts.js} +43 -40
- package/dist/conversions-Ben5p5Ts.js.map +1 -0
- package/dist/errors/index.cjs +13 -0
- package/dist/errors/index.d.cts +180 -0
- package/dist/errors/index.d.ts +180 -0
- package/dist/errors/index.js +11 -0
- package/dist/events/index.cjs +10 -9
- package/dist/events/index.cjs.map +1 -1
- package/dist/events/index.d.cts +185 -100
- package/dist/events/index.d.ts +185 -100
- package/dist/events/index.js +9 -8
- package/dist/events/index.js.map +1 -1
- package/dist/formatter-ekJQF_bA-BepnCBkQ.cjs +67 -0
- package/dist/formatter-ekJQF_bA-BepnCBkQ.cjs.map +1 -0
- package/dist/formatter-ekJQF_bA-xLD9mGk4.js +55 -0
- package/dist/formatter-ekJQF_bA-xLD9mGk4.js.map +1 -0
- package/dist/formatters/index.cjs +2 -2
- package/dist/formatters/index.d.cts +2 -2
- package/dist/formatters/index.d.ts +2 -2
- package/dist/formatters/index.js +2 -2
- package/dist/{formatters-C6cVZBbG.js → formatters-BAbGsnYA.js} +78 -71
- package/dist/formatters-BAbGsnYA.js.map +1 -0
- package/dist/formatters-zd0Gs4Cs.cjs +436 -0
- package/dist/formatters-zd0Gs4Cs.cjs.map +1 -0
- package/dist/generators/index.cjs +37 -31
- package/dist/generators/index.cjs.map +1 -1
- package/dist/generators/index.d.cts +2 -2
- package/dist/generators/index.d.ts +2 -2
- package/dist/generators/index.js +29 -23
- package/dist/generators/index.js.map +1 -1
- package/dist/hasOwnProp-CVIhlD1i.js +47 -0
- package/dist/hasOwnProp-CVIhlD1i.js.map +1 -0
- package/dist/hasOwnProp-D9Tpgokd.cjs +53 -0
- package/dist/hasOwnProp-D9Tpgokd.cjs.map +1 -0
- package/dist/{index-RNQBTK8A.d.cts → index-9JsU_wMu.d.ts} +1375 -937
- package/dist/{index-ORbo-7zA.d.cts → index-BP3sUrAx.d.ts} +242 -133
- package/dist/{index-BG8wdusZ.d.cts → index-BVovC-yK.d.cts} +229 -200
- package/dist/index-C1X6ha9s.d.cts +1041 -0
- package/dist/index-CcPQZ41G.d.cts +1103 -0
- package/dist/index-CjpbuJF4.d.ts +2424 -0
- package/dist/index-CssrQyHh.d.cts +2424 -0
- package/dist/index-DZHiYYR7.d.cts +2179 -0
- package/dist/index-DZHiYYR7.d.ts +2179 -0
- package/dist/index-DlyDmXUo.d.ts +1103 -0
- package/dist/index-Dm4a___O.d.ts +1041 -0
- package/dist/{index-CRz9rSZL.d.ts → index-Dwduk7ez.d.cts} +1375 -937
- package/dist/{index-DPJ-e2JZ.d.ts → index-I5V6RbZM.d.cts} +1592 -790
- package/dist/{index-B5EBAgmC.d.cts → index-hOqBIL7F.d.ts} +1592 -790
- package/dist/{index-B1VQ6USF.d.ts → index-jyuOZMX7.d.ts} +229 -200
- package/dist/{index-ORbo-7zA.d.ts → index-lI0b7iUz.d.cts} +242 -133
- package/dist/{isBigInt-y7s3rsKc.js → isBigInt-Cez32M69.js} +2 -2
- package/dist/isBigInt-Cez32M69.js.map +1 -0
- package/dist/{isBigInt-BVj0M5pq.cjs → isBigInt-YgpNKTbA.cjs} +2 -2
- package/dist/isBigInt-YgpNKTbA.cjs.map +1 -0
- package/dist/{isEmptyString-BYMz_wt9.js → isEmptyString-C9QLWjx2.js} +4 -4
- package/dist/isEmptyString-C9QLWjx2.js.map +1 -0
- package/dist/{isEmptyString-C8PYNPgw.cjs → isEmptyString-O4TFe1Ao.cjs} +5 -5
- package/dist/isEmptyString-O4TFe1Ao.cjs.map +1 -0
- package/dist/isEmptyValue-CFExALXZ.cjs +54 -0
- package/dist/isEmptyValue-CFExALXZ.cjs.map +1 -0
- package/dist/isEmptyValue-kCjnLjbN.js +36 -0
- package/dist/isEmptyValue-kCjnLjbN.js.map +1 -0
- package/dist/{isFinite-DeDaBDr2.cjs → isFinite-B_hHbDpa.cjs} +6 -6
- package/dist/isFinite-B_hHbDpa.cjs.map +1 -0
- package/dist/{isFinite-BEJFOv6B.js → isFinite-ZvNhyHlF.js} +5 -5
- package/dist/isFinite-ZvNhyHlF.js.map +1 -0
- package/dist/{isInteger-DEDbBGez.js → isInteger-aZgzTTZG.js} +4 -4
- package/dist/isInteger-aZgzTTZG.js.map +1 -0
- package/dist/{isInteger-CQLThJOR.cjs → isInteger-dnc6W63Z.cjs} +4 -4
- package/dist/isInteger-dnc6W63Z.cjs.map +1 -0
- package/dist/isNumber-BCWD4dW0.js +20 -0
- package/dist/isNumber-BCWD4dW0.js.map +1 -0
- package/dist/isNumber-BkzwAe50.cjs +26 -0
- package/dist/isNumber-BkzwAe50.cjs.map +1 -0
- package/dist/isPlainObject-CAe_ElKO.d.cts +331 -0
- package/dist/isPlainObject-CJvRG4Je.d.ts +331 -0
- package/dist/{isServer-q3o6cSwD.js → isServer-CQzrX5e0.js} +2 -2
- package/dist/isServer-CQzrX5e0.js.map +1 -0
- package/dist/{isServer-DmycqWsF.cjs → isServer-DhFaedeT.cjs} +2 -2
- package/dist/isServer-DhFaedeT.cjs.map +1 -0
- package/dist/{isEqual-DaPDxMyw.cjs → isTypedArray-DjADSu8q.cjs} +45 -13
- package/dist/isTypedArray-DjADSu8q.cjs.map +1 -0
- package/dist/{isEqual-DM4S_kWh.js → isTypedArray-DxsPKrLh.js} +29 -9
- package/dist/isTypedArray-DxsPKrLh.js.map +1 -0
- package/dist/{isValidDomain-B8Nukgw0.js → isValidDomain-CDtNOhMc.js} +13 -54
- package/dist/isValidDomain-CDtNOhMc.js.map +1 -0
- package/dist/{isValidDomain-ZbyeGOO9.cjs → isValidDomain-D_x7uNIu.cjs} +16 -69
- package/dist/isValidDomain-D_x7uNIu.cjs.map +1 -0
- package/dist/{assertIsBoolean-CWUs-I5l.js → logger-CLWnKRKE.js} +657 -587
- package/dist/logger-CLWnKRKE.js.map +1 -0
- package/dist/{assertIsBoolean-D41HrTB_.cjs → logger-CUacYy3D.cjs} +658 -612
- package/dist/logger-CUacYy3D.cjs.map +1 -0
- package/dist/{noop-BY43WaoU.cjs → noop-CjEbNsJL.cjs} +2 -2
- package/dist/noop-CjEbNsJL.cjs.map +1 -0
- package/dist/{noop-CjY8xVHv.js → noop-qxrcogt5.js} +2 -2
- package/dist/noop-qxrcogt5.js.map +1 -0
- package/dist/{normalizeSpaces-BhZp0U_6.cjs → normalizeSpaces-D0_Z4qnO.cjs} +6 -9
- package/dist/normalizeSpaces-D0_Z4qnO.cjs.map +1 -0
- package/dist/{normalizeSpaces-BoUDtq5P.js → normalizeSpaces-DAsxzBEQ.js} +4 -7
- package/dist/normalizeSpaces-DAsxzBEQ.js.map +1 -0
- package/dist/operations/index.cjs +152 -22
- package/dist/operations/index.cjs.map +1 -1
- package/dist/operations/index.d.cts +257 -35
- package/dist/operations/index.d.ts +257 -35
- package/dist/operations/index.js +142 -13
- package/dist/operations/index.js.map +1 -1
- package/dist/parsers/index.cjs +2 -2
- package/dist/parsers/index.d.cts +238 -180
- package/dist/parsers/index.d.ts +238 -180
- package/dist/parsers/index.js +2 -2
- package/dist/{parsers-B8KYXIjE.js → parsers-BBAE_xVM.js} +9 -8
- package/dist/parsers-BBAE_xVM.js.map +1 -0
- package/dist/{parsers-B_FPX35n.cjs → parsers-i8WEeMJl.cjs} +10 -9
- package/dist/parsers-i8WEeMJl.cjs.map +1 -0
- package/dist/{parsing-Bfaw85Hd.js → parsing-D9tbKQ0v.js} +3 -3
- package/dist/parsing-D9tbKQ0v.js.map +1 -0
- package/dist/{parsing-BCZGco7n.cjs → parsing-DGjB8cwr.cjs} +4 -4
- package/dist/parsing-DGjB8cwr.cjs.map +1 -0
- package/dist/predicates/index.cjs +43 -43
- package/dist/predicates/index.d.cts +3 -3
- package/dist/predicates/index.d.ts +3 -3
- package/dist/predicates/index.js +14 -14
- package/dist/{predicates-KlyOvBSC.js → predicates-C0dova7l.js} +45 -40
- package/dist/predicates-C0dova7l.js.map +1 -0
- package/dist/{predicates-8y28VrbT.cjs → predicates-Dd7To7B4.cjs} +89 -84
- package/dist/predicates-Dd7To7B4.cjs.map +1 -0
- package/dist/promises/index.cjs +27 -26
- package/dist/promises/index.cjs.map +1 -1
- package/dist/promises/index.d.cts +227 -75
- package/dist/promises/index.d.ts +227 -75
- package/dist/promises/index.js +27 -26
- package/dist/promises/index.js.map +1 -1
- package/dist/{punyCode-DnKi0qjS.cjs → punyCode-DHTLhGdD.cjs} +12 -12
- package/dist/punyCode-DHTLhGdD.cjs.map +1 -0
- package/dist/{punyCode-Dwto1RpA.js → punyCode-Deb1Mrkc.js} +12 -12
- package/dist/punyCode-Deb1Mrkc.js.map +1 -0
- package/dist/{removeSpaces--8NW-HSx.js → removeSpaces-BPnsdRN0.js} +4 -4
- package/dist/removeSpaces-BPnsdRN0.js.map +1 -0
- package/dist/{removeSpaces-CmrrkeXz.cjs → removeSpaces-CN3pxBz_.cjs} +7 -7
- package/dist/removeSpaces-CN3pxBz_.cjs.map +1 -0
- package/dist/rzl-utils.global.js +13 -13
- package/dist/safeJsonParse-D1FLVTEM.cjs +209 -0
- package/dist/safeJsonParse-D1FLVTEM.cjs.map +1 -0
- package/dist/{safeJsonParse-OnUwG2El.js → safeJsonParse-DEVKNDSn.js} +29 -28
- package/dist/safeJsonParse-DEVKNDSn.js.map +1 -0
- package/dist/safeStableStringify-C5HHKUdn.cjs +125 -0
- package/dist/safeStableStringify-C5HHKUdn.cjs.map +1 -0
- package/dist/{safeStableStringify-B2KTTS3r.js → safeStableStringify-DfwxmiWn.js} +20 -13
- package/dist/safeStableStringify-DfwxmiWn.js.map +1 -0
- package/dist/strings/index.cjs +26 -30
- package/dist/strings/index.cjs.map +1 -1
- package/dist/strings/index.d.cts +2 -2
- package/dist/strings/index.d.ts +2 -2
- package/dist/strings/index.js +13 -17
- package/dist/strings/index.js.map +1 -1
- package/dist/tailwind/index.cjs +3 -3
- package/dist/tailwind/index.d.cts +3 -3
- package/dist/tailwind/index.d.ts +3 -3
- package/dist/tailwind/index.js +3 -3
- package/dist/{tailwind-DUuboq52.cjs → tailwind-BG7B0cDs.cjs} +59 -53
- package/dist/tailwind-BG7B0cDs.cjs.map +1 -0
- package/dist/{tailwind-CUdmv-oO.js → tailwind-tJNnFPsF.js} +38 -32
- package/dist/tailwind-tJNnFPsF.js.map +1 -0
- package/dist/{toStringArrayUnRecursive-OOHGazks.js → toStringArrayUnRecursive-D0WbLIRz.js} +9 -9
- package/dist/toStringArrayUnRecursive-D0WbLIRz.js.map +1 -0
- package/dist/toStringArrayUnRecursive-QLoaNX_-.cjs +51 -0
- package/dist/toStringArrayUnRecursive-QLoaNX_-.cjs.map +1 -0
- package/dist/urls/index.cjs +3 -3
- package/dist/urls/index.d.cts +635 -443
- package/dist/urls/index.d.ts +635 -443
- package/dist/urls/index.js +3 -3
- package/dist/{urls-BXT4Krsq.js → urls-EoWslGgg.js} +50 -41
- package/dist/urls-EoWslGgg.js.map +1 -0
- package/dist/urls-NCzPepe2.cjs +308 -0
- package/dist/urls-NCzPepe2.cjs.map +1 -0
- package/package.json +6 -6
- package/dist/assertIsArray-CeXL4xv5.cjs.map +0 -1
- package/dist/assertIsArray-HgzPQIAM.js.map +0 -1
- package/dist/assertIsBoolean-CWUs-I5l.js.map +0 -1
- package/dist/assertIsBoolean-D41HrTB_.cjs.map +0 -1
- package/dist/assertIsString-CY_WkCLr.js.map +0 -1
- package/dist/assertIsString-DUrVt82d.cjs.map +0 -1
- package/dist/conversions-1s7xMBe_.js.map +0 -1
- package/dist/conversions-B3Rf8uId.cjs +0 -446
- package/dist/conversions-B3Rf8uId.cjs.map +0 -1
- package/dist/formatters-C6cVZBbG.js.map +0 -1
- package/dist/formatters-aEAAuzjx.cjs +0 -429
- package/dist/formatters-aEAAuzjx.cjs.map +0 -1
- package/dist/index-CPCt6_Wq.d.cts +0 -765
- package/dist/index-CPCt6_Wq.d.ts +0 -765
- package/dist/index-DBwNa1iO.d.ts +0 -947
- package/dist/index-DPTYOQkn.d.cts +0 -947
- package/dist/index-Dig1fIhZ.d.cts +0 -1716
- package/dist/index-Dig1fIhZ.d.ts +0 -1716
- package/dist/isBigInt-BVj0M5pq.cjs.map +0 -1
- package/dist/isBigInt-y7s3rsKc.js.map +0 -1
- package/dist/isEmptyObject-BsHngDz4.cjs +0 -37
- package/dist/isEmptyObject-BsHngDz4.cjs.map +0 -1
- package/dist/isEmptyObject-DPGR9iPj.js +0 -25
- package/dist/isEmptyObject-DPGR9iPj.js.map +0 -1
- package/dist/isEmptyString-BYMz_wt9.js.map +0 -1
- package/dist/isEmptyString-C8PYNPgw.cjs.map +0 -1
- package/dist/isEmptyValue-BXf7f1jz.cjs +0 -30
- package/dist/isEmptyValue-BXf7f1jz.cjs.map +0 -1
- package/dist/isEmptyValue-D4OHTB3u.js +0 -24
- package/dist/isEmptyValue-D4OHTB3u.js.map +0 -1
- package/dist/isEqual-DM4S_kWh.js.map +0 -1
- package/dist/isEqual-DaPDxMyw.cjs.map +0 -1
- package/dist/isFinite-BEJFOv6B.js.map +0 -1
- package/dist/isFinite-DeDaBDr2.cjs.map +0 -1
- package/dist/isInteger-CQLThJOR.cjs.map +0 -1
- package/dist/isInteger-DEDbBGez.js.map +0 -1
- package/dist/isPlainObject-BwTkj3G0.d.cts +0 -339
- package/dist/isPlainObject-BwTkj3G0.d.ts +0 -339
- package/dist/isServer-DmycqWsF.cjs.map +0 -1
- package/dist/isServer-q3o6cSwD.js.map +0 -1
- package/dist/isTypedArray-BQLbLXsU.cjs +0 -43
- package/dist/isTypedArray-BQLbLXsU.cjs.map +0 -1
- package/dist/isTypedArray-XiBnifLN.js +0 -31
- package/dist/isTypedArray-XiBnifLN.js.map +0 -1
- package/dist/isValidDomain-B8Nukgw0.js.map +0 -1
- package/dist/isValidDomain-ZbyeGOO9.cjs.map +0 -1
- package/dist/noop-BY43WaoU.cjs.map +0 -1
- package/dist/noop-CjY8xVHv.js.map +0 -1
- package/dist/normalizeSpaces-BhZp0U_6.cjs.map +0 -1
- package/dist/normalizeSpaces-BoUDtq5P.js.map +0 -1
- package/dist/parsers-B8KYXIjE.js.map +0 -1
- package/dist/parsers-B_FPX35n.cjs.map +0 -1
- package/dist/parsing-BCZGco7n.cjs.map +0 -1
- package/dist/parsing-Bfaw85Hd.js.map +0 -1
- package/dist/predicates-8y28VrbT.cjs.map +0 -1
- package/dist/predicates-KlyOvBSC.js.map +0 -1
- package/dist/punyCode-DnKi0qjS.cjs.map +0 -1
- package/dist/punyCode-Dwto1RpA.js.map +0 -1
- package/dist/removeSpaces--8NW-HSx.js.map +0 -1
- package/dist/removeSpaces-CmrrkeXz.cjs.map +0 -1
- package/dist/safeJsonParse-OnUwG2El.js.map +0 -1
- package/dist/safeJsonParse-sFqVXf-e.cjs +0 -208
- package/dist/safeJsonParse-sFqVXf-e.cjs.map +0 -1
- package/dist/safeStableStringify-B2KTTS3r.js.map +0 -1
- package/dist/safeStableStringify-Cmi6GyWj.cjs +0 -106
- package/dist/safeStableStringify-Cmi6GyWj.cjs.map +0 -1
- package/dist/tailwind-CUdmv-oO.js.map +0 -1
- package/dist/tailwind-DUuboq52.cjs.map +0 -1
- package/dist/toStringArrayUnRecursive-OOHGazks.js.map +0 -1
- package/dist/toStringArrayUnRecursive-pfk2oP8C.cjs +0 -51
- package/dist/toStringArrayUnRecursive-pfk2oP8C.cjs.map +0 -1
- package/dist/urls-BL9C_yU3.cjs +0 -299
- package/dist/urls-BL9C_yU3.cjs.map +0 -1
- package/dist/urls-BXT4Krsq.js.map +0 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* ========================================================================
|
|
3
3
|
* @rzl-zone/utils-js
|
|
4
4
|
* ------------------------------------------------------------------------
|
|
5
|
-
* Version: `3.
|
|
5
|
+
* Version: `3.14.0-beta.0`
|
|
6
6
|
* Author: `Rizalvin Dwiky <rizalvindwiky@gmail.com>`
|
|
7
7
|
* Repository: `https://github.com/rzl-zone/rzl-zone/tree/main/packages/utils-js`
|
|
8
8
|
* ========================================================================
|
|
@@ -14,9 +14,9 @@ const isBoolean = (value) => {
|
|
|
14
14
|
const isFunction = (value) => {
|
|
15
15
|
return typeof value === "function";
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
const isNil = (value) => {
|
|
18
18
|
return value == null;
|
|
19
|
-
}
|
|
19
|
+
};
|
|
20
20
|
function isArray(value) {
|
|
21
21
|
return Array.isArray(value);
|
|
22
22
|
}
|
|
@@ -31,95 +31,40 @@ function isPlainObject(value) {
|
|
|
31
31
|
const isString = (value) => {
|
|
32
32
|
return typeof value === "string";
|
|
33
33
|
};
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
return typeof value === "number" ? Number.isNaN(value) : isNumberObject(value) && Number.isNaN(value.valueOf());
|
|
39
|
-
}
|
|
40
|
-
const isNull = (val) => val === null;
|
|
41
|
-
function assertIsPlainObject(value, options = {}) {
|
|
42
|
-
if (isPlainObject(value)) return;
|
|
43
|
-
resolveErrorMessageAssertions({
|
|
44
|
-
value,
|
|
45
|
-
options,
|
|
46
|
-
requiredValidType: "plain object"
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
const isNumber = (value, options = {}) => {
|
|
50
|
-
assertIsPlainObject(options, { message: ({ currentType, validType }) => `Second parameter (\`options\`) must be of type \`${validType}\`, but received: \`${currentType}\`.` });
|
|
51
|
-
const includeNaN = isPlainObject(options) && isBoolean(options.includeNaN) ? options.includeNaN : false;
|
|
52
|
-
assertIsBoolean(includeNaN, { message: ({ currentType, validType }) => `Parameter \`includeNaN\` property of the \`options\` (second parameter) must be of type \`${validType}\`, but received: \`${currentType}\`.` });
|
|
53
|
-
const aNumber = typeof value === "number";
|
|
54
|
-
return includeNaN ? aNumber : aNumber && !Number.isNaN(value);
|
|
55
|
-
};
|
|
56
|
-
const isSymbol = (value) => {
|
|
57
|
-
return typeof value === "symbol";
|
|
34
|
+
const isNonEmptyString = (value, options) => {
|
|
35
|
+
if (!isString(value)) return false;
|
|
36
|
+
if (!isPlainObject(options)) options = {};
|
|
37
|
+
return ((isBoolean(options.trim) ? options.trim : true) ? value.trim() : value).length > 0;
|
|
58
38
|
};
|
|
59
|
-
const
|
|
60
|
-
return
|
|
39
|
+
const isNumberObject = (value) => {
|
|
40
|
+
return isObject(value) && Object.prototype.toString.call(value) === "[object Number]";
|
|
61
41
|
};
|
|
62
|
-
|
|
63
|
-
return
|
|
64
|
-
}
|
|
65
|
-
function hasOwnProp(obj, key, options = {}) {
|
|
66
|
-
if (!isString(obj) && !isObjectOrArray(obj) && !isFunction(obj)) return false;
|
|
67
|
-
assertIsPlainObject(options, { message: ({ currentType, validType }) => `Third parameter (\`options\`) must be of type \`${validType}\`, but received: \`${currentType}\`.` });
|
|
68
|
-
const discardUndefined = options.discardUndefined === void 0 ? true : options.discardUndefined;
|
|
69
|
-
const discardNull = options.discardNull === void 0 ? false : options.discardNull;
|
|
70
|
-
assertIsBoolean(discardUndefined, { message: ({ currentType, validType }) => `Parameter \`discardUndefined\` property of the \`options\` (third parameter) must be of type \`${validType}\`, but received: \`${currentType}\`.` });
|
|
71
|
-
assertIsBoolean(discardNull, { message: ({ currentType, validType }) => `Parameter \`discardNull\` property of the \`options\` (third parameter) must be of type \`${validType}\`, but received: \`${currentType}\`.` });
|
|
72
|
-
const path = [];
|
|
73
|
-
if (isString(key) && key.trim().length > 0 || isNumber(key, { includeNaN: true })) (isNumber(key, { includeNaN: true }) ? String(key) : key).split(".").forEach((k) => {
|
|
74
|
-
const bracketMatch = k.match(/^\[(\d+)\]$/);
|
|
75
|
-
const symbolMatch = k.match(/^Symbol\((.+)\)$/);
|
|
76
|
-
if (bracketMatch) path.push(Number(bracketMatch[1]));
|
|
77
|
-
else if (symbolMatch) path.push(Symbol.for(symbolMatch[1]));
|
|
78
|
-
else if (!isNaN(Number(k))) path.push(Number(k));
|
|
79
|
-
else path.push(k);
|
|
80
|
-
});
|
|
81
|
-
else if (isSymbol(key)) path.push(key);
|
|
82
|
-
else return false;
|
|
83
|
-
let current = isString(obj) && obj.trim().length > 0 ? Object(obj) : obj;
|
|
84
|
-
for (const k of path) if (isString(k) && k.trim().length > 0 || isNumber(k, { includeNaN: true })) {
|
|
85
|
-
if (isNull(current) || !Object.prototype.hasOwnProperty.call(current, k)) return false;
|
|
86
|
-
current = current[k];
|
|
87
|
-
} else if (isSymbol(k)) {
|
|
88
|
-
if (isNull(current) || typeof current !== "object" && !isFunction(current)) return false;
|
|
89
|
-
const matched = Object.getOwnPropertySymbols(current).find((s) => s === k || s.description === k.description);
|
|
90
|
-
if (!matched) return false;
|
|
91
|
-
current = current[matched];
|
|
92
|
-
} else return false;
|
|
93
|
-
if (discardUndefined && isUndefined(current)) return false;
|
|
94
|
-
if (discardNull && isNull(current)) return false;
|
|
95
|
-
return true;
|
|
96
|
-
}
|
|
97
|
-
const isNonEmptyString = (value, options = {}) => {
|
|
98
|
-
if (!isString(value)) return false;
|
|
99
|
-
assertIsPlainObject(options, { message: ({ currentType, validType }) => `Second parameter (\`options\`) must be of type \`${validType}\`, but received: \`${currentType}\`.` });
|
|
100
|
-
const trim = hasOwnProp(options, "trim") ? options.trim : true;
|
|
101
|
-
assertIsBoolean(trim, { message: ({ currentType, validType }) => `Parameter \`trim\` property of the \`options\` (second parameter) must be of type \`${validType}\`, but received: \`${currentType}\`.` });
|
|
102
|
-
return (trim ? value.trim() : value).length > 0;
|
|
42
|
+
const isNaN = (value) => {
|
|
43
|
+
return typeof value === "number" ? Number.isNaN(value) : isNumberObject(value) && Number.isNaN(value.valueOf());
|
|
103
44
|
};
|
|
45
|
+
const isNull = (val) => val === null;
|
|
104
46
|
const isError = (error) => {
|
|
105
47
|
return Object.prototype.toString.call(error) === "[object Error]" || error instanceof Error;
|
|
106
48
|
};
|
|
107
49
|
const isBuffer = (value) => {
|
|
108
50
|
return typeof Buffer !== "undefined" && typeof Buffer.isBuffer === "function" && Buffer.isBuffer(value);
|
|
109
51
|
};
|
|
110
|
-
|
|
52
|
+
const isStringObject = (value) => {
|
|
111
53
|
return isObject(value) && Object.prototype.toString.call(value) === "[object String]";
|
|
112
|
-
}
|
|
113
|
-
|
|
54
|
+
};
|
|
55
|
+
const isBooleanObject = (value) => {
|
|
114
56
|
return isObject(value) && Object.prototype.toString.call(value) === "[object Boolean]";
|
|
57
|
+
};
|
|
58
|
+
function isObjectOrArray(value) {
|
|
59
|
+
return isArray(value) || isObject(value);
|
|
115
60
|
}
|
|
116
|
-
|
|
61
|
+
const isInfinityNumber = (value) => {
|
|
117
62
|
if (typeof value === "number" || isNumberObject(value)) {
|
|
118
63
|
const num = Number(value);
|
|
119
64
|
return num === Infinity || num === -Infinity;
|
|
120
65
|
}
|
|
121
66
|
return false;
|
|
122
|
-
}
|
|
67
|
+
};
|
|
123
68
|
function isNonEmptyArray(value) {
|
|
124
69
|
return Array.isArray(value) && value.length > 0;
|
|
125
70
|
}
|
|
@@ -225,515 +170,521 @@ const toPascalCaseSpace = (input, ignoreWord) => {
|
|
|
225
170
|
return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();
|
|
226
171
|
}).join(" ");
|
|
227
172
|
};
|
|
173
|
+
const FIXES_RAW = {
|
|
174
|
+
string: "String",
|
|
175
|
+
number: "Number",
|
|
176
|
+
boolean: "Boolean",
|
|
177
|
+
bigint: "Bigint",
|
|
178
|
+
symbol: "Symbol",
|
|
179
|
+
undefined: "Undefined",
|
|
180
|
+
null: "Null",
|
|
181
|
+
regexp: "Reg Exp",
|
|
182
|
+
reflect: "Reflect",
|
|
183
|
+
proxy: "Proxy",
|
|
184
|
+
atomics: "Atomics",
|
|
185
|
+
array: "Array",
|
|
186
|
+
object: "Object",
|
|
187
|
+
function: "Function",
|
|
188
|
+
arguments: "Arguments",
|
|
189
|
+
asyncfunction: "Async Function",
|
|
190
|
+
generatorfunction: "Generator Function",
|
|
191
|
+
asyncgeneratorfunction: "Async Generator Function",
|
|
192
|
+
generator: "Generator",
|
|
193
|
+
promise: "Promise",
|
|
194
|
+
evalerror: "Eval Error",
|
|
195
|
+
rangeerror: "Range Error",
|
|
196
|
+
referenceerror: "Reference Error",
|
|
197
|
+
syntaxerror: "Syntax Error",
|
|
198
|
+
typeerror: "Type Error",
|
|
199
|
+
urierror: "URI Error",
|
|
200
|
+
aggregateerror: "Aggregate Error",
|
|
201
|
+
error: "Error",
|
|
202
|
+
int8array: "Int 8 Array",
|
|
203
|
+
uint8array: "Uint 8 Array",
|
|
204
|
+
uint8clampedarray: "Uint 8 Clamped Array",
|
|
205
|
+
int16array: "Int 16 Array",
|
|
206
|
+
uint16array: "Uint 16 Array",
|
|
207
|
+
int32array: "Int 32 Array",
|
|
208
|
+
uint32array: "Uint 32 Array",
|
|
209
|
+
float32array: "Float 32 Array",
|
|
210
|
+
float64array: "Float 64 Array",
|
|
211
|
+
bigint64array: "Big Int 64 Array",
|
|
212
|
+
biguint64array: "Big Uint 64 Array",
|
|
213
|
+
arraybuffer: "Array Buffer",
|
|
214
|
+
sharedarraybuffer: "Shared Array Buffer",
|
|
215
|
+
dataview: "Data View",
|
|
216
|
+
arraybufferview: "Array Buffer View",
|
|
217
|
+
map: "Map",
|
|
218
|
+
set: "Set",
|
|
219
|
+
weakmap: "Weak Map",
|
|
220
|
+
weakset: "Weak Set",
|
|
221
|
+
mapiterator: "Map Iterator",
|
|
222
|
+
weakmapiterator: "Weak Map Iterator",
|
|
223
|
+
setiterator: "Set Iterator",
|
|
224
|
+
weaksetiterator: "Weak Set Iterator",
|
|
225
|
+
arrayiterator: "Array Iterator",
|
|
226
|
+
stringiterator: "String Iterator",
|
|
227
|
+
asynciterator: "Async Iterator",
|
|
228
|
+
iteratorresult: "Iterator Result",
|
|
229
|
+
arrayiteratorresult: "Array Iterator Result",
|
|
230
|
+
readablestream: "Readable Stream",
|
|
231
|
+
writablestream: "Writable Stream",
|
|
232
|
+
transformstream: "Transform Stream",
|
|
233
|
+
readablestreamdefaultreader: "Readable Stream Default Reader",
|
|
234
|
+
writablestreamdefaultwriter: "Writable Stream Default Writer",
|
|
235
|
+
readablestreamdefaultcontroller: "Readable Stream Default Controller",
|
|
236
|
+
transformstreamdefaultcontroller: "Transform Stream Default Controller",
|
|
237
|
+
abortcontroller: "Abort Controller",
|
|
238
|
+
abortsignal: "Abort Signal",
|
|
239
|
+
fetch: "fetch",
|
|
240
|
+
request: "Request",
|
|
241
|
+
response: "Response",
|
|
242
|
+
headers: "Headers",
|
|
243
|
+
formdata: "FormData",
|
|
244
|
+
blob: "Blob",
|
|
245
|
+
file: "File",
|
|
246
|
+
filelist: "FileList",
|
|
247
|
+
filereader: "FileReader",
|
|
248
|
+
intl: "Intl",
|
|
249
|
+
collator: "Intl. Collator",
|
|
250
|
+
datetimeformat: "Intl. Date Time Format",
|
|
251
|
+
displaynames: "Intl. Display Names",
|
|
252
|
+
listformat: "Intl. List Format",
|
|
253
|
+
locale: "Intl. Locale",
|
|
254
|
+
numberformat: "Intl. Number Format",
|
|
255
|
+
pluralrules: "Intl. Plural Rules",
|
|
256
|
+
relativetimeformat: "Intl. Relative Time Format",
|
|
257
|
+
segmenter: "Intl. Segmenter",
|
|
258
|
+
weakref: "Weak Ref",
|
|
259
|
+
urlpattern: "URL Pattern",
|
|
260
|
+
structuredclone: "structured Clone",
|
|
261
|
+
finalizationregistry: "Finalization Registry",
|
|
262
|
+
performance: "Performance",
|
|
263
|
+
performanceobserver: "Performance Observer",
|
|
264
|
+
performanceentry: "Performance Entry",
|
|
265
|
+
performancemark: "Performance Mark",
|
|
266
|
+
performancemeasure: "Performance Measure",
|
|
267
|
+
webassembly: "Web Assembly",
|
|
268
|
+
wasmmodule: "WebAssembly. Module",
|
|
269
|
+
wasminstance: "WebAssembly. Instance",
|
|
270
|
+
wasmmemory: "WebAssembly. Memory",
|
|
271
|
+
wasmtable: "WebAssembly. Table",
|
|
272
|
+
buffer: "Buffer",
|
|
273
|
+
process: "Process",
|
|
274
|
+
eventemitter: "Event Emitter",
|
|
275
|
+
stream: "Stream",
|
|
276
|
+
fs: "fs",
|
|
277
|
+
path: "path",
|
|
278
|
+
url: "URL",
|
|
279
|
+
urlsearchparams: "URL Search Params",
|
|
280
|
+
node: "Node",
|
|
281
|
+
element: "Element",
|
|
282
|
+
htmlelement: "HTML Element",
|
|
283
|
+
cdatasection: "CData Section",
|
|
284
|
+
svgelement: "SVG Element",
|
|
285
|
+
document: "Document",
|
|
286
|
+
documentfragment: "Document Fragment",
|
|
287
|
+
shadowroot: "Shadow Root",
|
|
288
|
+
nodelist: "Node List",
|
|
289
|
+
htmlcollection: "HTML Collection",
|
|
290
|
+
resizeobserver: "Resize Observer",
|
|
291
|
+
mutationobserver: "Mutation Observer",
|
|
292
|
+
intersectionobserver: "Intersection Observer",
|
|
293
|
+
symboliterator: "Symbol. Iterator",
|
|
294
|
+
symbolasynciterator: "Symbol. Async Iterator",
|
|
295
|
+
symboltostringtag: "Symbol. To String Tag",
|
|
296
|
+
symbolspecies: "Symbol. Species",
|
|
297
|
+
symbolhasinstance: "Symbol. Has Instance",
|
|
298
|
+
symbolisconcatspreadable: "Symbol. Is Concat Spreadable",
|
|
299
|
+
symbolunscopables: "Symbol. Unscopables",
|
|
300
|
+
symbolmatch: "Symbol. Match",
|
|
301
|
+
symbolreplace: "Symbol. Replace",
|
|
302
|
+
symbolsearch: "Symbol. Search",
|
|
303
|
+
symbolsplit: "Symbol. Split",
|
|
304
|
+
symboltoprimitive: "Symbol. To Primitive",
|
|
305
|
+
symbolmatchall: "Symbol. Match All",
|
|
306
|
+
symbolarguments: "Symbol. Arguments",
|
|
307
|
+
math: "Math",
|
|
308
|
+
bigintconstructor: "Bigint Constructor",
|
|
309
|
+
numberconstructor: "Number Constructor",
|
|
310
|
+
stringconstructor: "String Constructor",
|
|
311
|
+
booleanconstructor: "Boolean Constructor",
|
|
312
|
+
formdataevent: "Form Data Event",
|
|
313
|
+
customevent: "Custom Event",
|
|
314
|
+
messagechannel: "Message Channel",
|
|
315
|
+
messageport: "Message Port",
|
|
316
|
+
messageevent: "Message Event",
|
|
317
|
+
websocket: "Web Socket",
|
|
318
|
+
eventsource: "Event Source",
|
|
319
|
+
indexeddb: "IndexedDB",
|
|
320
|
+
idbrequest: "IDB Request",
|
|
321
|
+
idbtransaction: "IDB Transaction",
|
|
322
|
+
idbobjectstore: "IDB Object Store",
|
|
323
|
+
idbcursor: "IDB Cursor",
|
|
324
|
+
localstorage: "Local Storage",
|
|
325
|
+
sessionstorage: "Session Storage",
|
|
326
|
+
navigator: "Navigator",
|
|
327
|
+
geolocation: "Geolocation",
|
|
328
|
+
clipboard: "Clipboard",
|
|
329
|
+
notification: "Notification",
|
|
330
|
+
canvasrenderingcontext2d: "Canvas Rendering Context 2D",
|
|
331
|
+
offscreencanvas: "Offscreen Canvas",
|
|
332
|
+
webglrenderingcontext: "WebGL Rendering Context",
|
|
333
|
+
webgl2renderingcontext: "WebGL 2 Rendering Context",
|
|
334
|
+
imagebitmaprenderingcontext: "Image Bitmap Rendering Context",
|
|
335
|
+
gpucanvascontext: "GPU Canvas Context",
|
|
336
|
+
imagedata: "Image Data",
|
|
337
|
+
imagebitmap: "Image Bitmap",
|
|
338
|
+
mediastream: "Media Stream",
|
|
339
|
+
mediarecorder: "Media Recorder",
|
|
340
|
+
mediastreamtrack: "Media Stream Track",
|
|
341
|
+
audiocontext: "Audio Context",
|
|
342
|
+
audiobuffer: "Audio Buffer",
|
|
343
|
+
audioworklet: "Audio Worklet",
|
|
344
|
+
worker: "Worker",
|
|
345
|
+
sharedworker: "Shared Worker",
|
|
346
|
+
serviceworker: "Service Worker",
|
|
347
|
+
workerglobalscope: "Worker Global Scope",
|
|
348
|
+
structuredcloneerror: "Structured Clone Error",
|
|
349
|
+
transferable: "Transferable",
|
|
350
|
+
report: "Report",
|
|
351
|
+
console: "Console",
|
|
352
|
+
diagnosticreport: "Diagnostic Report",
|
|
353
|
+
domrect: "DOM Rect",
|
|
354
|
+
dompoint: "DOM Point",
|
|
355
|
+
dommatrix: "DOM Matrix",
|
|
356
|
+
domparser: "DOM Parser",
|
|
357
|
+
xmlhttprequest: "XML HTTP Request",
|
|
358
|
+
customelementregistry: "Custom Element Registry",
|
|
359
|
+
text: "Text",
|
|
360
|
+
comment: "Comment",
|
|
361
|
+
animation: "Animation",
|
|
362
|
+
documenttype: "Document Type",
|
|
363
|
+
characterdata: "Character Data",
|
|
364
|
+
animationevent: "Animation Event",
|
|
365
|
+
customemmetregistry: "Custom Emmet Registry",
|
|
366
|
+
websocketmessageevent: "WebSocket Message Event"
|
|
367
|
+
};
|
|
368
|
+
const FIXES_RAW_DATA = Object.freeze(FIXES_RAW);
|
|
369
|
+
const TYPE_DATA = [
|
|
370
|
+
"-Infinity",
|
|
371
|
+
"Infinity",
|
|
372
|
+
"NaN"
|
|
373
|
+
];
|
|
374
|
+
const SPECIAL_TYPE_DATA = Object.freeze(TYPE_DATA);
|
|
375
|
+
const ACRONYMS = [
|
|
376
|
+
"URI",
|
|
377
|
+
"URL",
|
|
378
|
+
"URN",
|
|
379
|
+
"HTTP",
|
|
380
|
+
"HTTPS",
|
|
381
|
+
"FTP",
|
|
382
|
+
"FTPS",
|
|
383
|
+
"SFTP",
|
|
384
|
+
"SSH",
|
|
385
|
+
"SMTP",
|
|
386
|
+
"POP3",
|
|
387
|
+
"IMAP",
|
|
388
|
+
"WS",
|
|
389
|
+
"WSS",
|
|
390
|
+
"TCP",
|
|
391
|
+
"UDP",
|
|
392
|
+
"IP",
|
|
393
|
+
"ICMP",
|
|
394
|
+
"ARP",
|
|
395
|
+
"RTP",
|
|
396
|
+
"RTSP",
|
|
397
|
+
"SIP",
|
|
398
|
+
"HTML",
|
|
399
|
+
"XHTML",
|
|
400
|
+
"XML",
|
|
401
|
+
"WBR",
|
|
402
|
+
"CSS",
|
|
403
|
+
"SVG",
|
|
404
|
+
"JSON",
|
|
405
|
+
"JSONP",
|
|
406
|
+
"DOM",
|
|
407
|
+
"IDB",
|
|
408
|
+
"DB",
|
|
409
|
+
"RTC",
|
|
410
|
+
"ICE",
|
|
411
|
+
"TLS",
|
|
412
|
+
"SSL",
|
|
413
|
+
"CORS",
|
|
414
|
+
"WASM",
|
|
415
|
+
"CSR",
|
|
416
|
+
"SSR",
|
|
417
|
+
"PWA",
|
|
418
|
+
"DPI",
|
|
419
|
+
"CDN",
|
|
420
|
+
"JS",
|
|
421
|
+
"TS",
|
|
422
|
+
"JSX",
|
|
423
|
+
"TSX",
|
|
424
|
+
"CLI",
|
|
425
|
+
"API",
|
|
426
|
+
"SDK",
|
|
427
|
+
"UI",
|
|
428
|
+
"UX",
|
|
429
|
+
"OS",
|
|
430
|
+
"ID",
|
|
431
|
+
"UUID",
|
|
432
|
+
"PID",
|
|
433
|
+
"NPM",
|
|
434
|
+
"YARN",
|
|
435
|
+
"ESM",
|
|
436
|
+
"CJS",
|
|
437
|
+
"BOM",
|
|
438
|
+
"MVC",
|
|
439
|
+
"MVVM",
|
|
440
|
+
"ORM",
|
|
441
|
+
"DAO",
|
|
442
|
+
"CRUD",
|
|
443
|
+
"FIFO",
|
|
444
|
+
"LIFO",
|
|
445
|
+
"OOP",
|
|
446
|
+
"FP",
|
|
447
|
+
"REPL",
|
|
448
|
+
"CSV",
|
|
449
|
+
"TSV",
|
|
450
|
+
"SQL",
|
|
451
|
+
"YAML",
|
|
452
|
+
"JSON",
|
|
453
|
+
"MD",
|
|
454
|
+
"INI",
|
|
455
|
+
"PDF",
|
|
456
|
+
"XLS",
|
|
457
|
+
"XLSX",
|
|
458
|
+
"RTF",
|
|
459
|
+
"XML",
|
|
460
|
+
"BMP",
|
|
461
|
+
"GIF",
|
|
462
|
+
"PNG",
|
|
463
|
+
"JPEG",
|
|
464
|
+
"WEBP",
|
|
465
|
+
"MP3",
|
|
466
|
+
"MP4",
|
|
467
|
+
"AVI",
|
|
468
|
+
"MOV",
|
|
469
|
+
"FLAC",
|
|
470
|
+
"MKV",
|
|
471
|
+
"WAV",
|
|
472
|
+
"URLSearchParams",
|
|
473
|
+
"XHR",
|
|
474
|
+
"2D",
|
|
475
|
+
"3D",
|
|
476
|
+
"GL",
|
|
477
|
+
"WebGL",
|
|
478
|
+
"TTL",
|
|
479
|
+
"UID",
|
|
480
|
+
"GID",
|
|
481
|
+
"MAC",
|
|
482
|
+
"IP",
|
|
483
|
+
"DNS",
|
|
484
|
+
"DHCP",
|
|
485
|
+
"VPN",
|
|
486
|
+
"LAN",
|
|
487
|
+
"WAN",
|
|
488
|
+
"SSID",
|
|
489
|
+
"IoT",
|
|
490
|
+
"API",
|
|
491
|
+
"SDK",
|
|
492
|
+
"CLI",
|
|
493
|
+
"LTS",
|
|
494
|
+
"EOL",
|
|
495
|
+
"CPU",
|
|
496
|
+
"GPU",
|
|
497
|
+
"RAM",
|
|
498
|
+
"ROM",
|
|
499
|
+
"SSD",
|
|
500
|
+
"HDD",
|
|
501
|
+
"BIOS",
|
|
502
|
+
"USB",
|
|
503
|
+
"PCI",
|
|
504
|
+
"SATA",
|
|
505
|
+
"DIMM",
|
|
506
|
+
"DDR",
|
|
507
|
+
"VGA",
|
|
508
|
+
"HDMI",
|
|
509
|
+
"KVM",
|
|
510
|
+
"ASIC",
|
|
511
|
+
"FPGA",
|
|
512
|
+
"SoC",
|
|
513
|
+
"NAS",
|
|
514
|
+
"SAN",
|
|
515
|
+
"TCP",
|
|
516
|
+
"UDP",
|
|
517
|
+
"IP",
|
|
518
|
+
"MAC",
|
|
519
|
+
"DNS",
|
|
520
|
+
"DHCP",
|
|
521
|
+
"VPN",
|
|
522
|
+
"LAN",
|
|
523
|
+
"WAN",
|
|
524
|
+
"SSID",
|
|
525
|
+
"NAT",
|
|
526
|
+
"QoS",
|
|
527
|
+
"MPLS",
|
|
528
|
+
"BGP",
|
|
529
|
+
"OSPF",
|
|
530
|
+
"ICMP",
|
|
531
|
+
"IGMP",
|
|
532
|
+
"LLDP",
|
|
533
|
+
"ARP",
|
|
534
|
+
"RARP",
|
|
535
|
+
"AES",
|
|
536
|
+
"RSA",
|
|
537
|
+
"OTP",
|
|
538
|
+
"MFA",
|
|
539
|
+
"PKI",
|
|
540
|
+
"VPN",
|
|
541
|
+
"IAM",
|
|
542
|
+
"ACL",
|
|
543
|
+
"CSP",
|
|
544
|
+
"XSS",
|
|
545
|
+
"CSRF",
|
|
546
|
+
"HSTS",
|
|
547
|
+
"WAF",
|
|
548
|
+
"DDoS",
|
|
549
|
+
"IDS",
|
|
550
|
+
"IPS",
|
|
551
|
+
"SOC",
|
|
552
|
+
"SIEM",
|
|
553
|
+
"AWS",
|
|
554
|
+
"GCP",
|
|
555
|
+
"AZURE",
|
|
556
|
+
"CI",
|
|
557
|
+
"CD",
|
|
558
|
+
"K8S",
|
|
559
|
+
"IaC",
|
|
560
|
+
"PaaS",
|
|
561
|
+
"SaaS",
|
|
562
|
+
"IaaS",
|
|
563
|
+
"API",
|
|
564
|
+
"CLI",
|
|
565
|
+
"SDK",
|
|
566
|
+
"REST",
|
|
567
|
+
"SOAP",
|
|
568
|
+
"JSON-RPC",
|
|
569
|
+
"gRPC",
|
|
570
|
+
"ELB",
|
|
571
|
+
"EKS",
|
|
572
|
+
"AKS",
|
|
573
|
+
"FaaS",
|
|
574
|
+
"CaaS",
|
|
575
|
+
"GUI",
|
|
576
|
+
"IDE",
|
|
577
|
+
"FAQ",
|
|
578
|
+
"UX",
|
|
579
|
+
"UI",
|
|
580
|
+
"CLI",
|
|
581
|
+
"API",
|
|
582
|
+
"SDK",
|
|
583
|
+
"LTS",
|
|
584
|
+
"EOL",
|
|
585
|
+
"WYSIWYG",
|
|
586
|
+
"CMS",
|
|
587
|
+
"CRM",
|
|
588
|
+
"GPS",
|
|
589
|
+
"LED",
|
|
590
|
+
"OLED",
|
|
591
|
+
"LCD",
|
|
592
|
+
"RFID",
|
|
593
|
+
"NFC",
|
|
594
|
+
"CPU",
|
|
595
|
+
"GPU",
|
|
596
|
+
"AI",
|
|
597
|
+
"ML",
|
|
598
|
+
"DL",
|
|
599
|
+
"DB",
|
|
600
|
+
"SQL",
|
|
601
|
+
"NoSQL",
|
|
602
|
+
"ORM",
|
|
603
|
+
"JSON",
|
|
604
|
+
"XML",
|
|
605
|
+
"CSV",
|
|
606
|
+
"HTTP",
|
|
607
|
+
"HTTPS",
|
|
608
|
+
"TDD",
|
|
609
|
+
"BDD",
|
|
610
|
+
"CI",
|
|
611
|
+
"CD",
|
|
612
|
+
"QA",
|
|
613
|
+
"SLA",
|
|
614
|
+
"SLO",
|
|
615
|
+
"MTTR",
|
|
616
|
+
"MTBF",
|
|
617
|
+
"UAT",
|
|
618
|
+
"RPA",
|
|
619
|
+
"KPI",
|
|
620
|
+
"OKR",
|
|
621
|
+
"ROI",
|
|
622
|
+
"RFP",
|
|
623
|
+
"SLA",
|
|
624
|
+
"CRM",
|
|
625
|
+
"ERP",
|
|
626
|
+
"PMO",
|
|
627
|
+
"SCRUM",
|
|
628
|
+
"KANBAN",
|
|
629
|
+
"FPS",
|
|
630
|
+
"HDR",
|
|
631
|
+
"VR",
|
|
632
|
+
"AR",
|
|
633
|
+
"3D",
|
|
634
|
+
"2D",
|
|
635
|
+
"MP3",
|
|
636
|
+
"MP4",
|
|
637
|
+
"GIF",
|
|
638
|
+
"PNG",
|
|
639
|
+
"JPEG",
|
|
640
|
+
"SVG",
|
|
641
|
+
"BMP",
|
|
642
|
+
"TIFF",
|
|
643
|
+
"POSIX",
|
|
644
|
+
"NTFS",
|
|
645
|
+
"FAT",
|
|
646
|
+
"EXT",
|
|
647
|
+
"EXT4",
|
|
648
|
+
"APFS",
|
|
649
|
+
"HFS",
|
|
650
|
+
"ISO",
|
|
651
|
+
"HTML",
|
|
652
|
+
"CSS",
|
|
653
|
+
"JS",
|
|
654
|
+
"TS",
|
|
655
|
+
"PHP",
|
|
656
|
+
"SQL",
|
|
657
|
+
"JSON",
|
|
658
|
+
"XML",
|
|
659
|
+
"YAML",
|
|
660
|
+
"BASH",
|
|
661
|
+
"ZSH",
|
|
662
|
+
"JSON",
|
|
663
|
+
"YAML",
|
|
664
|
+
"INI",
|
|
665
|
+
"DOTENV",
|
|
666
|
+
"VM",
|
|
667
|
+
"VMM",
|
|
668
|
+
"VPC",
|
|
669
|
+
"OCI",
|
|
670
|
+
"LXC",
|
|
671
|
+
"Docker",
|
|
672
|
+
"K8S",
|
|
673
|
+
"CRI",
|
|
674
|
+
"CNI"
|
|
675
|
+
];
|
|
676
|
+
const ACRONYMS_DATA = Object.freeze(ACRONYMS);
|
|
228
677
|
var PreciseType = class PreciseType {
|
|
229
|
-
static FIXES_RAW = Object.freeze({
|
|
230
|
-
string: "String",
|
|
231
|
-
number: "Number",
|
|
232
|
-
boolean: "Boolean",
|
|
233
|
-
bigint: "Bigint",
|
|
234
|
-
symbol: "Symbol",
|
|
235
|
-
undefined: "Undefined",
|
|
236
|
-
null: "Null",
|
|
237
|
-
regexp: "Reg Exp",
|
|
238
|
-
reflect: "Reflect",
|
|
239
|
-
proxy: "Proxy",
|
|
240
|
-
atomics: "Atomics",
|
|
241
|
-
array: "Array",
|
|
242
|
-
object: "Object",
|
|
243
|
-
function: "Function",
|
|
244
|
-
arguments: "Arguments",
|
|
245
|
-
asyncfunction: "Async Function",
|
|
246
|
-
generatorfunction: "Generator Function",
|
|
247
|
-
asyncgeneratorfunction: "Async Generator Function",
|
|
248
|
-
generator: "Generator",
|
|
249
|
-
promise: "Promise",
|
|
250
|
-
evalerror: "Eval Error",
|
|
251
|
-
rangeerror: "Range Error",
|
|
252
|
-
referenceerror: "Reference Error",
|
|
253
|
-
syntaxerror: "Syntax Error",
|
|
254
|
-
typeerror: "Type Error",
|
|
255
|
-
urierror: "URI Error",
|
|
256
|
-
aggregateerror: "Aggregate Error",
|
|
257
|
-
error: "Error",
|
|
258
|
-
int8array: "Int 8 Array",
|
|
259
|
-
uint8array: "Uint 8 Array",
|
|
260
|
-
uint8clampedarray: "Uint 8 Clamped Array",
|
|
261
|
-
int16array: "Int 16 Array",
|
|
262
|
-
uint16array: "Uint 16 Array",
|
|
263
|
-
int32array: "Int 32 Array",
|
|
264
|
-
uint32array: "Uint 32 Array",
|
|
265
|
-
float32array: "Float 32 Array",
|
|
266
|
-
float64array: "Float 64 Array",
|
|
267
|
-
bigint64array: "Big Int 64 Array",
|
|
268
|
-
biguint64array: "Big Uint 64 Array",
|
|
269
|
-
arraybuffer: "Array Buffer",
|
|
270
|
-
sharedarraybuffer: "Shared Array Buffer",
|
|
271
|
-
dataview: "Data View",
|
|
272
|
-
arraybufferview: "Array Buffer View",
|
|
273
|
-
map: "Map",
|
|
274
|
-
set: "Set",
|
|
275
|
-
weakmap: "Weak Map",
|
|
276
|
-
weakset: "Weak Set",
|
|
277
|
-
mapiterator: "Map Iterator",
|
|
278
|
-
weakmapiterator: "Weak Map Iterator",
|
|
279
|
-
setiterator: "Set Iterator",
|
|
280
|
-
weaksetiterator: "Weak Set Iterator",
|
|
281
|
-
arrayiterator: "Array Iterator",
|
|
282
|
-
stringiterator: "String Iterator",
|
|
283
|
-
asynciterator: "Async Iterator",
|
|
284
|
-
iteratorresult: "Iterator Result",
|
|
285
|
-
arrayiteratorresult: "Array Iterator Result",
|
|
286
|
-
readablestream: "Readable Stream",
|
|
287
|
-
writablestream: "Writable Stream",
|
|
288
|
-
transformstream: "Transform Stream",
|
|
289
|
-
readablestreamdefaultreader: "Readable Stream Default Reader",
|
|
290
|
-
writablestreamdefaultwriter: "Writable Stream Default Writer",
|
|
291
|
-
readablestreamdefaultcontroller: "Readable Stream Default Controller",
|
|
292
|
-
transformstreamdefaultcontroller: "Transform Stream Default Controller",
|
|
293
|
-
abortcontroller: "Abort Controller",
|
|
294
|
-
abortsignal: "Abort Signal",
|
|
295
|
-
fetch: "fetch",
|
|
296
|
-
request: "Request",
|
|
297
|
-
response: "Response",
|
|
298
|
-
headers: "Headers",
|
|
299
|
-
formdata: "FormData",
|
|
300
|
-
blob: "Blob",
|
|
301
|
-
file: "File",
|
|
302
|
-
filelist: "FileList",
|
|
303
|
-
filereader: "FileReader",
|
|
304
|
-
intl: "Intl",
|
|
305
|
-
collator: "Intl. Collator",
|
|
306
|
-
datetimeformat: "Intl. Date Time Format",
|
|
307
|
-
displaynames: "Intl. Display Names",
|
|
308
|
-
listformat: "Intl. List Format",
|
|
309
|
-
locale: "Intl. Locale",
|
|
310
|
-
numberformat: "Intl. Number Format",
|
|
311
|
-
pluralrules: "Intl. Plural Rules",
|
|
312
|
-
relativetimeformat: "Intl. Relative Time Format",
|
|
313
|
-
segmenter: "Intl. Segmenter",
|
|
314
|
-
weakref: "Weak Ref",
|
|
315
|
-
urlpattern: "URLPattern",
|
|
316
|
-
structuredclone: "structured Clone",
|
|
317
|
-
finalizationregistry: "Finalization Registry",
|
|
318
|
-
performance: "Performance",
|
|
319
|
-
performanceobserver: "Performance Observer",
|
|
320
|
-
performanceentry: "Performance Entry",
|
|
321
|
-
performancemark: "Performance Mark",
|
|
322
|
-
performancemeasure: "Performance Measure",
|
|
323
|
-
webassembly: "Web Assembly",
|
|
324
|
-
wasmmodule: "WebAssembly. Module",
|
|
325
|
-
wasminstance: "WebAssembly. Instance",
|
|
326
|
-
wasmmemory: "WebAssembly. Memory",
|
|
327
|
-
wasmtable: "WebAssembly. Table",
|
|
328
|
-
buffer: "Buffer",
|
|
329
|
-
process: "Process",
|
|
330
|
-
eventemitter: "Event Emitter",
|
|
331
|
-
stream: "Stream",
|
|
332
|
-
fs: "fs",
|
|
333
|
-
path: "path",
|
|
334
|
-
url: "URL",
|
|
335
|
-
urlsearchparams: "URL Search Params",
|
|
336
|
-
node: "Node",
|
|
337
|
-
element: "Element",
|
|
338
|
-
htmlelement: "HTML Element",
|
|
339
|
-
svgelement: "SVG Element",
|
|
340
|
-
document: "Document",
|
|
341
|
-
documentfragment: "Document Fragment",
|
|
342
|
-
shadowroot: "Shadow Root",
|
|
343
|
-
nodelist: "Node List",
|
|
344
|
-
htmlcollection: "HTML Collection",
|
|
345
|
-
resizeobserver: "Resize Observer",
|
|
346
|
-
mutationobserver: "Mutation Observer",
|
|
347
|
-
intersectionobserver: "Intersection Observer",
|
|
348
|
-
symboliterator: "Symbol. Iterator",
|
|
349
|
-
symbolasynciterator: "Symbol. Async Iterator",
|
|
350
|
-
symboltostringtag: "Symbol. To String Tag",
|
|
351
|
-
symbolspecies: "Symbol. Species",
|
|
352
|
-
symbolhasinstance: "Symbol. Has Instance",
|
|
353
|
-
symbolisconcatspreadable: "Symbol. Is Concat Spreadable",
|
|
354
|
-
symbolunscopables: "Symbol. Unscopables",
|
|
355
|
-
symbolmatch: "Symbol. Match",
|
|
356
|
-
symbolreplace: "Symbol. Replace",
|
|
357
|
-
symbolsearch: "Symbol. Search",
|
|
358
|
-
symbolsplit: "Symbol. Split",
|
|
359
|
-
symboltoprimitive: "Symbol. To Primitive",
|
|
360
|
-
symbolmatchall: "Symbol. Match All",
|
|
361
|
-
symbolarguments: "Symbol. Arguments",
|
|
362
|
-
math: "Math",
|
|
363
|
-
bigintconstructor: "Bigint Constructor",
|
|
364
|
-
numberconstructor: "Number Constructor",
|
|
365
|
-
stringconstructor: "String Constructor",
|
|
366
|
-
booleanconstructor: "Boolean Constructor",
|
|
367
|
-
formdataevent: "Form Data Event",
|
|
368
|
-
customevent: "Custom Event",
|
|
369
|
-
messagechannel: "Message Channel",
|
|
370
|
-
messageport: "Message Port",
|
|
371
|
-
messageevent: "Message Event",
|
|
372
|
-
websocket: "Web Socket",
|
|
373
|
-
eventsource: "Event Source",
|
|
374
|
-
indexeddb: "IndexedDB",
|
|
375
|
-
idbrequest: "IDB Request",
|
|
376
|
-
idbtransaction: "IDB Transaction",
|
|
377
|
-
idbobjectstore: "IDB Object Store",
|
|
378
|
-
idbcursor: "IDB Cursor",
|
|
379
|
-
localstorage: "Local Storage",
|
|
380
|
-
sessionstorage: "Session Storage",
|
|
381
|
-
navigator: "Navigator",
|
|
382
|
-
geolocation: "Geolocation",
|
|
383
|
-
clipboard: "Clipboard",
|
|
384
|
-
notification: "Notification",
|
|
385
|
-
canvas: "Canvas",
|
|
386
|
-
canvasrenderingcontext2d: "Canvas Rendering Context 2D",
|
|
387
|
-
offscreencanvas: "Offscreen Canvas",
|
|
388
|
-
webglrenderingcontext: "WebGL Rendering Context",
|
|
389
|
-
imagedata: "Image Data",
|
|
390
|
-
imagebitmap: "Image Bitmap",
|
|
391
|
-
mediastream: "Media Stream",
|
|
392
|
-
mediarecorder: "Media Recorder",
|
|
393
|
-
mediastreamtrack: "Media Stream Track",
|
|
394
|
-
audiocontext: "Audio Context",
|
|
395
|
-
audiobuffer: "Audio Buffer",
|
|
396
|
-
audioworklet: "Audio Worklet",
|
|
397
|
-
worker: "Worker",
|
|
398
|
-
sharedworker: "Shared Worker",
|
|
399
|
-
serviceworker: "Service Worker",
|
|
400
|
-
workerglobalscope: "Worker Global Scope",
|
|
401
|
-
structuredcloneerror: "Structured Clone Error",
|
|
402
|
-
transferable: "Transferable",
|
|
403
|
-
report: "Report",
|
|
404
|
-
console: "Console",
|
|
405
|
-
diagnosticreport: "Diagnostic Report",
|
|
406
|
-
domrect: "DOM Rect",
|
|
407
|
-
dompoint: "DOM Point",
|
|
408
|
-
dommatrix: "DOM Matrix",
|
|
409
|
-
domparser: "DOM Parser",
|
|
410
|
-
xmlhttprequest: "XML HTTP Request",
|
|
411
|
-
customelementregistry: "Custom Element Registry",
|
|
412
|
-
text: "Text",
|
|
413
|
-
comment: "Comment",
|
|
414
|
-
animation: "Animation",
|
|
415
|
-
documenttype: "Document Type",
|
|
416
|
-
characterdata: "Character Data",
|
|
417
|
-
animationevent: "Animation Event",
|
|
418
|
-
customemmetregistry: "Custom Emmet Registry",
|
|
419
|
-
websocketmessageevent: "WebSocket Message Event"
|
|
420
|
-
});
|
|
421
|
-
static SPECIAL_TYPE = Object.freeze([
|
|
422
|
-
"-Infinity",
|
|
423
|
-
"Infinity",
|
|
424
|
-
"NaN"
|
|
425
|
-
]);
|
|
426
|
-
static ACRONYMS = Object.freeze([
|
|
427
|
-
"URI",
|
|
428
|
-
"URL",
|
|
429
|
-
"URN",
|
|
430
|
-
"HTTP",
|
|
431
|
-
"HTTPS",
|
|
432
|
-
"FTP",
|
|
433
|
-
"FTPS",
|
|
434
|
-
"SFTP",
|
|
435
|
-
"SSH",
|
|
436
|
-
"SMTP",
|
|
437
|
-
"POP3",
|
|
438
|
-
"IMAP",
|
|
439
|
-
"WS",
|
|
440
|
-
"WSS",
|
|
441
|
-
"TCP",
|
|
442
|
-
"UDP",
|
|
443
|
-
"IP",
|
|
444
|
-
"ICMP",
|
|
445
|
-
"ARP",
|
|
446
|
-
"RTP",
|
|
447
|
-
"RTSP",
|
|
448
|
-
"SIP",
|
|
449
|
-
"HTML",
|
|
450
|
-
"XHTML",
|
|
451
|
-
"XML",
|
|
452
|
-
"WBR",
|
|
453
|
-
"CSS",
|
|
454
|
-
"SVG",
|
|
455
|
-
"JSON",
|
|
456
|
-
"JSONP",
|
|
457
|
-
"DOM",
|
|
458
|
-
"IDB",
|
|
459
|
-
"DB",
|
|
460
|
-
"RTC",
|
|
461
|
-
"ICE",
|
|
462
|
-
"TLS",
|
|
463
|
-
"SSL",
|
|
464
|
-
"CORS",
|
|
465
|
-
"WASM",
|
|
466
|
-
"CSR",
|
|
467
|
-
"SSR",
|
|
468
|
-
"PWA",
|
|
469
|
-
"DPI",
|
|
470
|
-
"CDN",
|
|
471
|
-
"JS",
|
|
472
|
-
"TS",
|
|
473
|
-
"JSX",
|
|
474
|
-
"TSX",
|
|
475
|
-
"CLI",
|
|
476
|
-
"API",
|
|
477
|
-
"SDK",
|
|
478
|
-
"UI",
|
|
479
|
-
"UX",
|
|
480
|
-
"OS",
|
|
481
|
-
"ID",
|
|
482
|
-
"UUID",
|
|
483
|
-
"PID",
|
|
484
|
-
"NPM",
|
|
485
|
-
"YARN",
|
|
486
|
-
"ESM",
|
|
487
|
-
"CJS",
|
|
488
|
-
"BOM",
|
|
489
|
-
"MVC",
|
|
490
|
-
"MVVM",
|
|
491
|
-
"ORM",
|
|
492
|
-
"DAO",
|
|
493
|
-
"CRUD",
|
|
494
|
-
"FIFO",
|
|
495
|
-
"LIFO",
|
|
496
|
-
"OOP",
|
|
497
|
-
"FP",
|
|
498
|
-
"REPL",
|
|
499
|
-
"CSV",
|
|
500
|
-
"TSV",
|
|
501
|
-
"SQL",
|
|
502
|
-
"YAML",
|
|
503
|
-
"JSON",
|
|
504
|
-
"MD",
|
|
505
|
-
"INI",
|
|
506
|
-
"PDF",
|
|
507
|
-
"XLS",
|
|
508
|
-
"XLSX",
|
|
509
|
-
"RTF",
|
|
510
|
-
"XML",
|
|
511
|
-
"BMP",
|
|
512
|
-
"GIF",
|
|
513
|
-
"PNG",
|
|
514
|
-
"JPEG",
|
|
515
|
-
"WEBP",
|
|
516
|
-
"MP3",
|
|
517
|
-
"MP4",
|
|
518
|
-
"AVI",
|
|
519
|
-
"MOV",
|
|
520
|
-
"FLAC",
|
|
521
|
-
"MKV",
|
|
522
|
-
"WAV",
|
|
523
|
-
"URLSearchParams",
|
|
524
|
-
"XHR",
|
|
525
|
-
"2D",
|
|
526
|
-
"3D",
|
|
527
|
-
"GL",
|
|
528
|
-
"WebGL",
|
|
529
|
-
"TTL",
|
|
530
|
-
"UID",
|
|
531
|
-
"GID",
|
|
532
|
-
"MAC",
|
|
533
|
-
"IP",
|
|
534
|
-
"DNS",
|
|
535
|
-
"DHCP",
|
|
536
|
-
"VPN",
|
|
537
|
-
"LAN",
|
|
538
|
-
"WAN",
|
|
539
|
-
"SSID",
|
|
540
|
-
"IoT",
|
|
541
|
-
"API",
|
|
542
|
-
"SDK",
|
|
543
|
-
"CLI",
|
|
544
|
-
"LTS",
|
|
545
|
-
"EOL",
|
|
546
|
-
"CPU",
|
|
547
|
-
"GPU",
|
|
548
|
-
"RAM",
|
|
549
|
-
"ROM",
|
|
550
|
-
"SSD",
|
|
551
|
-
"HDD",
|
|
552
|
-
"BIOS",
|
|
553
|
-
"USB",
|
|
554
|
-
"PCI",
|
|
555
|
-
"SATA",
|
|
556
|
-
"DIMM",
|
|
557
|
-
"DDR",
|
|
558
|
-
"VGA",
|
|
559
|
-
"HDMI",
|
|
560
|
-
"KVM",
|
|
561
|
-
"ASIC",
|
|
562
|
-
"FPGA",
|
|
563
|
-
"SoC",
|
|
564
|
-
"NAS",
|
|
565
|
-
"SAN",
|
|
566
|
-
"TCP",
|
|
567
|
-
"UDP",
|
|
568
|
-
"IP",
|
|
569
|
-
"MAC",
|
|
570
|
-
"DNS",
|
|
571
|
-
"DHCP",
|
|
572
|
-
"VPN",
|
|
573
|
-
"LAN",
|
|
574
|
-
"WAN",
|
|
575
|
-
"SSID",
|
|
576
|
-
"NAT",
|
|
577
|
-
"QoS",
|
|
578
|
-
"MPLS",
|
|
579
|
-
"BGP",
|
|
580
|
-
"OSPF",
|
|
581
|
-
"ICMP",
|
|
582
|
-
"IGMP",
|
|
583
|
-
"LLDP",
|
|
584
|
-
"ARP",
|
|
585
|
-
"RARP",
|
|
586
|
-
"AES",
|
|
587
|
-
"RSA",
|
|
588
|
-
"OTP",
|
|
589
|
-
"MFA",
|
|
590
|
-
"PKI",
|
|
591
|
-
"VPN",
|
|
592
|
-
"IAM",
|
|
593
|
-
"ACL",
|
|
594
|
-
"CSP",
|
|
595
|
-
"XSS",
|
|
596
|
-
"CSRF",
|
|
597
|
-
"HSTS",
|
|
598
|
-
"WAF",
|
|
599
|
-
"DDoS",
|
|
600
|
-
"IDS",
|
|
601
|
-
"IPS",
|
|
602
|
-
"SOC",
|
|
603
|
-
"SIEM",
|
|
604
|
-
"AWS",
|
|
605
|
-
"GCP",
|
|
606
|
-
"AZURE",
|
|
607
|
-
"CI",
|
|
608
|
-
"CD",
|
|
609
|
-
"K8S",
|
|
610
|
-
"IaC",
|
|
611
|
-
"PaaS",
|
|
612
|
-
"SaaS",
|
|
613
|
-
"IaaS",
|
|
614
|
-
"API",
|
|
615
|
-
"CLI",
|
|
616
|
-
"SDK",
|
|
617
|
-
"REST",
|
|
618
|
-
"SOAP",
|
|
619
|
-
"JSON-RPC",
|
|
620
|
-
"gRPC",
|
|
621
|
-
"ELB",
|
|
622
|
-
"EKS",
|
|
623
|
-
"AKS",
|
|
624
|
-
"FaaS",
|
|
625
|
-
"CaaS",
|
|
626
|
-
"GUI",
|
|
627
|
-
"IDE",
|
|
628
|
-
"FAQ",
|
|
629
|
-
"UX",
|
|
630
|
-
"UI",
|
|
631
|
-
"CLI",
|
|
632
|
-
"API",
|
|
633
|
-
"SDK",
|
|
634
|
-
"LTS",
|
|
635
|
-
"EOL",
|
|
636
|
-
"WYSIWYG",
|
|
637
|
-
"CMS",
|
|
638
|
-
"CRM",
|
|
639
|
-
"GPS",
|
|
640
|
-
"LED",
|
|
641
|
-
"OLED",
|
|
642
|
-
"LCD",
|
|
643
|
-
"RFID",
|
|
644
|
-
"NFC",
|
|
645
|
-
"CPU",
|
|
646
|
-
"GPU",
|
|
647
|
-
"AI",
|
|
648
|
-
"ML",
|
|
649
|
-
"DL",
|
|
650
|
-
"DB",
|
|
651
|
-
"SQL",
|
|
652
|
-
"NoSQL",
|
|
653
|
-
"ORM",
|
|
654
|
-
"JSON",
|
|
655
|
-
"XML",
|
|
656
|
-
"CSV",
|
|
657
|
-
"HTTP",
|
|
658
|
-
"HTTPS",
|
|
659
|
-
"TDD",
|
|
660
|
-
"BDD",
|
|
661
|
-
"CI",
|
|
662
|
-
"CD",
|
|
663
|
-
"QA",
|
|
664
|
-
"SLA",
|
|
665
|
-
"SLO",
|
|
666
|
-
"MTTR",
|
|
667
|
-
"MTBF",
|
|
668
|
-
"UAT",
|
|
669
|
-
"RPA",
|
|
670
|
-
"KPI",
|
|
671
|
-
"OKR",
|
|
672
|
-
"ROI",
|
|
673
|
-
"RFP",
|
|
674
|
-
"SLA",
|
|
675
|
-
"CRM",
|
|
676
|
-
"ERP",
|
|
677
|
-
"PMO",
|
|
678
|
-
"SCRUM",
|
|
679
|
-
"KANBAN",
|
|
680
|
-
"FPS",
|
|
681
|
-
"HDR",
|
|
682
|
-
"VR",
|
|
683
|
-
"AR",
|
|
684
|
-
"3D",
|
|
685
|
-
"2D",
|
|
686
|
-
"MP3",
|
|
687
|
-
"MP4",
|
|
688
|
-
"GIF",
|
|
689
|
-
"PNG",
|
|
690
|
-
"JPEG",
|
|
691
|
-
"SVG",
|
|
692
|
-
"BMP",
|
|
693
|
-
"TIFF",
|
|
694
|
-
"POSIX",
|
|
695
|
-
"NTFS",
|
|
696
|
-
"FAT",
|
|
697
|
-
"EXT",
|
|
698
|
-
"EXT4",
|
|
699
|
-
"APFS",
|
|
700
|
-
"HFS",
|
|
701
|
-
"ISO",
|
|
702
|
-
"HTML",
|
|
703
|
-
"CSS",
|
|
704
|
-
"JS",
|
|
705
|
-
"TS",
|
|
706
|
-
"PHP",
|
|
707
|
-
"SQL",
|
|
708
|
-
"JSON",
|
|
709
|
-
"XML",
|
|
710
|
-
"YAML",
|
|
711
|
-
"BASH",
|
|
712
|
-
"ZSH",
|
|
713
|
-
"JSON",
|
|
714
|
-
"YAML",
|
|
715
|
-
"INI",
|
|
716
|
-
"DOTENV",
|
|
717
|
-
"VM",
|
|
718
|
-
"VMM",
|
|
719
|
-
"VPC",
|
|
720
|
-
"OCI",
|
|
721
|
-
"LXC",
|
|
722
|
-
"Docker",
|
|
723
|
-
"K8S",
|
|
724
|
-
"CRI",
|
|
725
|
-
"CNI"
|
|
726
|
-
]);
|
|
727
|
-
static FIXES_CASTABLE_TABLE = Object.freeze(Object.entries(PreciseType.FIXES_RAW).reduce((acc, [k, v]) => {
|
|
728
|
-
acc[PreciseType.normalizeKeyForCase(k)] = v;
|
|
729
|
-
return acc;
|
|
730
|
-
}, {}));
|
|
731
678
|
formatCase = "toKebabCase";
|
|
732
679
|
useAcronyms = false;
|
|
733
680
|
constructor(params) {
|
|
734
681
|
this.formatCase = params?.formatCase;
|
|
735
682
|
this.useAcronyms = params?.useAcronyms;
|
|
736
683
|
}
|
|
684
|
+
static FIXES_CASTABLE_TABLE = Object.freeze(Object.entries(FIXES_RAW_DATA).reduce((acc, [k, v]) => {
|
|
685
|
+
acc[PreciseType.normalizeKeyForCase(k)] = v;
|
|
686
|
+
return acc;
|
|
687
|
+
}, {}));
|
|
737
688
|
determineOptions(options) {
|
|
738
689
|
return {
|
|
739
690
|
formatCase: options?.formatCase || this.formatCase,
|
|
@@ -747,42 +698,85 @@ var PreciseType = class PreciseType {
|
|
|
747
698
|
const DEFAULTS = {
|
|
748
699
|
a: "Anchor",
|
|
749
700
|
abbr: "Abbreviation",
|
|
701
|
+
acronym: "Acronym",
|
|
750
702
|
address: "Address",
|
|
703
|
+
applet: "Applet",
|
|
751
704
|
area: "Area",
|
|
752
705
|
article: "Article",
|
|
753
706
|
aside: "Aside",
|
|
754
707
|
audio: "Audio",
|
|
755
708
|
b: "Bold",
|
|
756
709
|
base: "Base",
|
|
710
|
+
basefont: "Base Font",
|
|
757
711
|
bdi: "BDI",
|
|
758
712
|
bdo: "BDO",
|
|
713
|
+
big: "Big",
|
|
714
|
+
blink: "Blink",
|
|
759
715
|
blockquote: "Blockquote",
|
|
760
716
|
body: "Body",
|
|
761
717
|
br: "Break",
|
|
762
718
|
button: "Button",
|
|
763
719
|
canvas: "Canvas",
|
|
764
720
|
caption: "Caption",
|
|
721
|
+
center: "Center",
|
|
722
|
+
circle: "Circle",
|
|
765
723
|
cite: "Cite",
|
|
724
|
+
clippath: "Clip Path",
|
|
766
725
|
code: "Code",
|
|
767
726
|
col: "Column",
|
|
768
727
|
colgroup: "Column Group",
|
|
769
728
|
data: "Data",
|
|
770
729
|
datalist: "Datalist",
|
|
771
730
|
dd: "Definition Description",
|
|
731
|
+
defs: "Definitions",
|
|
772
732
|
del: "Deleted Text",
|
|
733
|
+
desc: "Description",
|
|
773
734
|
details: "Details",
|
|
774
735
|
dfn: "Definition",
|
|
775
736
|
dialog: "Dialog",
|
|
737
|
+
dir: "Directory",
|
|
776
738
|
div: "Div",
|
|
777
739
|
dl: "Definition List",
|
|
778
740
|
dt: "Definition Term",
|
|
741
|
+
ellipse: "Ellipse",
|
|
779
742
|
em: "Emphasis",
|
|
780
743
|
embed: "Embed",
|
|
744
|
+
feblend: "Blend Filter",
|
|
745
|
+
fecolormatrix: "Color Matrix Filter",
|
|
746
|
+
fecomponenttransfer: "Component Transfer Filter",
|
|
747
|
+
fecomposite: "Composite Filter",
|
|
748
|
+
feconvolvematrix: "Convolve Matrix Filter",
|
|
749
|
+
fediffuselighting: "Diffuse Lighting Filter",
|
|
750
|
+
fedisplacementmap: "Displacement Map Filter",
|
|
751
|
+
fedistantlight: "Distant Light Filter",
|
|
752
|
+
fedropshadow: "Drop Shadow Filter",
|
|
753
|
+
feflood: "Flood Filter",
|
|
754
|
+
fefunca: "Function A",
|
|
755
|
+
fefuncb: "Function B",
|
|
756
|
+
fefuncg: "Function G",
|
|
757
|
+
fefuncr: "Function R",
|
|
758
|
+
fegaussianblur: "Gaussian Blur Filter",
|
|
759
|
+
feimage: "Image Filter",
|
|
760
|
+
femerge: "Merge Filter",
|
|
761
|
+
femergenode: "Merge Node Filter",
|
|
762
|
+
femorphology: "Morphology Filter",
|
|
763
|
+
feoffset: "Offset Filter",
|
|
764
|
+
fepointlight: "Point Light Filter",
|
|
765
|
+
fespecularlighting: "Specular Lighting Filter",
|
|
766
|
+
fespotlight: "Spot Light Filter",
|
|
767
|
+
fetile: "Tile Filter",
|
|
768
|
+
feturbulence: "Turbulence Filter",
|
|
781
769
|
fieldset: "Fieldset",
|
|
782
770
|
figcaption: "Figcaption",
|
|
783
771
|
figure: "Figure",
|
|
772
|
+
filter: "Filter",
|
|
773
|
+
font: "Font",
|
|
784
774
|
footer: "Footer",
|
|
775
|
+
foreignobject: "Foreign Object",
|
|
785
776
|
form: "Form",
|
|
777
|
+
frame: "Frame",
|
|
778
|
+
frameset: "Frameset",
|
|
779
|
+
g: "Group",
|
|
786
780
|
h1: "Heading 1",
|
|
787
781
|
h2: "Heading 2",
|
|
788
782
|
h3: "Heading 3",
|
|
@@ -798,17 +792,45 @@ var PreciseType = class PreciseType {
|
|
|
798
792
|
img: "Image",
|
|
799
793
|
input: "Input",
|
|
800
794
|
ins: "Inserted Text",
|
|
795
|
+
isindex: "Index",
|
|
801
796
|
kbd: "Keyboard",
|
|
797
|
+
keygen: "Key Generator",
|
|
802
798
|
label: "Label",
|
|
803
799
|
legend: "Legend",
|
|
804
800
|
li: "List Item",
|
|
801
|
+
line: "Line",
|
|
802
|
+
lineargradient: "Linear Gradient",
|
|
805
803
|
link: "Link",
|
|
804
|
+
listing: "Listing",
|
|
806
805
|
main: "Main",
|
|
807
806
|
map: "Map",
|
|
808
807
|
mark: "Mark",
|
|
808
|
+
marker: "Marker",
|
|
809
|
+
marquee: "Marquee",
|
|
810
|
+
mask: "Mask",
|
|
811
|
+
math: "Math",
|
|
812
|
+
menu: "Menu",
|
|
813
|
+
menuitem: "Menu Item",
|
|
809
814
|
meta: "Meta",
|
|
810
815
|
meter: "Meter",
|
|
816
|
+
mfrac: "Math Fraction",
|
|
817
|
+
mi: "Math Identifier",
|
|
818
|
+
mn: "Math Number",
|
|
819
|
+
mo: "Math Operator",
|
|
820
|
+
mroot: "Math Root",
|
|
821
|
+
mrow: "Math Row",
|
|
822
|
+
ms: "Math String",
|
|
823
|
+
msqrt: "Math Square Root",
|
|
824
|
+
msub: "Math Subscript",
|
|
825
|
+
msubsup: "Math Subscript Superscript",
|
|
826
|
+
msup: "Math Superscript",
|
|
827
|
+
mtext: "Math Text",
|
|
828
|
+
multicol: "Multicolumn",
|
|
811
829
|
nav: "Nav",
|
|
830
|
+
nextid: "Next ID",
|
|
831
|
+
nobr: "No Break",
|
|
832
|
+
noembed: "No Embed",
|
|
833
|
+
noframes: "No Frames",
|
|
812
834
|
noscript: "NoScript",
|
|
813
835
|
object: "Object",
|
|
814
836
|
ol: "Ordered List",
|
|
@@ -817,31 +839,50 @@ var PreciseType = class PreciseType {
|
|
|
817
839
|
output: "Output",
|
|
818
840
|
p: "Paragraph",
|
|
819
841
|
param: "Param",
|
|
842
|
+
path: "Path",
|
|
843
|
+
pattern: "Pattern",
|
|
820
844
|
picture: "Picture",
|
|
845
|
+
plaintext: "Plain Text",
|
|
846
|
+
polygon: "Polygon",
|
|
847
|
+
polyline: "Polyline",
|
|
848
|
+
portal: "Portal",
|
|
821
849
|
pre: "Preformatted",
|
|
822
850
|
progress: "Progress",
|
|
823
851
|
q: "Quote",
|
|
852
|
+
radialgradient: "Radial Gradient",
|
|
853
|
+
rb: "Ruby Base",
|
|
854
|
+
rect: "Rectangle",
|
|
824
855
|
rp: "RP",
|
|
825
856
|
rt: "RT",
|
|
857
|
+
rtc: "Ruby Text Container",
|
|
826
858
|
ruby: "Ruby",
|
|
827
859
|
s: "Strikethrough",
|
|
828
860
|
samp: "Sample",
|
|
829
861
|
script: "Script",
|
|
862
|
+
search: "Search",
|
|
830
863
|
section: "Section",
|
|
831
864
|
select: "Select",
|
|
865
|
+
slot: "Slot",
|
|
832
866
|
small: "Small",
|
|
833
867
|
source: "Source",
|
|
868
|
+
spacer: "Spacer",
|
|
834
869
|
span: "Span",
|
|
870
|
+
stop: "Stop",
|
|
871
|
+
strike: "Strike",
|
|
835
872
|
strong: "Strong",
|
|
836
873
|
style: "Style",
|
|
837
874
|
sub: "Subscript",
|
|
838
875
|
summary: "Summary",
|
|
839
876
|
sup: "Superscript",
|
|
877
|
+
svg: "SVG",
|
|
878
|
+
symbol: "Symbol",
|
|
840
879
|
table: "Table",
|
|
841
880
|
tbody: "Table Body",
|
|
842
881
|
td: "Table Data",
|
|
843
882
|
template: "Template",
|
|
883
|
+
text: "SVG Text",
|
|
844
884
|
textarea: "Textarea",
|
|
885
|
+
textpath: "Text Path",
|
|
845
886
|
tfoot: "Table Footer",
|
|
846
887
|
th: "Table Header",
|
|
847
888
|
thead: "Table Head",
|
|
@@ -849,13 +890,19 @@ var PreciseType = class PreciseType {
|
|
|
849
890
|
title: "Title",
|
|
850
891
|
tr: "Table Row",
|
|
851
892
|
track: "Track",
|
|
893
|
+
tspan: "Text Span",
|
|
894
|
+
tt: "Teletype",
|
|
852
895
|
u: "Underline",
|
|
853
896
|
ul: "Unordered List",
|
|
897
|
+
use: "Use",
|
|
854
898
|
var: "Variable",
|
|
855
899
|
video: "Video",
|
|
856
|
-
wbr: "WBR"
|
|
900
|
+
wbr: "WBR",
|
|
901
|
+
xmp: "XMP"
|
|
857
902
|
};
|
|
858
|
-
const
|
|
903
|
+
const normalizeTagName = PreciseType.normalizeKeyForCase(tagName);
|
|
904
|
+
const normalizedName = DEFAULTS[normalizeTagName]?.replace(/^HTML\s+/i, "").replace(/\s+Element$/i, "");
|
|
905
|
+
const displayName = PreciseType.FIXES_CASTABLE_TABLE[normalizeTagName] ?? (normalizedName ? `HTML ${normalizedName} Element` : "HTML Element");
|
|
859
906
|
return this.converter(displayName, {
|
|
860
907
|
formatCase,
|
|
861
908
|
useAcronyms
|
|
@@ -877,6 +924,14 @@ var PreciseType = class PreciseType {
|
|
|
877
924
|
});
|
|
878
925
|
return null;
|
|
879
926
|
}
|
|
927
|
+
getCDataSectionType(value, options) {
|
|
928
|
+
const { formatCase, useAcronyms } = this.determineOptions(options);
|
|
929
|
+
if (value instanceof CDATASection) return this.converter(PreciseType.FIXES_CASTABLE_TABLE[PreciseType.normalizeKeyForCase("cdatasection")] ?? "CDATA Section", {
|
|
930
|
+
formatCase,
|
|
931
|
+
useAcronyms
|
|
932
|
+
});
|
|
933
|
+
return null;
|
|
934
|
+
}
|
|
880
935
|
getOtherNodeType(value, options) {
|
|
881
936
|
const { formatCase, useAcronyms } = this.determineOptions(options);
|
|
882
937
|
if (typeof Node !== "undefined" && value instanceof Node) return this.converter(PreciseType.FIXES_CASTABLE_TABLE[PreciseType.normalizeKeyForCase("node")] ?? "Node", {
|
|
@@ -920,6 +975,9 @@ var PreciseType = class PreciseType {
|
|
|
920
975
|
}) || this.getCommentNodeType(value, {
|
|
921
976
|
formatCase,
|
|
922
977
|
useAcronyms
|
|
978
|
+
}) || this.getCDataSectionType(value, {
|
|
979
|
+
formatCase,
|
|
980
|
+
useAcronyms
|
|
923
981
|
}) || this.getTextNodeType(value, {
|
|
924
982
|
formatCase,
|
|
925
983
|
useAcronyms
|
|
@@ -962,7 +1020,7 @@ var PreciseType = class PreciseType {
|
|
|
962
1020
|
}
|
|
963
1021
|
converter(input, options) {
|
|
964
1022
|
const { formatCase, useAcronyms } = this.determineOptions(options);
|
|
965
|
-
const ignoreWord = useAcronyms ?
|
|
1023
|
+
const ignoreWord = useAcronyms ? ACRONYMS_DATA : [];
|
|
966
1024
|
switch (formatCase) {
|
|
967
1025
|
case "slugify": return slugify(input, ignoreWord);
|
|
968
1026
|
case "toDotCase": return toDotCase(input, ignoreWord);
|
|
@@ -981,18 +1039,18 @@ var PreciseType = class PreciseType {
|
|
|
981
1039
|
return PreciseType.FIXES_CASTABLE_TABLE;
|
|
982
1040
|
}
|
|
983
1041
|
static get specialType() {
|
|
984
|
-
return
|
|
1042
|
+
return SPECIAL_TYPE_DATA;
|
|
985
1043
|
}
|
|
986
1044
|
static get fixesRaw() {
|
|
987
|
-
return
|
|
1045
|
+
return FIXES_RAW_DATA;
|
|
988
1046
|
}
|
|
989
1047
|
static get acronymsList() {
|
|
990
|
-
return
|
|
1048
|
+
return ACRONYMS_DATA;
|
|
991
1049
|
}
|
|
992
1050
|
};
|
|
993
1051
|
const getPreciseType = (() => {
|
|
994
1052
|
const cache = /* @__PURE__ */ new Map();
|
|
995
|
-
const MAX_CACHE_SIZE =
|
|
1053
|
+
const MAX_CACHE_SIZE = 50;
|
|
996
1054
|
return (value, options = {}) => {
|
|
997
1055
|
if (!isPlainObject(options)) options = {};
|
|
998
1056
|
const key = JSON.stringify({
|
|
@@ -1062,7 +1120,7 @@ function resolveErrorMessageAssertions(params) {
|
|
|
1062
1120
|
const defaultMessage = `Parameter input (\`value\`) must be of type \`${validType}\`, but received: \`${currentType}\`.`;
|
|
1063
1121
|
return determineErrorTypeAssertion(errorType, isFunction(message) ? isNonEmptyString(message(messageFnOptions)) ? message(messageFnOptions).trim() : defaultMessage : isNonEmptyString(message) ? message.trim() : defaultMessage);
|
|
1064
1122
|
}
|
|
1065
|
-
const assertIsBoolean = (value, options
|
|
1123
|
+
const assertIsBoolean = (value, options) => {
|
|
1066
1124
|
if (isBoolean(value)) return;
|
|
1067
1125
|
resolveErrorMessageAssertions({
|
|
1068
1126
|
value,
|
|
@@ -1070,16 +1128,28 @@ const assertIsBoolean = (value, options = {}) => {
|
|
|
1070
1128
|
requiredValidType: "boolean"
|
|
1071
1129
|
});
|
|
1072
1130
|
};
|
|
1131
|
+
const PACKAGE_NAME = "@rzl-zone/utils-js";
|
|
1132
|
+
function createMessage(source, message, type) {
|
|
1133
|
+
source = source.trim();
|
|
1134
|
+
message = message.trim();
|
|
1135
|
+
return [
|
|
1136
|
+
type && `[${type}]`,
|
|
1137
|
+
`([${PACKAGE_NAME}]`,
|
|
1138
|
+
"-",
|
|
1139
|
+
`[${source}])`,
|
|
1140
|
+
message
|
|
1141
|
+
].filter(Boolean).join(" ");
|
|
1142
|
+
}
|
|
1073
1143
|
Object.defineProperty(exports, 'assertIsBoolean', {
|
|
1074
1144
|
enumerable: true,
|
|
1075
1145
|
get: function () {
|
|
1076
1146
|
return assertIsBoolean;
|
|
1077
1147
|
}
|
|
1078
1148
|
});
|
|
1079
|
-
Object.defineProperty(exports, '
|
|
1149
|
+
Object.defineProperty(exports, 'createMessage', {
|
|
1080
1150
|
enumerable: true,
|
|
1081
1151
|
get: function () {
|
|
1082
|
-
return
|
|
1152
|
+
return createMessage;
|
|
1083
1153
|
}
|
|
1084
1154
|
});
|
|
1085
1155
|
Object.defineProperty(exports, 'getPreciseType', {
|
|
@@ -1088,12 +1158,6 @@ Object.defineProperty(exports, 'getPreciseType', {
|
|
|
1088
1158
|
return getPreciseType;
|
|
1089
1159
|
}
|
|
1090
1160
|
});
|
|
1091
|
-
Object.defineProperty(exports, 'hasOwnProp', {
|
|
1092
|
-
enumerable: true,
|
|
1093
|
-
get: function () {
|
|
1094
|
-
return hasOwnProp;
|
|
1095
|
-
}
|
|
1096
|
-
});
|
|
1097
1161
|
Object.defineProperty(exports, 'isArray', {
|
|
1098
1162
|
enumerable: true,
|
|
1099
1163
|
get: function () {
|
|
@@ -1166,12 +1230,6 @@ Object.defineProperty(exports, 'isNull', {
|
|
|
1166
1230
|
return isNull;
|
|
1167
1231
|
}
|
|
1168
1232
|
});
|
|
1169
|
-
Object.defineProperty(exports, 'isNumber', {
|
|
1170
|
-
enumerable: true,
|
|
1171
|
-
get: function () {
|
|
1172
|
-
return isNumber;
|
|
1173
|
-
}
|
|
1174
|
-
});
|
|
1175
1233
|
Object.defineProperty(exports, 'isNumberObject', {
|
|
1176
1234
|
enumerable: true,
|
|
1177
1235
|
get: function () {
|
|
@@ -1214,18 +1272,6 @@ Object.defineProperty(exports, 'isStringObject', {
|
|
|
1214
1272
|
return isStringObject;
|
|
1215
1273
|
}
|
|
1216
1274
|
});
|
|
1217
|
-
Object.defineProperty(exports, 'isSymbol', {
|
|
1218
|
-
enumerable: true,
|
|
1219
|
-
get: function () {
|
|
1220
|
-
return isSymbol;
|
|
1221
|
-
}
|
|
1222
|
-
});
|
|
1223
|
-
Object.defineProperty(exports, 'isUndefined', {
|
|
1224
|
-
enumerable: true,
|
|
1225
|
-
get: function () {
|
|
1226
|
-
return isUndefined;
|
|
1227
|
-
}
|
|
1228
|
-
});
|
|
1229
1275
|
Object.defineProperty(exports, 'resolveErrorMessageAssertions', {
|
|
1230
1276
|
enumerable: true,
|
|
1231
1277
|
get: function () {
|
|
@@ -1280,4 +1326,4 @@ Object.defineProperty(exports, 'toSnakeCase', {
|
|
|
1280
1326
|
return toSnakeCase;
|
|
1281
1327
|
}
|
|
1282
1328
|
});
|
|
1283
|
-
//# sourceMappingURL=
|
|
1329
|
+
//# sourceMappingURL=logger-CUacYy3D.cjs.map
|