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