@rzl-zone/utils-js 3.13.1 → 3.14.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.
Files changed (281) hide show
  1. package/README.md +7 -6
  2. package/dist/.references/index.d.cts +2 -1
  3. package/dist/.references/index.d.ts +2 -1
  4. package/dist/AbortError-CgE6QNOR.js +20 -0
  5. package/dist/AbortError-CgE6QNOR.js.map +1 -0
  6. package/dist/AbortError-D54txsmn.cjs +26 -0
  7. package/dist/AbortError-D54txsmn.cjs.map +1 -0
  8. package/dist/{assertIsArray-HgzPQIAM.js → assertIsArray-DmlqnTiq.js} +3 -3
  9. package/dist/assertIsArray-DmlqnTiq.js.map +1 -0
  10. package/dist/{assertIsArray-CeXL4xv5.cjs → assertIsArray-Xx-zlo6O.cjs} +5 -5
  11. package/dist/assertIsArray-Xx-zlo6O.cjs.map +1 -0
  12. package/dist/assertIsPlainObject-CIzDchLs.js +20 -0
  13. package/dist/assertIsPlainObject-CIzDchLs.js.map +1 -0
  14. package/dist/assertIsPlainObject-DYoxHcW5.cjs +26 -0
  15. package/dist/assertIsPlainObject-DYoxHcW5.cjs.map +1 -0
  16. package/dist/{assertIsString-DUrVt82d.cjs → assertIsString-CuPbh3FB.cjs} +6 -6
  17. package/dist/assertIsString-CuPbh3FB.cjs.map +1 -0
  18. package/dist/{assertIsString-CY_WkCLr.js → assertIsString-sgY3ml5f.js} +4 -4
  19. package/dist/assertIsString-sgY3ml5f.js.map +1 -0
  20. package/dist/assertions/index.cjs +14 -12
  21. package/dist/assertions/index.cjs.map +1 -1
  22. package/dist/assertions/index.d.cts +2 -2
  23. package/dist/assertions/index.d.ts +2 -2
  24. package/dist/assertions/index.js +10 -8
  25. package/dist/assertions/index.js.map +1 -1
  26. package/dist/conversions/index.cjs +6 -6
  27. package/dist/conversions/index.d.cts +2 -2
  28. package/dist/conversions/index.d.ts +2 -2
  29. package/dist/conversions/index.js +6 -6
  30. package/dist/{conversions-1s7xMBe_.js → conversions-BkxqYXxy.js} +43 -40
  31. package/dist/conversions-BkxqYXxy.js.map +1 -0
  32. package/dist/conversions-UdMB90xR.cjs +449 -0
  33. package/dist/conversions-UdMB90xR.cjs.map +1 -0
  34. package/dist/errors/index.cjs +13 -0
  35. package/dist/errors/index.d.cts +180 -0
  36. package/dist/errors/index.d.ts +180 -0
  37. package/dist/errors/index.js +11 -0
  38. package/dist/events/index.cjs +10 -9
  39. package/dist/events/index.cjs.map +1 -1
  40. package/dist/events/index.d.cts +185 -100
  41. package/dist/events/index.d.ts +185 -100
  42. package/dist/events/index.js +9 -8
  43. package/dist/events/index.js.map +1 -1
  44. package/dist/formatter-BFgV1HhV-BtIJs2H2.js +55 -0
  45. package/dist/formatter-BFgV1HhV-BtIJs2H2.js.map +1 -0
  46. package/dist/formatter-BFgV1HhV-DyybWSuj.cjs +67 -0
  47. package/dist/formatter-BFgV1HhV-DyybWSuj.cjs.map +1 -0
  48. package/dist/formatters/index.cjs +2 -2
  49. package/dist/formatters/index.d.cts +2 -2
  50. package/dist/formatters/index.d.ts +2 -2
  51. package/dist/formatters/index.js +2 -2
  52. package/dist/formatters-Cjng28nY.cjs +436 -0
  53. package/dist/formatters-Cjng28nY.cjs.map +1 -0
  54. package/dist/{formatters-C6cVZBbG.js → formatters-Dqccnt-p.js} +78 -71
  55. package/dist/formatters-Dqccnt-p.js.map +1 -0
  56. package/dist/generators/index.cjs +37 -31
  57. package/dist/generators/index.cjs.map +1 -1
  58. package/dist/generators/index.d.cts +2 -2
  59. package/dist/generators/index.d.ts +2 -2
  60. package/dist/generators/index.js +29 -23
  61. package/dist/generators/index.js.map +1 -1
  62. package/dist/hasOwnProp-DTWYqy7S.cjs +53 -0
  63. package/dist/hasOwnProp-DTWYqy7S.cjs.map +1 -0
  64. package/dist/hasOwnProp-yVVsxPin.js +47 -0
  65. package/dist/hasOwnProp-yVVsxPin.js.map +1 -0
  66. package/dist/{index-BG8wdusZ.d.cts → index-9Ql1W3gt.d.cts} +229 -200
  67. package/dist/{index-RNQBTK8A.d.cts → index-BD0J8wkE.d.cts} +1374 -936
  68. package/dist/index-BcoUy2oV.d.ts +2424 -0
  69. package/dist/{index-B5EBAgmC.d.cts → index-Bpk3YwGW.d.ts} +1592 -790
  70. package/dist/index-CTMG8cZV.d.ts +1041 -0
  71. package/dist/index-DUBCXPy4.d.cts +1041 -0
  72. package/dist/{index-CRz9rSZL.d.ts → index-DhUTzQ_o.d.ts} +1374 -936
  73. package/dist/{index-B1VQ6USF.d.ts → index-DqYMKSmd.d.ts} +229 -200
  74. package/dist/index-JfwSupYB.d.ts +1103 -0
  75. package/dist/{index-ORbo-7zA.d.cts → index-O2q2f-pu.d.cts} +242 -133
  76. package/dist/{index-DPJ-e2JZ.d.ts → index-VgNZ6ndx.d.cts} +1592 -790
  77. package/dist/{index-ORbo-7zA.d.ts → index-k_rjVRjU.d.ts} +242 -133
  78. package/dist/index-or0oP9i2.d.cts +2179 -0
  79. package/dist/index-or0oP9i2.d.ts +2179 -0
  80. package/dist/index-u4-Euidh.d.cts +1103 -0
  81. package/dist/index-zAqCZxGr.d.cts +2424 -0
  82. package/dist/{isBigInt-y7s3rsKc.js → isBigInt-DdFRCpeE.js} +2 -2
  83. package/dist/isBigInt-DdFRCpeE.js.map +1 -0
  84. package/dist/{isBigInt-BVj0M5pq.cjs → isBigInt-LkCpVJ3E.cjs} +2 -2
  85. package/dist/isBigInt-LkCpVJ3E.cjs.map +1 -0
  86. package/dist/{isEmptyString-BYMz_wt9.js → isEmptyString-B6ubItgT.js} +4 -4
  87. package/dist/isEmptyString-B6ubItgT.js.map +1 -0
  88. package/dist/{isEmptyString-C8PYNPgw.cjs → isEmptyString-Csc5Sf_W.cjs} +5 -5
  89. package/dist/isEmptyString-Csc5Sf_W.cjs.map +1 -0
  90. package/dist/isEmptyValue-h97JT4pD.js +36 -0
  91. package/dist/isEmptyValue-h97JT4pD.js.map +1 -0
  92. package/dist/isEmptyValue-qNOhUBFE.cjs +54 -0
  93. package/dist/isEmptyValue-qNOhUBFE.cjs.map +1 -0
  94. package/dist/{isFinite-DeDaBDr2.cjs → isFinite-CKeuVXbD.cjs} +6 -6
  95. package/dist/isFinite-CKeuVXbD.cjs.map +1 -0
  96. package/dist/{isFinite-BEJFOv6B.js → isFinite-CzYYv-mQ.js} +5 -5
  97. package/dist/isFinite-CzYYv-mQ.js.map +1 -0
  98. package/dist/{isInteger-DEDbBGez.js → isInteger-BtA3flbk.js} +4 -4
  99. package/dist/isInteger-BtA3flbk.js.map +1 -0
  100. package/dist/{isInteger-CQLThJOR.cjs → isInteger-iTok9NaH.cjs} +4 -4
  101. package/dist/isInteger-iTok9NaH.cjs.map +1 -0
  102. package/dist/isNumber-C1mOuBuA.js +20 -0
  103. package/dist/isNumber-C1mOuBuA.js.map +1 -0
  104. package/dist/isNumber-CM1vdNcW.cjs +26 -0
  105. package/dist/isNumber-CM1vdNcW.cjs.map +1 -0
  106. package/dist/isPlainObject-DQoM4DGQ.d.ts +331 -0
  107. package/dist/isPlainObject-Y__iykWN.d.cts +331 -0
  108. package/dist/{isServer-DmycqWsF.cjs → isServer-CWlp2R2N.cjs} +2 -2
  109. package/dist/isServer-CWlp2R2N.cjs.map +1 -0
  110. package/dist/{isServer-q3o6cSwD.js → isServer-Drgyboev.js} +2 -2
  111. package/dist/isServer-Drgyboev.js.map +1 -0
  112. package/dist/{isEqual-DM4S_kWh.js → isTypedArray-BY8CIj3k.js} +29 -9
  113. package/dist/isTypedArray-BY8CIj3k.js.map +1 -0
  114. package/dist/{isEqual-DaPDxMyw.cjs → isTypedArray-DspIjxdk.cjs} +45 -13
  115. package/dist/isTypedArray-DspIjxdk.cjs.map +1 -0
  116. package/dist/{isValidDomain-B8Nukgw0.js → isValidDomain-BPfJEkFk.js} +13 -54
  117. package/dist/isValidDomain-BPfJEkFk.js.map +1 -0
  118. package/dist/{isValidDomain-ZbyeGOO9.cjs → isValidDomain-DUUCoKtD.cjs} +16 -69
  119. package/dist/isValidDomain-DUUCoKtD.cjs.map +1 -0
  120. package/dist/{assertIsBoolean-D41HrTB_.cjs → logger-BXg2xufj.cjs} +658 -612
  121. package/dist/logger-BXg2xufj.cjs.map +1 -0
  122. package/dist/{assertIsBoolean-CWUs-I5l.js → logger-Wxl_Krg6.js} +657 -587
  123. package/dist/logger-Wxl_Krg6.js.map +1 -0
  124. package/dist/{noop-BY43WaoU.cjs → noop-ByxeOveJ.cjs} +2 -2
  125. package/dist/noop-ByxeOveJ.cjs.map +1 -0
  126. package/dist/{noop-CjY8xVHv.js → noop-D8aGbjbP.js} +2 -2
  127. package/dist/noop-D8aGbjbP.js.map +1 -0
  128. package/dist/{normalizeSpaces-BhZp0U_6.cjs → normalizeSpaces-CQ7tZLNG.cjs} +6 -9
  129. package/dist/normalizeSpaces-CQ7tZLNG.cjs.map +1 -0
  130. package/dist/{normalizeSpaces-BoUDtq5P.js → normalizeSpaces-DNUOxp_8.js} +4 -7
  131. package/dist/normalizeSpaces-DNUOxp_8.js.map +1 -0
  132. package/dist/operations/index.cjs +152 -22
  133. package/dist/operations/index.cjs.map +1 -1
  134. package/dist/operations/index.d.cts +257 -35
  135. package/dist/operations/index.d.ts +257 -35
  136. package/dist/operations/index.js +142 -13
  137. package/dist/operations/index.js.map +1 -1
  138. package/dist/parsers/index.cjs +2 -2
  139. package/dist/parsers/index.d.cts +238 -180
  140. package/dist/parsers/index.d.ts +238 -180
  141. package/dist/parsers/index.js +2 -2
  142. package/dist/{parsers-B_FPX35n.cjs → parsers-CJ5tHtqF.cjs} +10 -9
  143. package/dist/parsers-CJ5tHtqF.cjs.map +1 -0
  144. package/dist/{parsers-B8KYXIjE.js → parsers-DMlqliPw.js} +9 -8
  145. package/dist/parsers-DMlqliPw.js.map +1 -0
  146. package/dist/{parsing-BCZGco7n.cjs → parsing-DB_S0WFz.cjs} +4 -4
  147. package/dist/parsing-DB_S0WFz.cjs.map +1 -0
  148. package/dist/{parsing-Bfaw85Hd.js → parsing-DhIQhWpX.js} +3 -3
  149. package/dist/parsing-DhIQhWpX.js.map +1 -0
  150. package/dist/predicates/index.cjs +43 -43
  151. package/dist/predicates/index.d.cts +3 -3
  152. package/dist/predicates/index.d.ts +3 -3
  153. package/dist/predicates/index.js +14 -14
  154. package/dist/{predicates-KlyOvBSC.js → predicates-BzYMbNrZ.js} +45 -40
  155. package/dist/predicates-BzYMbNrZ.js.map +1 -0
  156. package/dist/{predicates-8y28VrbT.cjs → predicates-DDW3etqF.cjs} +89 -84
  157. package/dist/predicates-DDW3etqF.cjs.map +1 -0
  158. package/dist/promises/index.cjs +27 -26
  159. package/dist/promises/index.cjs.map +1 -1
  160. package/dist/promises/index.d.cts +227 -75
  161. package/dist/promises/index.d.ts +227 -75
  162. package/dist/promises/index.js +27 -26
  163. package/dist/promises/index.js.map +1 -1
  164. package/dist/{punyCode-DnKi0qjS.cjs → punyCode-B_VPjG0d.cjs} +12 -12
  165. package/dist/punyCode-B_VPjG0d.cjs.map +1 -0
  166. package/dist/{punyCode-Dwto1RpA.js → punyCode-DsuJbWCl.js} +12 -12
  167. package/dist/punyCode-DsuJbWCl.js.map +1 -0
  168. package/dist/{removeSpaces--8NW-HSx.js → removeSpaces-BF-T_1Yt.js} +4 -4
  169. package/dist/removeSpaces-BF-T_1Yt.js.map +1 -0
  170. package/dist/{removeSpaces-CmrrkeXz.cjs → removeSpaces-BJu-gKps.cjs} +7 -7
  171. package/dist/removeSpaces-BJu-gKps.cjs.map +1 -0
  172. package/dist/rzl-utils.global.js +13 -13
  173. package/dist/safeJsonParse-B5F8XtrZ.cjs +209 -0
  174. package/dist/safeJsonParse-B5F8XtrZ.cjs.map +1 -0
  175. package/dist/{safeJsonParse-OnUwG2El.js → safeJsonParse-DYSkUnhM.js} +29 -28
  176. package/dist/safeJsonParse-DYSkUnhM.js.map +1 -0
  177. package/dist/{safeStableStringify-B2KTTS3r.js → safeStableStringify-CDSYnLUz.js} +20 -13
  178. package/dist/safeStableStringify-CDSYnLUz.js.map +1 -0
  179. package/dist/safeStableStringify-MuBiT-4B.cjs +125 -0
  180. package/dist/safeStableStringify-MuBiT-4B.cjs.map +1 -0
  181. package/dist/strings/index.cjs +26 -30
  182. package/dist/strings/index.cjs.map +1 -1
  183. package/dist/strings/index.d.cts +2 -2
  184. package/dist/strings/index.d.ts +2 -2
  185. package/dist/strings/index.js +13 -17
  186. package/dist/strings/index.js.map +1 -1
  187. package/dist/tailwind/index.cjs +3 -3
  188. package/dist/tailwind/index.d.cts +3 -3
  189. package/dist/tailwind/index.d.ts +3 -3
  190. package/dist/tailwind/index.js +3 -3
  191. package/dist/{tailwind-CUdmv-oO.js → tailwind-BhHULklj.js} +38 -32
  192. package/dist/tailwind-BhHULklj.js.map +1 -0
  193. package/dist/{tailwind-DUuboq52.cjs → tailwind-hx6TIFIL.cjs} +59 -53
  194. package/dist/tailwind-hx6TIFIL.cjs.map +1 -0
  195. package/dist/{toStringArrayUnRecursive-OOHGazks.js → toStringArrayUnRecursive-U-nkEIDs.js} +9 -9
  196. package/dist/toStringArrayUnRecursive-U-nkEIDs.js.map +1 -0
  197. package/dist/toStringArrayUnRecursive-_lJEmBlf.cjs +51 -0
  198. package/dist/toStringArrayUnRecursive-_lJEmBlf.cjs.map +1 -0
  199. package/dist/urls/index.cjs +3 -3
  200. package/dist/urls/index.d.cts +635 -443
  201. package/dist/urls/index.d.ts +635 -443
  202. package/dist/urls/index.js +3 -3
  203. package/dist/{urls-BXT4Krsq.js → urls-BcGIFgfR.js} +50 -41
  204. package/dist/urls-BcGIFgfR.js.map +1 -0
  205. package/dist/urls-DGvZsMSN.cjs +308 -0
  206. package/dist/urls-DGvZsMSN.cjs.map +1 -0
  207. package/package.json +6 -6
  208. package/dist/assertIsArray-CeXL4xv5.cjs.map +0 -1
  209. package/dist/assertIsArray-HgzPQIAM.js.map +0 -1
  210. package/dist/assertIsBoolean-CWUs-I5l.js.map +0 -1
  211. package/dist/assertIsBoolean-D41HrTB_.cjs.map +0 -1
  212. package/dist/assertIsString-CY_WkCLr.js.map +0 -1
  213. package/dist/assertIsString-DUrVt82d.cjs.map +0 -1
  214. package/dist/conversions-1s7xMBe_.js.map +0 -1
  215. package/dist/conversions-B3Rf8uId.cjs +0 -446
  216. package/dist/conversions-B3Rf8uId.cjs.map +0 -1
  217. package/dist/formatters-C6cVZBbG.js.map +0 -1
  218. package/dist/formatters-aEAAuzjx.cjs +0 -429
  219. package/dist/formatters-aEAAuzjx.cjs.map +0 -1
  220. package/dist/index-CPCt6_Wq.d.cts +0 -765
  221. package/dist/index-CPCt6_Wq.d.ts +0 -765
  222. package/dist/index-DBwNa1iO.d.ts +0 -947
  223. package/dist/index-DPTYOQkn.d.cts +0 -947
  224. package/dist/index-Dig1fIhZ.d.cts +0 -1716
  225. package/dist/index-Dig1fIhZ.d.ts +0 -1716
  226. package/dist/isBigInt-BVj0M5pq.cjs.map +0 -1
  227. package/dist/isBigInt-y7s3rsKc.js.map +0 -1
  228. package/dist/isEmptyObject-BsHngDz4.cjs +0 -37
  229. package/dist/isEmptyObject-BsHngDz4.cjs.map +0 -1
  230. package/dist/isEmptyObject-DPGR9iPj.js +0 -25
  231. package/dist/isEmptyObject-DPGR9iPj.js.map +0 -1
  232. package/dist/isEmptyString-BYMz_wt9.js.map +0 -1
  233. package/dist/isEmptyString-C8PYNPgw.cjs.map +0 -1
  234. package/dist/isEmptyValue-BXf7f1jz.cjs +0 -30
  235. package/dist/isEmptyValue-BXf7f1jz.cjs.map +0 -1
  236. package/dist/isEmptyValue-D4OHTB3u.js +0 -24
  237. package/dist/isEmptyValue-D4OHTB3u.js.map +0 -1
  238. package/dist/isEqual-DM4S_kWh.js.map +0 -1
  239. package/dist/isEqual-DaPDxMyw.cjs.map +0 -1
  240. package/dist/isFinite-BEJFOv6B.js.map +0 -1
  241. package/dist/isFinite-DeDaBDr2.cjs.map +0 -1
  242. package/dist/isInteger-CQLThJOR.cjs.map +0 -1
  243. package/dist/isInteger-DEDbBGez.js.map +0 -1
  244. package/dist/isPlainObject-BwTkj3G0.d.cts +0 -339
  245. package/dist/isPlainObject-BwTkj3G0.d.ts +0 -339
  246. package/dist/isServer-DmycqWsF.cjs.map +0 -1
  247. package/dist/isServer-q3o6cSwD.js.map +0 -1
  248. package/dist/isTypedArray-BQLbLXsU.cjs +0 -43
  249. package/dist/isTypedArray-BQLbLXsU.cjs.map +0 -1
  250. package/dist/isTypedArray-XiBnifLN.js +0 -31
  251. package/dist/isTypedArray-XiBnifLN.js.map +0 -1
  252. package/dist/isValidDomain-B8Nukgw0.js.map +0 -1
  253. package/dist/isValidDomain-ZbyeGOO9.cjs.map +0 -1
  254. package/dist/noop-BY43WaoU.cjs.map +0 -1
  255. package/dist/noop-CjY8xVHv.js.map +0 -1
  256. package/dist/normalizeSpaces-BhZp0U_6.cjs.map +0 -1
  257. package/dist/normalizeSpaces-BoUDtq5P.js.map +0 -1
  258. package/dist/parsers-B8KYXIjE.js.map +0 -1
  259. package/dist/parsers-B_FPX35n.cjs.map +0 -1
  260. package/dist/parsing-BCZGco7n.cjs.map +0 -1
  261. package/dist/parsing-Bfaw85Hd.js.map +0 -1
  262. package/dist/predicates-8y28VrbT.cjs.map +0 -1
  263. package/dist/predicates-KlyOvBSC.js.map +0 -1
  264. package/dist/punyCode-DnKi0qjS.cjs.map +0 -1
  265. package/dist/punyCode-Dwto1RpA.js.map +0 -1
  266. package/dist/removeSpaces--8NW-HSx.js.map +0 -1
  267. package/dist/removeSpaces-CmrrkeXz.cjs.map +0 -1
  268. package/dist/safeJsonParse-OnUwG2El.js.map +0 -1
  269. package/dist/safeJsonParse-sFqVXf-e.cjs +0 -208
  270. package/dist/safeJsonParse-sFqVXf-e.cjs.map +0 -1
  271. package/dist/safeStableStringify-B2KTTS3r.js.map +0 -1
  272. package/dist/safeStableStringify-Cmi6GyWj.cjs +0 -106
  273. package/dist/safeStableStringify-Cmi6GyWj.cjs.map +0 -1
  274. package/dist/tailwind-CUdmv-oO.js.map +0 -1
  275. package/dist/tailwind-DUuboq52.cjs.map +0 -1
  276. package/dist/toStringArrayUnRecursive-OOHGazks.js.map +0 -1
  277. package/dist/toStringArrayUnRecursive-pfk2oP8C.cjs +0 -51
  278. package/dist/toStringArrayUnRecursive-pfk2oP8C.cjs.map +0 -1
  279. package/dist/urls-BL9C_yU3.cjs +0 -299
  280. package/dist/urls-BL9C_yU3.cjs.map +0 -1
  281. package/dist/urls-BXT4Krsq.js.map +0 -1
@@ -0,0 +1,331 @@
1
+ /*!
2
+ * ========================================================================
3
+ * @rzl-zone/utils-js
4
+ * ------------------------------------------------------------------------
5
+ * Version: `3.14.0`
6
+ * Author: `Rizalvin Dwiky <rizalvindwiky@gmail.com>`
7
+ * Repository: `https://github.com/rzl-zone/rzl-zone/tree/main/packages/utils-js`
8
+ * ========================================================================
9
+ */
10
+
11
+ import { C as NonPlainObject, _ as IsNever } from "./index-or0oP9i2.js";
12
+ declare const ACRONYMS: readonly ["URI", "URL", "URN", "HTTP", "HTTPS", "FTP", "FTPS", "SFTP", "SSH", "SMTP", "POP3", "IMAP", "WS", "WSS", "TCP", "UDP", "IP", "ICMP", "ARP", "RTP", "RTSP", "SIP", "HTML", "XHTML", "XML", "WBR", "CSS", "SVG", "JSON", "JSONP", "DOM", "IDB", "DB", "RTC", "ICE", "TLS", "SSL", "CORS", "WASM", "CSR", "SSR", "PWA", "DPI", "CDN", "JS", "TS", "JSX", "TSX", "CLI", "API", "SDK", "UI", "UX", "OS", "ID", "UUID", "PID", "NPM", "YARN", "ESM", "CJS", "BOM", "MVC", "MVVM", "ORM", "DAO", "CRUD", "FIFO", "LIFO", "OOP", "FP", "REPL", "CSV", "TSV", "SQL", "YAML", "JSON", "MD", "INI", "PDF", "XLS", "XLSX", "RTF", "XML", "BMP", "GIF", "PNG", "JPEG", "WEBP", "MP3", "MP4", "AVI", "MOV", "FLAC", "MKV", "WAV", "URLSearchParams", "XHR", "2D", "3D", "GL", "WebGL", "TTL", "UID", "GID", "MAC", "IP", "DNS", "DHCP", "VPN", "LAN", "WAN", "SSID", "IoT", "API", "SDK", "CLI", "LTS", "EOL", "CPU", "GPU", "RAM", "ROM", "SSD", "HDD", "BIOS", "USB", "PCI", "SATA", "DIMM", "DDR", "VGA", "HDMI", "KVM", "ASIC", "FPGA", "SoC", "NAS", "SAN", "TCP", "UDP", "IP", "MAC", "DNS", "DHCP", "VPN", "LAN", "WAN", "SSID", "NAT", "QoS", "MPLS", "BGP", "OSPF", "ICMP", "IGMP", "LLDP", "ARP", "RARP", "AES", "RSA", "OTP", "MFA", "PKI", "VPN", "IAM", "ACL", "CSP", "XSS", "CSRF", "HSTS", "WAF", "DDoS", "IDS", "IPS", "SOC", "SIEM", "AWS", "GCP", "AZURE", "CI", "CD", "K8S", "IaC", "PaaS", "SaaS", "IaaS", "API", "CLI", "SDK", "REST", "SOAP", "JSON-RPC", "gRPC", "ELB", "EKS", "AKS", "FaaS", "CaaS", "GUI", "IDE", "FAQ", "UX", "UI", "CLI", "API", "SDK", "LTS", "EOL", "WYSIWYG", "CMS", "CRM", "GPS", "LED", "OLED", "LCD", "RFID", "NFC", "CPU", "GPU", "AI", "ML", "DL", "DB", "SQL", "NoSQL", "ORM", "JSON", "XML", "CSV", "HTTP", "HTTPS", "TDD", "BDD", "CI", "CD", "QA", "SLA", "SLO", "MTTR", "MTBF", "UAT", "RPA", "KPI", "OKR", "ROI", "RFP", "SLA", "CRM", "ERP", "PMO", "SCRUM", "KANBAN", "FPS", "HDR", "VR", "AR", "3D", "2D", "MP3", "MP4", "GIF", "PNG", "JPEG", "SVG", "BMP", "TIFF", "POSIX", "NTFS", "FAT", "EXT", "EXT4", "APFS", "HFS", "ISO", "HTML", "CSS", "JS", "TS", "PHP", "SQL", "JSON", "XML", "YAML", "BASH", "ZSH", "JSON", "YAML", "INI", "DOTENV", "VM", "VMM", "VPC", "OCI", "LXC", "Docker", "K8S", "CRI", "CNI"];
13
+ /** ----------------------------------------------------------
14
+ * * ***List of acronyms to keep uppercase in formatted output.***
15
+ * -----------------------------------------------------------
16
+ *
17
+ * - **Behavior:**
18
+ * - Prevents transformations (like camelCase or kebab-case) from altering
19
+ * known acronyms such as `HTML`, `URL`, `API`, etc.
20
+ * - Extend this list if you want more acronyms to remain uppercase.
21
+ *
22
+ * ---
23
+ * - **⚠️ Internal:**
24
+ * - Used internally by {@link getPreciseType | `getPreciseType`} and related formatters.
25
+ */
26
+ declare const ACRONYMS_DATA: Readonly<typeof ACRONYMS>;
27
+ /** ---------------------------------------------------------------------------
28
+ * * ***Options for controlling how {@link getPreciseType | `getPreciseType`} formats and normalizes detected types.***
29
+ * ----------------------------------------------------------------------------
30
+ * These options customize the string transformation behavior and acronym handling
31
+ * when converting JavaScript type names to human-readable strings.
32
+ */
33
+ type GetPreciseTypeOptions = {
34
+ /** -------------------------------------------------------
35
+ * * ***Specifies the format in which the returned string type should be transformed.***
36
+ * --------------------------------------------------------
37
+ * **ℹ️ For special string literals in `SPECIAL_CASES` (`"-Infinity" | "Infinity" | "NaN"`), which will remain unchanged.**
38
+ *
39
+ * ---
40
+ * - #### Supported formats:
41
+ * - `"toKebabCase"` (default) — words separated by hyphens.
42
+ * - ➔ `"result-example-type"`.
43
+ * - `"toLowerCase"` - converts all letters to lowercase.
44
+ * - ➔ `"result example type"`.
45
+ * - `"toDotCase"` — words separated by dots.
46
+ * - ➔ `"result.example.type"`.
47
+ * - `"toCamelCase"` — first word lowercase, subsequent words capitalized.
48
+ * - ➔ `"resultExampleType"`.
49
+ * - `"toSnakeCase"` — words separated by underscores.
50
+ * - ➔ `"result_example_type"`.
51
+ * - `"toPascalCase"` — all words capitalized, no spaces.
52
+ * - ➔ `"ResultExampleType"`.
53
+ * - `"toPascalCaseSpace"` — all words capitalized with spaces between words.
54
+ * - ➔ `"Result Example Type"`.
55
+ * - `"slugify"` — URL-friendly slug (lowercase with hyphens).
56
+ * - ➔ `"result-example-type"`.
57
+ *
58
+ * ---
59
+ * @default
60
+ * ```ts
61
+ * "toKebabCase"
62
+ * ```
63
+ *
64
+ * ---
65
+ * @note
66
+ * ⚠️ If an invalid value is provided, the function will automatically fallback to the default `"toKebabCase"`.
67
+ */
68
+ formatCase?: "toPascalCaseSpace" | "toPascalCase" | "toCamelCase" | "toKebabCase" | "toSnakeCase" | "toDotCase" | "slugify" | "toLowerCase";
69
+ /** -------------------------------------------------------
70
+ * * ***Control uppercase preservation of recognized acronyms during formatting.***
71
+ * --------------------------------------------------------
72
+ * When enabled (`true`), common technical acronyms (e.g., `"URL"`, `"HTTP"`, `"HTML"`, `"SVG"`, `"XML"`, `"DOM"`)
73
+ * are preserved in their original uppercase form instead of being lowercased or altered by case-formatting utilities.
74
+ *
75
+ * ---
76
+ * ---
77
+ * @description
78
+ * The list of recognized acronyms is defined in {@link AcronymsList | **`AcronymsList`**},
79
+ * including entries like `"URL"`, `"HTTP"`, `"HTML"`, `"SVG"`, `"XML"`, `"DOM"`, and others.
80
+ *
81
+ * ---
82
+ * - ***Behavior:***
83
+ * - #### When `false` (default):
84
+ * - Acronyms are treated as normal words and formatted according to the selected `formatCase`.
85
+ * - Example:
86
+ * - `HTMLDivElement` ➔ `"html-div-element"` (with `"toKebabCase"`).
87
+ * - `DOMParser` ➔ `"dom-parser"`.
88
+ *
89
+ * ---
90
+ *
91
+ * - #### When `true`:
92
+ * - Acronyms remain uppercase.
93
+ * - Example:
94
+ * - `HTMLDivElement` ➔ `"HTML-div-element"` (with `"toKebabCase"`).
95
+ * - `DOMParser` ➔ `"DOM-parser"`.
96
+ *
97
+ * ---
98
+ * @default
99
+ * ```ts
100
+ * false
101
+ * ```
102
+ *
103
+ * ---
104
+ * @note
105
+ * ⚠️ This option affects **formatting output only**, not the underlying type detection, acronym preservation is applied **after** detecting and formatting the base type name.
106
+ */
107
+ useAcronyms?: boolean;
108
+ };
109
+ /** ---------------------------------------------------------------------------
110
+ * * ***Type alias for the list of common acronyms preserved in uppercase.***
111
+ * ----------------------------------------------------------------------------
112
+ *
113
+ * Use this type to reference the full set of recognized acronyms
114
+ * used internally by the {@link getPreciseType | **`getPreciseType`**} function for formatting purposes.
115
+ */
116
+ type AcronymsList = typeof ACRONYMS_DATA;
117
+ /** ----------------------------------------------------------
118
+ * * ***Utility-Predicate: `getPreciseType`.***
119
+ * -----------------------------------------------------------
120
+ * **Returns a detailed and normalized type string for the given value.**
121
+ *
122
+ * ---
123
+ * @description
124
+ * The returned string is human-readable ***toKebabCase*** with spaces ***(by default)*** or formatted according to the `options.formatCase` setting.
125
+ * - **Handles:**
126
+ * - Primitives (`string`, `number`, `boolean`, `null`, `undefined`, `symbol`, `bigint`).
127
+ * - Built-in objects (`Array`, `Map`, `Set`, `Error subclasses`, `Typed Arrays`, `etc`).
128
+ * - Objects created with `Object.create(null)`.
129
+ * - Objects wrapper (`new String`, `new Number`, `new Boolean`).
130
+ * - DOM Node type (may not be fully accurate outside the browser environment).
131
+ * - Generator instances.
132
+ * - Node.js `Buffer` instances.
133
+ * - Proxy detection (returns `"Proxy"` if detected; detection ***is not 100% accurate***).
134
+ * - Uses cached mapping table (`FIXES_CASTABLE_TABLE`) for known types to provide consistent naming.
135
+ * - Falls back to constructor name or `Object.prototype.toString` tag.
136
+ *
137
+ * ---
138
+ * @param {*} value - The value to detect the precise type of.
139
+ * @param {GetPreciseTypeOptions} [options] - Optional configuration.
140
+ * @param {GetPreciseTypeOptions["formatCase"]} [options.formatCase="toLowerCase"]
141
+ * Specifies how the returned type string should be formatted.
142
+ * - ⚠️ Special string literals in `SPECIAL_CASES`
143
+ * (`"-Infinity" | "Infinity" | "NaN"`) will remain
144
+ * unchanged even if a different `formatCase` is applied.
145
+ * @param {boolean} [options.useAcronyms=false]
146
+ * Control uppercase preservation of recognized acronyms during formatting.
147
+ * - When `true`, recognized acronyms such as `"URL"`, `"HTTP"`, `"HTML"`, `"SVG"`, `"XML"`, and `"DOM"`
148
+ * are preserved in uppercase instead of being lowercased or otherwise transformed.
149
+ * - When `false` (default), acronyms are formatted like regular words according to `formatCase`.
150
+ * - ⚠️ This option affects **formatting output only**, not type detection.
151
+ *
152
+ * ---
153
+ * @returns {string} The normalized and formatted type string.
154
+ *
155
+ * ---
156
+ * @example
157
+ * 1. #### Basic Usage:
158
+ * ```ts
159
+ * getPreciseType(123);
160
+ * // ➔ "number"
161
+ * getPreciseType(null);
162
+ * // ➔ "null"
163
+ * getPreciseType(/regex/);
164
+ * // ➔ "reg-exp"
165
+ * getPreciseType(/regex/, { formatCase: "toPascalCase" });
166
+ * // ➔ "RegExp"
167
+ * getPreciseType(function* () {}, { formatCase: "toCamelCase" });
168
+ * // ➔ "generatorFunction"
169
+ * getPreciseType(async function () {}, { formatCase: "toPascalCaseSpace" });
170
+ * // ➔ "Async Function"
171
+ * ```
172
+ * ---
173
+ * 2. #### `SPECIAL_CASES` remain:
174
+ * ```ts
175
+ * getPreciseType(NaN, { formatCase: "toLowerCase" });
176
+ * // ➔ "NaN"
177
+ * getPreciseType(Infinity, { formatCase: "toLowerCase" });
178
+ * // ➔ "Infinity"
179
+ * getPreciseType(-Infinity, { formatCase: "toLowerCase" });
180
+ * // ➔ "-Infinity"
181
+ * ```
182
+ * ---
183
+ * 3. #### `Acronym` usage examples:
184
+ * ```ts
185
+ * getPreciseType(new URL("https://example.com"));
186
+ * // ➔ "url"
187
+ * getPreciseType(new URL("https://example.com"), { useAcronyms: true });
188
+ * // ➔ "URL"
189
+ * getPreciseType(new URLSearchParams, { formatCase: "toPascalCase" });
190
+ * // ➔ "UrlSearchParams"
191
+ * getPreciseType(new URLSearchParams, { formatCase: "toPascalCase", useAcronyms: true });
192
+ * // ➔ "URLSearchParams"
193
+ * ```
194
+ */
195
+ declare const getPreciseType: (value: unknown, options?: GetPreciseTypeOptions) => string;
196
+ type IsNumberOptions = {
197
+ /** ---------------------------------------------------------
198
+ * * ***If set to `true`, `NaN` will be considered a valid number, defaultValue: `false`.***
199
+ * ----------------------------------------------------------
200
+ *
201
+ * @default false
202
+ */
203
+ includeNaN?: boolean;
204
+ };
205
+ /** ---------------------------------------------------------
206
+ * * ***Type guard: `isNumber`.***
207
+ * ----------------------------------------------------------
208
+ * **Checks if a value is of type **`number`**.**
209
+ *
210
+ * ---
211
+ * - #### *Behavior:*
212
+ * - Uses `typeof value === "number"`.
213
+ * - By default, excludes **`NaN`**.
214
+ * - If `options.includeNaN` is `true`, then **`NaN`** is also considered valid.
215
+ * - Still considers `Infinity` and `-Infinity` as **numbers** (consistent with JavaScript).
216
+ *
217
+ * ---
218
+ * - #### *Note:*
219
+ * - To exclude `Infinity` and `-Infinity`, use **{@link isFinite | `isFinite`}** instead.
220
+ *
221
+ * ---
222
+ * @param {*} value - The value to check.
223
+ * @param {IsNumberOptions} [options] - Optional settings.
224
+ * @param {boolean} [options.includeNaN=false] If `true`, `NaN` will be considered a valid number, defaults to `false`, which excludes `NaN`.
225
+ *
226
+ * ---
227
+ * @returns {boolean} Returns `true` if the value is a number (and depending on `includeNaN`, `NaN` is included or excluded).
228
+ *
229
+ * ---
230
+ * @example
231
+ * isNumber(42);
232
+ * // ➔ true
233
+ * isNumber(Infinity);
234
+ * // ➔ true
235
+ * isNumber(-Infinity);
236
+ * // ➔ true
237
+ * isNumber(NaN);
238
+ * // ➔ false (default)
239
+ * isNumber(NaN, { includeNaN: true });
240
+ * // ➔ true
241
+ * isNumber("42");
242
+ * // ➔ false
243
+ */
244
+ declare const isNumber: (value: unknown, options?: IsNumberOptions) => value is number;
245
+ type ArrayFallback<T> = IsNever<Extract<T, unknown[] | readonly unknown[]>> extends true ? T & unknown[] : Extract<T, unknown[] | readonly unknown[]>;
246
+ type IsHasKeysObject<T> = keyof T extends never ? false : true;
247
+ /** ----------------------------------------------------------
248
+ * * ***Utility type: `IsPlainObjectResult`.***
249
+ * -----------------------------------------------------------
250
+ * **Represents the inferred type after asserting a value is a **plain object**.**
251
+ *
252
+ * ---
253
+ * - **Behavior:**
254
+ * - If `T` is `unknown`, the resulting type is `Record<PropertyKey, unknown> & T`.
255
+ * - If `T` is an object:
256
+ * - If it is a non-plain object (class instance, built-in object, etc.), the result is `never`.
257
+ * - If it has no keys (`IsHasKeysObject<T>` checked by **{@link IsHasKeysObject|`IsHasKeysObject`}** is false), the result is `Record<PropertyKey, unknown> & T`.
258
+ * - Otherwise, the result is `T` itself.
259
+ * - For any other types, the result is `never`.
260
+ *
261
+ * ---
262
+ * @template T - The input type to be asserted as a plain object.
263
+ *
264
+ * ---
265
+ * @example
266
+ * ```ts
267
+ * type A = IsPlainObjectResult<unknown>;
268
+ * // ➔ Record<PropertyKey, unknown> & unknown
269
+ * type B = IsPlainObjectResult<{}>;
270
+ * // ➔ Record<PropertyKey, unknown> & {}
271
+ * type C = IsPlainObjectResult<{ foo: string }>;
272
+ * // ➔ { foo: string }
273
+ * type D = IsPlainObjectResult<Date>;
274
+ * // ➔ never
275
+ * ```
276
+ */
277
+ type IsPlainObjectResult<T> = unknown extends T ? Record<PropertyKey, unknown> & T : T extends object ? T extends NonPlainObject ? never : IsHasKeysObject<T> extends false ? Record<PropertyKey, unknown> & T : T : Extract<T, Record<PropertyKey, unknown>>;
278
+ /** ----------------------------------------------------------
279
+ * * ***Type guard: `isPlainObject`.***
280
+ * -----------------------------------------------------------
281
+ * **Checks if a value is a **plain-object**.**
282
+ *
283
+ * - #### A plain object is:
284
+ * - Created by the `Object` constructor, or.
285
+ * - Has a `[[Prototype]]` of `null` (e.g. `Object.create(null)`).
286
+ * ---
287
+ * - #### *Behavior:*
288
+ * - #### Returns `true` for:
289
+ * - Empty object literals: `{}`.
290
+ * - Objects with null prototype: `Object.create(null)`.
291
+ * ---
292
+ * - #### Returns `false` for:
293
+ * - Arrays (`[]`, `new Array()`).
294
+ * - Functions (regular, arrow, or class constructors).
295
+ * - Built-in objects: `Date`, `RegExp`, `Error`, `Map`, `Set`, `WeakMap`, `WeakSet`.
296
+ * - Boxed primitives: `new String()`, `new Number()`, `new Boolean()`.
297
+ * - `null` or `undefined`.
298
+ * - Symbols.
299
+ * - Class instances.
300
+ *
301
+ * ---
302
+ * @template T - The type of the value being checked.
303
+ *
304
+ * ---
305
+ * @param {*} value - The value to check.
306
+ *
307
+ * ---
308
+ * @returns {boolean} Return `true` if `value` is a `plain-object`, otherwise `false`.
309
+ *
310
+ * ---
311
+ * @example
312
+ * isPlainObject({});
313
+ * // ➔ true
314
+ * isPlainObject(Object.create(null));
315
+ * // ➔ true
316
+ * isPlainObject(null);
317
+ * // ➔ false
318
+ * isPlainObject(() => {});
319
+ * // ➔ false
320
+ * isPlainObject([1, 2, 3]);
321
+ * // ➔ false
322
+ * isPlainObject(new Date());
323
+ * // ➔ false
324
+ * isPlainObject(new MyClass());
325
+ * // ➔ false
326
+ * isPlainObject(new String("x"));
327
+ * // ➔ false
328
+ */
329
+ declare function isPlainObject<T>(value: T): value is IsPlainObjectResult<T>;
330
+ declare function isPlainObject<T>(value: T): value is NonNullable<Extract<T, Record<PropertyKey, unknown>>>;
331
+ export { IsNumberOptions as a, GetPreciseTypeOptions as c, ArrayFallback as i, getPreciseType as l, isPlainObject as n, isNumber as o, IsHasKeysObject as r, AcronymsList as s, IsPlainObjectResult as t };
@@ -0,0 +1,331 @@
1
+ /*!
2
+ * ========================================================================
3
+ * @rzl-zone/utils-js
4
+ * ------------------------------------------------------------------------
5
+ * Version: `3.14.0`
6
+ * Author: `Rizalvin Dwiky <rizalvindwiky@gmail.com>`
7
+ * Repository: `https://github.com/rzl-zone/rzl-zone/tree/main/packages/utils-js`
8
+ * ========================================================================
9
+ */
10
+
11
+ import { C as NonPlainObject, _ as IsNever } from "./index-or0oP9i2.cjs";
12
+ declare const ACRONYMS: readonly ["URI", "URL", "URN", "HTTP", "HTTPS", "FTP", "FTPS", "SFTP", "SSH", "SMTP", "POP3", "IMAP", "WS", "WSS", "TCP", "UDP", "IP", "ICMP", "ARP", "RTP", "RTSP", "SIP", "HTML", "XHTML", "XML", "WBR", "CSS", "SVG", "JSON", "JSONP", "DOM", "IDB", "DB", "RTC", "ICE", "TLS", "SSL", "CORS", "WASM", "CSR", "SSR", "PWA", "DPI", "CDN", "JS", "TS", "JSX", "TSX", "CLI", "API", "SDK", "UI", "UX", "OS", "ID", "UUID", "PID", "NPM", "YARN", "ESM", "CJS", "BOM", "MVC", "MVVM", "ORM", "DAO", "CRUD", "FIFO", "LIFO", "OOP", "FP", "REPL", "CSV", "TSV", "SQL", "YAML", "JSON", "MD", "INI", "PDF", "XLS", "XLSX", "RTF", "XML", "BMP", "GIF", "PNG", "JPEG", "WEBP", "MP3", "MP4", "AVI", "MOV", "FLAC", "MKV", "WAV", "URLSearchParams", "XHR", "2D", "3D", "GL", "WebGL", "TTL", "UID", "GID", "MAC", "IP", "DNS", "DHCP", "VPN", "LAN", "WAN", "SSID", "IoT", "API", "SDK", "CLI", "LTS", "EOL", "CPU", "GPU", "RAM", "ROM", "SSD", "HDD", "BIOS", "USB", "PCI", "SATA", "DIMM", "DDR", "VGA", "HDMI", "KVM", "ASIC", "FPGA", "SoC", "NAS", "SAN", "TCP", "UDP", "IP", "MAC", "DNS", "DHCP", "VPN", "LAN", "WAN", "SSID", "NAT", "QoS", "MPLS", "BGP", "OSPF", "ICMP", "IGMP", "LLDP", "ARP", "RARP", "AES", "RSA", "OTP", "MFA", "PKI", "VPN", "IAM", "ACL", "CSP", "XSS", "CSRF", "HSTS", "WAF", "DDoS", "IDS", "IPS", "SOC", "SIEM", "AWS", "GCP", "AZURE", "CI", "CD", "K8S", "IaC", "PaaS", "SaaS", "IaaS", "API", "CLI", "SDK", "REST", "SOAP", "JSON-RPC", "gRPC", "ELB", "EKS", "AKS", "FaaS", "CaaS", "GUI", "IDE", "FAQ", "UX", "UI", "CLI", "API", "SDK", "LTS", "EOL", "WYSIWYG", "CMS", "CRM", "GPS", "LED", "OLED", "LCD", "RFID", "NFC", "CPU", "GPU", "AI", "ML", "DL", "DB", "SQL", "NoSQL", "ORM", "JSON", "XML", "CSV", "HTTP", "HTTPS", "TDD", "BDD", "CI", "CD", "QA", "SLA", "SLO", "MTTR", "MTBF", "UAT", "RPA", "KPI", "OKR", "ROI", "RFP", "SLA", "CRM", "ERP", "PMO", "SCRUM", "KANBAN", "FPS", "HDR", "VR", "AR", "3D", "2D", "MP3", "MP4", "GIF", "PNG", "JPEG", "SVG", "BMP", "TIFF", "POSIX", "NTFS", "FAT", "EXT", "EXT4", "APFS", "HFS", "ISO", "HTML", "CSS", "JS", "TS", "PHP", "SQL", "JSON", "XML", "YAML", "BASH", "ZSH", "JSON", "YAML", "INI", "DOTENV", "VM", "VMM", "VPC", "OCI", "LXC", "Docker", "K8S", "CRI", "CNI"];
13
+ /** ----------------------------------------------------------
14
+ * * ***List of acronyms to keep uppercase in formatted output.***
15
+ * -----------------------------------------------------------
16
+ *
17
+ * - **Behavior:**
18
+ * - Prevents transformations (like camelCase or kebab-case) from altering
19
+ * known acronyms such as `HTML`, `URL`, `API`, etc.
20
+ * - Extend this list if you want more acronyms to remain uppercase.
21
+ *
22
+ * ---
23
+ * - **⚠️ Internal:**
24
+ * - Used internally by {@link getPreciseType | `getPreciseType`} and related formatters.
25
+ */
26
+ declare const ACRONYMS_DATA: Readonly<typeof ACRONYMS>;
27
+ /** ---------------------------------------------------------------------------
28
+ * * ***Options for controlling how {@link getPreciseType | `getPreciseType`} formats and normalizes detected types.***
29
+ * ----------------------------------------------------------------------------
30
+ * These options customize the string transformation behavior and acronym handling
31
+ * when converting JavaScript type names to human-readable strings.
32
+ */
33
+ type GetPreciseTypeOptions = {
34
+ /** -------------------------------------------------------
35
+ * * ***Specifies the format in which the returned string type should be transformed.***
36
+ * --------------------------------------------------------
37
+ * **ℹ️ For special string literals in `SPECIAL_CASES` (`"-Infinity" | "Infinity" | "NaN"`), which will remain unchanged.**
38
+ *
39
+ * ---
40
+ * - #### Supported formats:
41
+ * - `"toKebabCase"` (default) — words separated by hyphens.
42
+ * - ➔ `"result-example-type"`.
43
+ * - `"toLowerCase"` - converts all letters to lowercase.
44
+ * - ➔ `"result example type"`.
45
+ * - `"toDotCase"` — words separated by dots.
46
+ * - ➔ `"result.example.type"`.
47
+ * - `"toCamelCase"` — first word lowercase, subsequent words capitalized.
48
+ * - ➔ `"resultExampleType"`.
49
+ * - `"toSnakeCase"` — words separated by underscores.
50
+ * - ➔ `"result_example_type"`.
51
+ * - `"toPascalCase"` — all words capitalized, no spaces.
52
+ * - ➔ `"ResultExampleType"`.
53
+ * - `"toPascalCaseSpace"` — all words capitalized with spaces between words.
54
+ * - ➔ `"Result Example Type"`.
55
+ * - `"slugify"` — URL-friendly slug (lowercase with hyphens).
56
+ * - ➔ `"result-example-type"`.
57
+ *
58
+ * ---
59
+ * @default
60
+ * ```ts
61
+ * "toKebabCase"
62
+ * ```
63
+ *
64
+ * ---
65
+ * @note
66
+ * ⚠️ If an invalid value is provided, the function will automatically fallback to the default `"toKebabCase"`.
67
+ */
68
+ formatCase?: "toPascalCaseSpace" | "toPascalCase" | "toCamelCase" | "toKebabCase" | "toSnakeCase" | "toDotCase" | "slugify" | "toLowerCase";
69
+ /** -------------------------------------------------------
70
+ * * ***Control uppercase preservation of recognized acronyms during formatting.***
71
+ * --------------------------------------------------------
72
+ * When enabled (`true`), common technical acronyms (e.g., `"URL"`, `"HTTP"`, `"HTML"`, `"SVG"`, `"XML"`, `"DOM"`)
73
+ * are preserved in their original uppercase form instead of being lowercased or altered by case-formatting utilities.
74
+ *
75
+ * ---
76
+ * ---
77
+ * @description
78
+ * The list of recognized acronyms is defined in {@link AcronymsList | **`AcronymsList`**},
79
+ * including entries like `"URL"`, `"HTTP"`, `"HTML"`, `"SVG"`, `"XML"`, `"DOM"`, and others.
80
+ *
81
+ * ---
82
+ * - ***Behavior:***
83
+ * - #### When `false` (default):
84
+ * - Acronyms are treated as normal words and formatted according to the selected `formatCase`.
85
+ * - Example:
86
+ * - `HTMLDivElement` ➔ `"html-div-element"` (with `"toKebabCase"`).
87
+ * - `DOMParser` ➔ `"dom-parser"`.
88
+ *
89
+ * ---
90
+ *
91
+ * - #### When `true`:
92
+ * - Acronyms remain uppercase.
93
+ * - Example:
94
+ * - `HTMLDivElement` ➔ `"HTML-div-element"` (with `"toKebabCase"`).
95
+ * - `DOMParser` ➔ `"DOM-parser"`.
96
+ *
97
+ * ---
98
+ * @default
99
+ * ```ts
100
+ * false
101
+ * ```
102
+ *
103
+ * ---
104
+ * @note
105
+ * ⚠️ This option affects **formatting output only**, not the underlying type detection, acronym preservation is applied **after** detecting and formatting the base type name.
106
+ */
107
+ useAcronyms?: boolean;
108
+ };
109
+ /** ---------------------------------------------------------------------------
110
+ * * ***Type alias for the list of common acronyms preserved in uppercase.***
111
+ * ----------------------------------------------------------------------------
112
+ *
113
+ * Use this type to reference the full set of recognized acronyms
114
+ * used internally by the {@link getPreciseType | **`getPreciseType`**} function for formatting purposes.
115
+ */
116
+ type AcronymsList = typeof ACRONYMS_DATA;
117
+ /** ----------------------------------------------------------
118
+ * * ***Utility-Predicate: `getPreciseType`.***
119
+ * -----------------------------------------------------------
120
+ * **Returns a detailed and normalized type string for the given value.**
121
+ *
122
+ * ---
123
+ * @description
124
+ * The returned string is human-readable ***toKebabCase*** with spaces ***(by default)*** or formatted according to the `options.formatCase` setting.
125
+ * - **Handles:**
126
+ * - Primitives (`string`, `number`, `boolean`, `null`, `undefined`, `symbol`, `bigint`).
127
+ * - Built-in objects (`Array`, `Map`, `Set`, `Error subclasses`, `Typed Arrays`, `etc`).
128
+ * - Objects created with `Object.create(null)`.
129
+ * - Objects wrapper (`new String`, `new Number`, `new Boolean`).
130
+ * - DOM Node type (may not be fully accurate outside the browser environment).
131
+ * - Generator instances.
132
+ * - Node.js `Buffer` instances.
133
+ * - Proxy detection (returns `"Proxy"` if detected; detection ***is not 100% accurate***).
134
+ * - Uses cached mapping table (`FIXES_CASTABLE_TABLE`) for known types to provide consistent naming.
135
+ * - Falls back to constructor name or `Object.prototype.toString` tag.
136
+ *
137
+ * ---
138
+ * @param {*} value - The value to detect the precise type of.
139
+ * @param {GetPreciseTypeOptions} [options] - Optional configuration.
140
+ * @param {GetPreciseTypeOptions["formatCase"]} [options.formatCase="toLowerCase"]
141
+ * Specifies how the returned type string should be formatted.
142
+ * - ⚠️ Special string literals in `SPECIAL_CASES`
143
+ * (`"-Infinity" | "Infinity" | "NaN"`) will remain
144
+ * unchanged even if a different `formatCase` is applied.
145
+ * @param {boolean} [options.useAcronyms=false]
146
+ * Control uppercase preservation of recognized acronyms during formatting.
147
+ * - When `true`, recognized acronyms such as `"URL"`, `"HTTP"`, `"HTML"`, `"SVG"`, `"XML"`, and `"DOM"`
148
+ * are preserved in uppercase instead of being lowercased or otherwise transformed.
149
+ * - When `false` (default), acronyms are formatted like regular words according to `formatCase`.
150
+ * - ⚠️ This option affects **formatting output only**, not type detection.
151
+ *
152
+ * ---
153
+ * @returns {string} The normalized and formatted type string.
154
+ *
155
+ * ---
156
+ * @example
157
+ * 1. #### Basic Usage:
158
+ * ```ts
159
+ * getPreciseType(123);
160
+ * // ➔ "number"
161
+ * getPreciseType(null);
162
+ * // ➔ "null"
163
+ * getPreciseType(/regex/);
164
+ * // ➔ "reg-exp"
165
+ * getPreciseType(/regex/, { formatCase: "toPascalCase" });
166
+ * // ➔ "RegExp"
167
+ * getPreciseType(function* () {}, { formatCase: "toCamelCase" });
168
+ * // ➔ "generatorFunction"
169
+ * getPreciseType(async function () {}, { formatCase: "toPascalCaseSpace" });
170
+ * // ➔ "Async Function"
171
+ * ```
172
+ * ---
173
+ * 2. #### `SPECIAL_CASES` remain:
174
+ * ```ts
175
+ * getPreciseType(NaN, { formatCase: "toLowerCase" });
176
+ * // ➔ "NaN"
177
+ * getPreciseType(Infinity, { formatCase: "toLowerCase" });
178
+ * // ➔ "Infinity"
179
+ * getPreciseType(-Infinity, { formatCase: "toLowerCase" });
180
+ * // ➔ "-Infinity"
181
+ * ```
182
+ * ---
183
+ * 3. #### `Acronym` usage examples:
184
+ * ```ts
185
+ * getPreciseType(new URL("https://example.com"));
186
+ * // ➔ "url"
187
+ * getPreciseType(new URL("https://example.com"), { useAcronyms: true });
188
+ * // ➔ "URL"
189
+ * getPreciseType(new URLSearchParams, { formatCase: "toPascalCase" });
190
+ * // ➔ "UrlSearchParams"
191
+ * getPreciseType(new URLSearchParams, { formatCase: "toPascalCase", useAcronyms: true });
192
+ * // ➔ "URLSearchParams"
193
+ * ```
194
+ */
195
+ declare const getPreciseType: (value: unknown, options?: GetPreciseTypeOptions) => string;
196
+ type IsNumberOptions = {
197
+ /** ---------------------------------------------------------
198
+ * * ***If set to `true`, `NaN` will be considered a valid number, defaultValue: `false`.***
199
+ * ----------------------------------------------------------
200
+ *
201
+ * @default false
202
+ */
203
+ includeNaN?: boolean;
204
+ };
205
+ /** ---------------------------------------------------------
206
+ * * ***Type guard: `isNumber`.***
207
+ * ----------------------------------------------------------
208
+ * **Checks if a value is of type **`number`**.**
209
+ *
210
+ * ---
211
+ * - #### *Behavior:*
212
+ * - Uses `typeof value === "number"`.
213
+ * - By default, excludes **`NaN`**.
214
+ * - If `options.includeNaN` is `true`, then **`NaN`** is also considered valid.
215
+ * - Still considers `Infinity` and `-Infinity` as **numbers** (consistent with JavaScript).
216
+ *
217
+ * ---
218
+ * - #### *Note:*
219
+ * - To exclude `Infinity` and `-Infinity`, use **{@link isFinite | `isFinite`}** instead.
220
+ *
221
+ * ---
222
+ * @param {*} value - The value to check.
223
+ * @param {IsNumberOptions} [options] - Optional settings.
224
+ * @param {boolean} [options.includeNaN=false] If `true`, `NaN` will be considered a valid number, defaults to `false`, which excludes `NaN`.
225
+ *
226
+ * ---
227
+ * @returns {boolean} Returns `true` if the value is a number (and depending on `includeNaN`, `NaN` is included or excluded).
228
+ *
229
+ * ---
230
+ * @example
231
+ * isNumber(42);
232
+ * // ➔ true
233
+ * isNumber(Infinity);
234
+ * // ➔ true
235
+ * isNumber(-Infinity);
236
+ * // ➔ true
237
+ * isNumber(NaN);
238
+ * // ➔ false (default)
239
+ * isNumber(NaN, { includeNaN: true });
240
+ * // ➔ true
241
+ * isNumber("42");
242
+ * // ➔ false
243
+ */
244
+ declare const isNumber: (value: unknown, options?: IsNumberOptions) => value is number;
245
+ type ArrayFallback<T> = IsNever<Extract<T, unknown[] | readonly unknown[]>> extends true ? T & unknown[] : Extract<T, unknown[] | readonly unknown[]>;
246
+ type IsHasKeysObject<T> = keyof T extends never ? false : true;
247
+ /** ----------------------------------------------------------
248
+ * * ***Utility type: `IsPlainObjectResult`.***
249
+ * -----------------------------------------------------------
250
+ * **Represents the inferred type after asserting a value is a **plain object**.**
251
+ *
252
+ * ---
253
+ * - **Behavior:**
254
+ * - If `T` is `unknown`, the resulting type is `Record<PropertyKey, unknown> & T`.
255
+ * - If `T` is an object:
256
+ * - If it is a non-plain object (class instance, built-in object, etc.), the result is `never`.
257
+ * - If it has no keys (`IsHasKeysObject<T>` checked by **{@link IsHasKeysObject|`IsHasKeysObject`}** is false), the result is `Record<PropertyKey, unknown> & T`.
258
+ * - Otherwise, the result is `T` itself.
259
+ * - For any other types, the result is `never`.
260
+ *
261
+ * ---
262
+ * @template T - The input type to be asserted as a plain object.
263
+ *
264
+ * ---
265
+ * @example
266
+ * ```ts
267
+ * type A = IsPlainObjectResult<unknown>;
268
+ * // ➔ Record<PropertyKey, unknown> & unknown
269
+ * type B = IsPlainObjectResult<{}>;
270
+ * // ➔ Record<PropertyKey, unknown> & {}
271
+ * type C = IsPlainObjectResult<{ foo: string }>;
272
+ * // ➔ { foo: string }
273
+ * type D = IsPlainObjectResult<Date>;
274
+ * // ➔ never
275
+ * ```
276
+ */
277
+ type IsPlainObjectResult<T> = unknown extends T ? Record<PropertyKey, unknown> & T : T extends object ? T extends NonPlainObject ? never : IsHasKeysObject<T> extends false ? Record<PropertyKey, unknown> & T : T : Extract<T, Record<PropertyKey, unknown>>;
278
+ /** ----------------------------------------------------------
279
+ * * ***Type guard: `isPlainObject`.***
280
+ * -----------------------------------------------------------
281
+ * **Checks if a value is a **plain-object**.**
282
+ *
283
+ * - #### A plain object is:
284
+ * - Created by the `Object` constructor, or.
285
+ * - Has a `[[Prototype]]` of `null` (e.g. `Object.create(null)`).
286
+ * ---
287
+ * - #### *Behavior:*
288
+ * - #### Returns `true` for:
289
+ * - Empty object literals: `{}`.
290
+ * - Objects with null prototype: `Object.create(null)`.
291
+ * ---
292
+ * - #### Returns `false` for:
293
+ * - Arrays (`[]`, `new Array()`).
294
+ * - Functions (regular, arrow, or class constructors).
295
+ * - Built-in objects: `Date`, `RegExp`, `Error`, `Map`, `Set`, `WeakMap`, `WeakSet`.
296
+ * - Boxed primitives: `new String()`, `new Number()`, `new Boolean()`.
297
+ * - `null` or `undefined`.
298
+ * - Symbols.
299
+ * - Class instances.
300
+ *
301
+ * ---
302
+ * @template T - The type of the value being checked.
303
+ *
304
+ * ---
305
+ * @param {*} value - The value to check.
306
+ *
307
+ * ---
308
+ * @returns {boolean} Return `true` if `value` is a `plain-object`, otherwise `false`.
309
+ *
310
+ * ---
311
+ * @example
312
+ * isPlainObject({});
313
+ * // ➔ true
314
+ * isPlainObject(Object.create(null));
315
+ * // ➔ true
316
+ * isPlainObject(null);
317
+ * // ➔ false
318
+ * isPlainObject(() => {});
319
+ * // ➔ false
320
+ * isPlainObject([1, 2, 3]);
321
+ * // ➔ false
322
+ * isPlainObject(new Date());
323
+ * // ➔ false
324
+ * isPlainObject(new MyClass());
325
+ * // ➔ false
326
+ * isPlainObject(new String("x"));
327
+ * // ➔ false
328
+ */
329
+ declare function isPlainObject<T>(value: T): value is IsPlainObjectResult<T>;
330
+ declare function isPlainObject<T>(value: T): value is NonNullable<Extract<T, Record<PropertyKey, unknown>>>;
331
+ export { IsNumberOptions as a, GetPreciseTypeOptions as c, ArrayFallback as i, getPreciseType as l, isPlainObject as n, isNumber as o, IsHasKeysObject as r, AcronymsList as s, IsPlainObjectResult as t };