@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
@@ -2,22 +2,24 @@
2
2
  * ========================================================================
3
3
  * @rzl-zone/utils-js
4
4
  * ------------------------------------------------------------------------
5
- * Version: `3.13.1`
5
+ * Version: `3.14.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
  * ========================================================================
9
9
  */
10
10
 
11
- import { a as IsNumberOptions, c as GetPreciseTypeOptions, i as ArrayFallback, t as IsPlainObjectResult } from "./isPlainObject-BwTkj3G0.js";
12
- import { PickStrict, Prettify } from "@rzl-zone/ts-types-plus";
13
- /** -------------------------------------------------------
11
+ import { M as PickStrict, N as Prettify } from "./index-or0oP9i2.js";
12
+ import { a as IsNumberOptions, c as GetPreciseTypeOptions, i as ArrayFallback, t as IsPlainObjectResult } from "./isPlainObject-DQoM4DGQ.js";
13
+ /** -----------------------------------------------------------------------------
14
14
  * * ***Shape of the object passed to custom error message functions.***
15
- * -------------------------------------------------------
15
+ * ------------------------------------------------------------------------------
16
16
  * **This type describes the parameters received when `options.message`
17
17
  * is defined as a function in {@link OptionsAssertIs | `OptionsAssertIs`}.**
18
+ *
18
19
  * - **Parameter:**
19
- * - `currentType` ➔ the actual detected runtime type of the value.
20
- * - `validType` ➔ the required/expected type name that the value must match.
20
+ * - `currentType` ➔ the actual detected runtime type of the value.
21
+ * - `validType` ➔ the required/expected type name that the value must match.
22
+ *
21
23
  * @example
22
24
  * ```ts
23
25
  * const options: OptionsAssertIs = {
@@ -30,16 +32,16 @@ import { PickStrict, Prettify } from "@rzl-zone/ts-types-plus";
30
32
  type OptionsMessageFunctionAssertIs = {
31
33
  /** ---------------------------------------------------------------------------
32
34
  * * ***The actual runtime type of the value being checked.***
33
- * ---------------------------------------------------------------------------
35
+ * ----------------------------------------------------------------------------
34
36
  * - ***Example:***
35
- * - `"number"`, `"big-int"`, `"plain-object"`, (depends `formatCase` options).
37
+ * - `"number"`, `"big-int"`, `"plain-object"`, (depends-on `formatCase` options).
36
38
  */
37
39
  currentType: string;
38
40
  /** ---------------------------------------------------------------------------
39
41
  * * ***The required/expected type that the value must conform to.***
40
- * ---------------------------------------------------------------------------
42
+ * ----------------------------------------------------------------------------
41
43
  * - ***Example:***
42
- * - `"boolean"`, `"string"`, `"big-int"`, `"plain-object"`, (will force format to `kebab-case`).
44
+ * - `"boolean"`, `"string"`, `"big-int"`, `"plain-object"`, (will force format to `kebab-case`).
43
45
  */
44
46
  validType: string;
45
47
  };
@@ -47,8 +49,8 @@ type OptionsMessageFunctionAssertIs = {
47
49
  * * ***Custom error-message type for assertions option {@link OptionsAssertIs | `OptionsAssertIs`}.***
48
50
  * -------------------------------------------------------
49
51
  * - ***Accepts:***
50
- * - A static string message.
51
- * - A function receiving `{ currentType, validType }` and returning a string.
52
+ * - A static string message.
53
+ * - A function receiving `{ currentType, validType }` and returning a string.
52
54
  */
53
55
  type OptionsMessageAssertIs = (({
54
56
  currentType,
@@ -56,24 +58,26 @@ type OptionsMessageAssertIs = (({
56
58
  }: OptionsMessageFunctionAssertIs) => string) | string;
57
59
  /** ---------------------------------------------------------------------------
58
60
  * * ***Base options for `assertIs*` functions.***
59
- * ---------------------------------------------------------------------------
61
+ * ----------------------------------------------------------------------------
60
62
  */
61
63
  type OptionsAssertIs = Prettify<{
62
- /** -------------------------------------------------------
64
+ /** -----------------------------------------------------------------------
63
65
  * * ***Custom error message for assertion failures.***
64
- * -------------------------------------------------------
66
+ * ------------------------------------------------------------------------
65
67
  * **This option allows overriding the **default error message** when a value
66
68
  * does not match the required type.**
69
+ *
67
70
  * - If a **string** is provided:
68
- * - Must be non-empty after trimming.
69
- * - Will be used directly as the error message.
71
+ * - Must be non-empty after trimming.
72
+ * - Will be used directly as the error message.
70
73
  * - If a **function** is provided:
71
- * - Receives an object containing:
72
- * - `currentType` ➔ the detected runtime type of the value (depends `formatCase` options, e.g., `"number"`).
73
- * - `validType` ➔ the expected type name (with format `kebab-case`, e.g., `"boolean"`, `"big-int"`, `"plain-object"`).
74
- * - **Must** return a **string**:
75
- * - **If** the **returned string is** `empty` or `whitespace`,
76
- * the **default message** will be used instead.
74
+ * - Receives an object containing:
75
+ * - `currentType` ➔ the detected runtime type of the value (depends-on `formatCase` options, e.g., `"number"`).
76
+ * - `validType` ➔ the expected type name (with format `kebab-case`, e.g., `"boolean"`, `"big-int"`, `"plain-object"`).
77
+ * - **Must** return a **string**:
78
+ * - **If** the **returned string is** `empty` or `whitespace`,
79
+ * the **default message** will be used instead.
80
+ *
77
81
  * @example
78
82
  * ```ts
79
83
  * // Static message
@@ -88,18 +92,19 @@ type OptionsAssertIs = Prettify<{
88
92
  * ```
89
93
  */
90
94
  message?: OptionsMessageAssertIs;
91
- /** -------------------------------------------------------
95
+ /** -----------------------------------------------------------------------
92
96
  * * ***Custom error type for assertion failures.***
93
- * -------------------------------------------------------
97
+ * ------------------------------------------------------------------------
94
98
  * **This option allows overriding the default error type** that will be thrown
95
99
  * when a value does not match the required type.
96
100
  *
97
101
  * - **Behavior:**
98
- * - Must be one of the standard JavaScript built-in error types:
99
- * `"Error" | "EvalError" | "RangeError" | "ReferenceError" | "SyntaxError" | "TypeError" | "URIError"`
100
- * - **Default:** `"TypeError"` if not provided or if an invalid value is passed.
101
- * - The assertion function will **always throw a valid built-in error**, ensuring
102
- * fallback to `TypeError` in case of an unknown or incorrect type.
102
+ * - Must be one of the standard JavaScript built-in error types:
103
+ * `"Error" | "EvalError" | "RangeError" | "ReferenceError" | "SyntaxError" | "TypeError" | "URIError"`.
104
+ * - **Default:** `"TypeError"` if not provided or if an invalid value is passed.
105
+ * - The assertion function will **always throw a valid built-in error**, ensuring
106
+ * fallback to `TypeError` in case of an unknown or incorrect type.
107
+ *
103
108
  * @example
104
109
  * ```ts
105
110
  * // Valid: Throw a RangeError instead of TypeError
@@ -114,40 +119,44 @@ type OptionsAssertIs = Prettify<{
114
119
  */
115
120
  errorType?: ErrorType;
116
121
  } & PickStrict<GetPreciseTypeOptions, "formatCase" | "useAcronyms">, {
117
- recursive: true;
122
+ recursive: false;
118
123
  }>;
119
124
  type ErrorType = "Error" | "EvalError" | "RangeError" | "ReferenceError" | "SyntaxError" | "TypeError" | "URIError";
120
- /** -------------------------------------------------------
125
+ /** ---------------------------------------------------------------------------------
121
126
  * * ***Type guard assertion: `assertIsBoolean`.***
122
- * -------------------------------------------------------
127
+ * ----------------------------------------------------------------------------------
123
128
  * **This function is an **assertion function**.**
129
+ *
124
130
  * - **Behavior:**
125
- * - Validates that the given `value` is a **boolean**.
126
- * - After it returns successfully, TypeScript narrows the type of `value` to `boolean`.
127
- * - If `value` is a `boolean` ➔ execution continues normally.
128
- * - If `value` is not a `boolean` ➔ throws a built-in error with either:
129
- * - A custom error message (`options.message`), or
130
- * - A default message including the actual type.
131
- * - **⚠️ Error type selection (`options.errorType`):**
132
- * - You can override the type of error thrown when validation fails.
133
- * - Must be one of the standard JavaScript built-in errors:
134
- * - [`TypeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError) |
135
- * [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) |
136
- * [`EvalError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError) |
137
- * [`RangeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError) |
138
- * [`ReferenceError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError) |
139
- * [`SyntaxError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError) |
140
- * [`URIError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError)
141
- * - **Default:** `"TypeError"` if not provided or invalid.
131
+ * - Validates that the given `value` is a **boolean**.
132
+ * - After it returns successfully, TypeScript narrows the type of `value` to `boolean`.
133
+ * - If `value` is a `boolean` ➔ execution continues normally.
134
+ * - If `value` is not a `boolean` ➔ throws a built-in error with either:
135
+ * - A custom error message (`options.message`), or
136
+ * - A default message including the actual type.
137
+ * - **Error type selection (`options.errorType`):**
138
+ * - You can override the type of error thrown when validation fails.
139
+ * - Must be one of the standard JavaScript built-in errors:
140
+ * - [`TypeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError) |
141
+ * [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) |
142
+ * [`EvalError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError) |
143
+ * [`RangeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError) |
144
+ * [`ReferenceError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError) |
145
+ * [`SyntaxError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError) |
146
+ * [`URIError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError).
147
+ * - **Default:** `"TypeError"` if not provided or invalid.
148
+ *
142
149
  * @param {*} value - ***The value to validate.***
143
150
  * @param {OptionsAssertIs} [options]
144
151
  * ***Optional configuration:***
145
- * - `message`: A custom error message (`string` or `function`).
146
- * - `errorType`: A custom built-in JavaScript error type to throw.
147
- * - `formatCase`: Controls how detected type names are formatted case in error messages.
148
- * - `useAcronyms`: Control uppercase preservation of recognized acronyms during formatting.
149
- * @returns {boolean} Narrows `value` to `boolean` if no error is thrown.
152
+ * - `message`: A custom error message (`string` or `function`).
153
+ * - `errorType`: A custom built-in JavaScript error type to throw.
154
+ * - `formatCase`: Controls how detected type names are formatted case in error messages.
155
+ * - `useAcronyms`: Control uppercase preservation of recognized acronyms during formatting.
156
+ *
150
157
  * @throws [`TypeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError) | [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) | [`EvalError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError) | [`RangeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError) | [`ReferenceError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError) | [`SyntaxError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError) | [`URIError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError) if the value is not a boolean.
158
+ * @returns {boolean} Narrows `value` to `boolean` if no error is thrown.
159
+ *
151
160
  * @example
152
161
  * ```ts
153
162
  * // ✅ Simple usage
@@ -229,40 +238,44 @@ type ErrorType = "Error" | "EvalError" | "RangeError" | "ReferenceError" | "Synt
229
238
  * ```
230
239
  */
231
240
  declare const assertIsBoolean: (value: unknown, options?: OptionsAssertIs) => asserts value is boolean;
232
- /** -------------------------------------------------------
241
+ /** --------------------------------------------------------------------------------
233
242
  * * ***Type guard assertion: `assertIsBigInt`.***
234
- * -------------------------------------------------------
243
+ * ---------------------------------------------------------------------------------
235
244
  * **This function is an **assertion function**.**
245
+ *
236
246
  * - **Behavior:**
237
- * - Validates that the given `value` is a **bigint**.
238
- * - After it returns successfully, TypeScript narrows the type of `value` to `bigint`.
239
- * - If `value` is a `bigint` ➔ execution continues normally.
240
- * - If `value` is not a `bigint` ➔ throws a built-in error with either:
241
- * - A custom error message (`options.message`), or
242
- * - A default message including the actual type.
243
- * - **ℹ️ Note:**
244
- * - A `bigint` refers strictly to the JavaScript `bigint` primitive type (e.g., `123n`, `0n`, `-999999999999999999999n`).
245
- * - This excludes `BigInt` objects created with `Object(BigInt(123))`.
246
- * - **⚠️ Error type selection (`options.errorType`):**
247
- * - You can override the type of error thrown when validation fails.
248
- * - Must be one of the standard JavaScript built-in errors:
249
- * - [`TypeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError) |
250
- * [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) |
251
- * [`EvalError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError) |
252
- * [`RangeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError) |
253
- * [`ReferenceError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError) |
254
- * [`SyntaxError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError) |
255
- * [`URIError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError)
256
- * - **Default:** `"TypeError"` if not provided or invalid.
247
+ * - Validates that the given `value` is a **bigint**.
248
+ * - After it returns successfully, TypeScript narrows the type of `value` to `bigint`.
249
+ * - If `value` is a `bigint` ➔ execution continues normally.
250
+ * - If `value` is not a `bigint` ➔ throws a built-in error with either:
251
+ * - A custom error message (`options.message`), or
252
+ * - A default message including the actual type.
253
+ * - **Note:**
254
+ * - A `bigint` refers strictly to the JavaScript `bigint` primitive type (e.g., `123n`, `0n`, `-999999999999999999999n`).
255
+ * - This excludes `BigInt` objects created with `Object(BigInt(123))`.
256
+ * - **Error type selection (`options.errorType`):**
257
+ * - You can override the type of error thrown when validation fails.
258
+ * - Must be one of the standard JavaScript built-in errors:
259
+ * - [`TypeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError) |
260
+ * [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) |
261
+ * [`EvalError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError) |
262
+ * [`RangeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError) |
263
+ * [`ReferenceError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError) |
264
+ * [`SyntaxError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError) |
265
+ * [`URIError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError).
266
+ * - **Default:** `"TypeError"` if not provided or invalid.
267
+ *
257
268
  * @param {*} value - ***The value to validate.***
258
269
  * @param {OptionsAssertIs} [options]
259
270
  * ***Optional configuration:***
260
- * - `message`: A custom error message (`string` or `function`).
261
- * - `errorType`: Built-in JavaScript error type to throw on failure (default `"TypeError"`).
262
- * - `formatCase`: Controls how detected type names are formatted case in error messages.
263
- * - `useAcronyms`: Control uppercase preservation of recognized acronyms during formatting.
264
- * @returns {boolean} Narrows `value` to `bigint` if no error is thrown.
271
+ * - `message`: A custom error message (`string` or `function`).
272
+ * - `errorType`: Built-in JavaScript error type to throw on failure (default `"TypeError"`).
273
+ * - `formatCase`: Controls how detected type names are formatted case in error messages.
274
+ * - `useAcronyms`: Control uppercase preservation of recognized acronyms during formatting.
275
+ *
265
276
  * @throws [`TypeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError) | [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) | [`EvalError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError) | [`RangeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError) | [`ReferenceError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError) | [`SyntaxError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError) | [`URIError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError) if the value is not a bigint.
277
+ * @returns {boolean} Narrows `value` to `bigint` if no error is thrown.
278
+ *
266
279
  * @example
267
280
  * ```ts
268
281
  * // ✅ Simple usage
@@ -341,42 +354,46 @@ declare const assertIsBoolean: (value: unknown, options?: OptionsAssertIs) => as
341
354
  */
342
355
  declare const assertIsBigInt: (value: unknown, options?: OptionsAssertIs) => asserts value is bigint;
343
356
  type OptionsAssertIsNumber = OptionsAssertIs & IsNumberOptions;
344
- /** -------------------------------------------------------
357
+ /** --------------------------------------------------------------------------------
345
358
  * * ***Type guard assertion: `assertIsNumber`.***
346
- * -------------------------------------------------------
359
+ * ---------------------------------------------------------------------------------
347
360
  * **This function is an **assertion function**.**
361
+ *
348
362
  * - **Behavior:**
349
- * - Validates that the given `value` is a **number**.
350
- * - After it returns successfully, TypeScript narrows the type of `value` to `number`.
351
- * - If `value` is a `number` ➔ execution continues normally.
352
- * - If `value` is not a `number` ➔ throws a built-in error with either:
353
- * - A custom error message (`options.message`), or
354
- * - A default message including the actual type.
355
- * - **ℹ️ Note:**
356
- * - A `number` refers strictly to the JavaScript `number` primitive type (e.g., `42`, `3.14`, `-1`, `0`).
357
- * - This excludes `Number` objects created with `new Number(123)`.
358
- * - By default, `NaN` is **not considered** valid, you can allow it with `{ includeNaN: true }`.
359
- * - **⚠️ Error type selection (`options.errorType`):**
360
- * - You can override the type of error thrown when validation fails.
361
- * - Must be one of the standard JavaScript built-in errors:
362
- * - [`TypeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError) |
363
- * [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) |
364
- * [`EvalError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError) |
365
- * [`RangeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError) |
366
- * [`ReferenceError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError) |
367
- * [`SyntaxError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError) |
368
- * [`URIError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError)
369
- * - **Default:** `"TypeError"` if not provided or invalid.
363
+ * - Validates that the given `value` is a **number**.
364
+ * - After it returns successfully, TypeScript narrows the type of `value` to `number`.
365
+ * - If `value` is a `number` ➔ execution continues normally.
366
+ * - If `value` is not a `number` ➔ throws a built-in error with either:
367
+ * - A custom error message (`options.message`), or
368
+ * - A default message including the actual type.
369
+ * - **Note:**
370
+ * - A `number` refers strictly to the JavaScript `number` primitive type (e.g., `42`, `3.14`, `-1`, `0`).
371
+ * - This excludes `Number` objects created with `new Number(123)`.
372
+ * - By default, `NaN` is **not considered** valid, you can allow it with `{ includeNaN: true }`.
373
+ * - **Error type selection (`options.errorType`):**
374
+ * - You can override the type of error thrown when validation fails.
375
+ * - Must be one of the standard JavaScript built-in errors:
376
+ * - [`TypeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError) |
377
+ * [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) |
378
+ * [`EvalError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError) |
379
+ * [`RangeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError) |
380
+ * [`ReferenceError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError) |
381
+ * [`SyntaxError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError) |
382
+ * [`URIError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError).
383
+ * - **Default:** `"TypeError"` if not provided or invalid.
384
+ *
370
385
  * @param {*} value - ***The value to validate.***
371
386
  * @param {OptionsAssertIsNumber} [options]
372
387
  * ***Optional configuration:***
373
- * - `message`: A custom error message (`string` or `function`).
374
- * - `errorType`: Built-in JavaScript error type to throw on failure (default `"TypeError"`).
375
- * - `formatCase`: Controls how detected type names are formatted case in error messages.
376
- * - `useAcronyms`: Control uppercase preservation of recognized acronyms during formatting.
377
- * - `includeNaN`: Whether to treat `NaN` as valid.
378
- * @returns {boolean} Narrows `value` to `number` if no error is thrown.
388
+ * - `message`: A custom error message (`string` or `function`).
389
+ * - `errorType`: Built-in JavaScript error type to throw on failure (default `"TypeError"`).
390
+ * - `formatCase`: Controls how detected type names are formatted case in error messages.
391
+ * - `useAcronyms`: Control uppercase preservation of recognized acronyms during formatting.
392
+ * - `includeNaN`: Whether to treat `NaN` as valid.
393
+ *
379
394
  * @throws [`TypeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError) | [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) | [`EvalError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError) | [`RangeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError) | [`ReferenceError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError) | [`SyntaxError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError) | [`URIError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError) if the value is not a number (or is `NaN` when `includeNaN` is `false`).
395
+ * @returns {boolean} Narrows `value` to `number` if no error is thrown.
396
+ *
380
397
  * @example
381
398
  * ```ts
382
399
  * // ✅ Simple usage
@@ -464,38 +481,42 @@ type OptionsAssertIsNumber = OptionsAssertIs & IsNumberOptions;
464
481
  * ```
465
482
  */
466
483
  declare const assertIsNumber: (value: unknown, options?: OptionsAssertIsNumber) => asserts value is number;
467
- /** -------------------------------------------------------
484
+ /** --------------------------------------------------------------------------------
468
485
  * * ***Type guard assertion: `assertIsArray`.***
469
- * -------------------------------------------------------
486
+ * ---------------------------------------------------------------------------------
470
487
  * **This function is an **assertion function**.**
488
+ *
471
489
  * - **Behavior:**
472
- * - Validates that the given `value` is an **array**.
473
- * - After it returns successfully, TypeScript narrows the type of `value` to `array` **(generic support)**.
474
- * - If `value` is an `array` ➔ execution continues normally.
475
- * - If `value` is not an `array` ➔ throws a built-in error with either:
476
- * - A custom error message (`options.message`), or
477
- * - A default message including the actual type.
478
- * - **⚠️ Error type selection (`options.errorType`):**
479
- * - You can override the type of error thrown when validation fails.
480
- * - Must be one of the standard JavaScript built-in errors:
481
- * - [`TypeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError) |
482
- * [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) |
483
- * [`EvalError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError) |
484
- * [`RangeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError) |
485
- * [`ReferenceError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError) |
486
- * [`SyntaxError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError) |
487
- * [`URIError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError)
488
- * - **Default:** `"TypeError"` if not provided or invalid.
490
+ * - Validates that the given `value` is an **array**.
491
+ * - After it returns successfully, TypeScript narrows the type of `value` to `array` **(generic support)**.
492
+ * - If `value` is an `array` ➔ execution continues normally.
493
+ * - If `value` is not an `array` ➔ throws a built-in error with either:
494
+ * - A custom error message (`options.message`), or
495
+ * - A default message including the actual type.
496
+ * - **Error type selection (`options.errorType`):**
497
+ * - You can override the type of error thrown when validation fails.
498
+ * - Must be one of the standard JavaScript built-in errors:
499
+ * - [`TypeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError) |
500
+ * [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) |
501
+ * [`EvalError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError) |
502
+ * [`RangeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError) |
503
+ * [`ReferenceError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError) |
504
+ * [`SyntaxError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError) |
505
+ * [`URIError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError).
506
+ * - **Default:** `"TypeError"` if not provided or invalid.
507
+ *
489
508
  * @template T - The input type being asserted.
490
509
  * @param {*} value - ***The value to validate.***
491
510
  * @param {OptionsAssertIs} [options]
492
511
  * ***Optional configuration:***
493
- * - `message`: A custom error message (`string` or `function`).
494
- * - `errorType`: Built-in JavaScript error type to throw on failure (default `"TypeError"`).
495
- * - `formatCase`: Controls how detected type names are formatted case in error messages.
496
- * - `useAcronyms`: Control uppercase preservation of recognized acronyms during formatting.
497
- * @returns {boolean} Narrows `value` to an `array` **(generic support)** if no error is thrown.
512
+ * - `message`: A custom error message (`string` or `function`).
513
+ * - `errorType`: Built-in JavaScript error type to throw on failure (default `"TypeError"`).
514
+ * - `formatCase`: Controls how detected type names are formatted case in error messages.
515
+ * - `useAcronyms`: Control uppercase preservation of recognized acronyms during formatting.
516
+ *
498
517
  * @throws [`TypeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError) | [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) | [`EvalError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError) | [`RangeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError) | [`ReferenceError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError) | [`SyntaxError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError) | [`URIError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError) if the value is not an array.
518
+ * @returns {boolean} Narrows `value` to an `array` **(generic support)** if no error is thrown.
519
+ *
499
520
  * @example
500
521
  * ```ts
501
522
  * // ✅ Simple usage
@@ -578,52 +599,56 @@ declare const assertIsNumber: (value: unknown, options?: OptionsAssertIsNumber)
578
599
  declare function assertIsArray(value: [], options?: OptionsAssertIs): asserts value is [];
579
600
  declare function assertIsArray<T>(value: T, options?: OptionsAssertIs): asserts value is ArrayFallback<T>;
580
601
  declare function assertIsArray(value: unknown, options?: OptionsAssertIs): asserts value is unknown[];
581
- /** -------------------------------------------------------
602
+ /** --------------------------------------------------------------------------------
582
603
  * * ***Type guard assertion: `assertIsPlainObject`.***
583
- * -------------------------------------------------------
604
+ * ---------------------------------------------------------------------------------
584
605
  * **This function is an **assertion function**.**
606
+ *
585
607
  * - **Behavior:**
586
- * - Validates that the given `value` is a **plain-object**.
587
- * - After it returns successfully, TypeScript narrows the type of `value` to `plain-object` **(generic support)**.
588
- * - If `value` is a `plain-object` ➔ execution continues normally.
589
- * - If `value` is not a `plain-object` ➔ throws a built-in error with either:
590
- * - A custom error message (`options.message`), or
591
- * - A default message including the actual type.
608
+ * - Validates that the given `value` is a **plain-object**.
609
+ * - After it returns successfully, TypeScript narrows the type of `value` to `plain-object` **(generic support)**.
610
+ * - If `value` is a `plain-object` ➔ execution continues normally.
611
+ * - If `value` is not a `plain-object` ➔ throws a built-in error with either:
612
+ * - A custom error message (`options.message`), or
613
+ * - A default message including the actual type.
592
614
  * - **A valid `plain object` is:**
593
- * - Created by the `Object` constructor, or
594
- * - Has a `[[Prototype]]` of `null` (e.g. `Object.create(null)`).
595
- * - **✅ Returns `undefined` (valid) for:**
596
- * - Empty object literals: `{}`
597
- * - Objects with null prototype: `Object.create(null)`
598
- * - **❌ Returns `throws` for:**
599
- * - Arrays (`[]`, `new Array()`)
600
- * - Functions (regular, arrow, or class constructors)
601
- * - Built-in objects: `Date`, `RegExp`, `Error`, `Map`, `Set`, `WeakMap`, `WeakSet`
602
- * - Boxed primitives: `new String()`, `new Number()`, `new Boolean()`
603
- * - `null` or `undefined`
604
- * - Symbols
605
- * - Class instances
606
- * - **⚠️ Error type selection (`options.errorType`):**
607
- * - You can override the type of error thrown when validation fails.
608
- * - Must be one of the standard JavaScript built-in errors:
609
- * - [`TypeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError) |
610
- * [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) |
611
- * [`EvalError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError) |
612
- * [`RangeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError) |
613
- * [`ReferenceError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError) |
614
- * [`SyntaxError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError) |
615
- * [`URIError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError)
616
- * - **Default:** `"TypeError"` if not provided or invalid.
615
+ * - Created by the `Object` constructor, or
616
+ * - Has a `[[Prototype]]` of `null` (e.g. `Object.create(null)`).
617
+ * - **Returns `undefined` (valid) for:**
618
+ * - Empty object literals: `{}`
619
+ * - Objects with null prototype: `Object.create(null)`
620
+ * - **Returns `throws` for:**
621
+ * - Arrays (`[]`, `new Array()`)
622
+ * - Functions (regular, arrow, or class constructors)
623
+ * - Built-in objects: `Date`, `RegExp`, `Error`, `Map`, `Set`, `WeakMap`, `WeakSet`
624
+ * - Boxed primitives: `new String()`, `new Number()`, `new Boolean()`
625
+ * - `null` or `undefined`
626
+ * - Symbols
627
+ * - Class instances
628
+ * - **Error type selection (`options.errorType`):**
629
+ * - You can override the type of error thrown when validation fails.
630
+ * - Must be one of the standard JavaScript built-in errors:
631
+ * - [`TypeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError) |
632
+ * [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) |
633
+ * [`EvalError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError) |
634
+ * [`RangeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError) |
635
+ * [`ReferenceError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError) |
636
+ * [`SyntaxError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError) |
637
+ * [`URIError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError).
638
+ * - **Default:** `"TypeError"` if not provided or invalid.
639
+ *
617
640
  * @template T - The input type being asserted.
618
641
  * @param {*} value - ***The value to validate.***
619
642
  * @param {OptionsAssertIs} [options]
620
643
  * ***Optional configuration:***
621
- * - `message`: A custom error message (`string` or `function`).
622
- * - `errorType`: Built-in JavaScript error type to throw on failure (default `"TypeError"`).
623
- * - `formatCase`: Controls how detected type names are formatted case in error messages.
624
- * - `useAcronyms`: Control uppercase preservation of recognized acronyms during formatting.
625
- * @returns {boolean} Narrows `value` to a `plain-object` **(generic support)** if no error is thrown.
644
+ * - `message`: A custom error message (`string` or `function`).
645
+ * - `errorType`: Built-in JavaScript error type to throw on failure (default `"TypeError"`).
646
+ * - `formatCase`: Controls how detected type names are formatted case in error messages.
647
+ * - `useAcronyms`: Control uppercase preservation of recognized acronyms during formatting.
648
+ *
626
649
  * @throws [`TypeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError) | [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) | [`EvalError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError) | [`RangeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError) | [`ReferenceError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError) | [`SyntaxError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError) | [`URIError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError) if `value` is not a plain-object.
650
+ * @returns {boolean} Narrows `value` to a `plain-object` **(generic support)** if no error is thrown.
651
+ *
627
652
  * @example
628
653
  * ```ts
629
654
  * // ✅ Simple usage
@@ -703,40 +728,44 @@ declare function assertIsArray(value: unknown, options?: OptionsAssertIs): asser
703
728
  * ```
704
729
  */
705
730
  declare function assertIsPlainObject<T>(value: T, options?: OptionsAssertIs): asserts value is IsPlainObjectResult<T>;
706
- /** -------------------------------------------------------
731
+ /** --------------------------------------------------------------------------------
707
732
  * * ***Type guard assertion: `assertIsString`.***
708
- * -------------------------------------------------------
733
+ * ---------------------------------------------------------------------------------
709
734
  * **This function is an **assertion function**.**
735
+ *
710
736
  * - **Behavior:**
711
- * - Validates that the given `value` is a **primitive-string**.
712
- * - After it returns successfully, TypeScript narrows the type of `value` to `primitive-string`.
713
- * - If `value` is a `primitive-string` ➔ execution continues normally.
714
- * - If `value` is not a `primitive-string` ➔ throws a built-in error with either:
715
- * - A custom error message (`options.message`), or
716
- * - A default message including the actual type.
717
- * - **ℹ️ Note:**
718
- * - A "string" refers strictly to a JavaScript `primitive-string` type (e.g., `"hello"`, `""`, `"123"`).
719
- * - This function excludes `String` objects created with `new String()`.
720
- * - **⚠️ Error type selection (`options.errorType`):**
721
- * - You can override the type of error thrown when validation fails.
722
- * - Must be one of the standard JavaScript built-in errors:
723
- * - [`TypeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError) |
724
- * [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) |
725
- * [`EvalError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError) |
726
- * [`RangeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError) |
727
- * [`ReferenceError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError) |
728
- * [`SyntaxError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError) |
729
- * [`URIError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError)
730
- * - **Default:** `"TypeError"` if not provided or invalid.
737
+ * - Validates that the given `value` is a **primitive-string**.
738
+ * - After it returns successfully, TypeScript narrows the type of `value` to `primitive-string`.
739
+ * - If `value` is a `primitive-string` ➔ execution continues normally.
740
+ * - If `value` is not a `primitive-string` ➔ throws a built-in error with either:
741
+ * - A custom error message (`options.message`), or
742
+ * - A default message including the actual type.
743
+ * - **Note:**
744
+ * - A "string" refers strictly to a JavaScript `primitive-string` type (e.g., `"hello"`, `""`, `"123"`).
745
+ * - This function excludes `String` objects created with `new String()`.
746
+ * - **Error type selection (`options.errorType`):**
747
+ * - You can override the type of error thrown when validation fails.
748
+ * - Must be one of the standard JavaScript built-in errors:
749
+ * - [`TypeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError) |
750
+ * [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) |
751
+ * [`EvalError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError) |
752
+ * [`RangeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError) |
753
+ * [`ReferenceError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError) |
754
+ * [`SyntaxError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError) |
755
+ * [`URIError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError).
756
+ * - **Default:** `"TypeError"` if not provided or invalid.
757
+ *
731
758
  * @param {*} value - ***The value to validate.***
732
759
  * @param {OptionsAssertIs} [options]
733
760
  * ***Optional configuration:***
734
- * - `message`: A custom error message (`string` or `function`).
735
- * - `errorType`: Built-in JavaScript error type to throw on failure (default `"TypeError"`).
736
- * - `formatCase`: Controls how detected type names are formatted case in error messages.
737
- * - `useAcronyms`: Control uppercase preservation of recognized acronyms during formatting.
738
- * @returns {boolean} Narrows `value` to `string` if no error is thrown.
761
+ * - `message`: A custom error message (`string` or `function`).
762
+ * - `errorType`: Built-in JavaScript error type to throw on failure (default `"TypeError"`).
763
+ * - `formatCase`: Controls how detected type names are formatted case in error messages.
764
+ * - `useAcronyms`: Control uppercase preservation of recognized acronyms during formatting.
765
+ *
739
766
  * @throws [`TypeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError) | [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) | [`EvalError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError) | [`RangeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError) | [`ReferenceError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError) | [`SyntaxError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError) | [`URIError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError) if the value is not a primitive string.
767
+ * @returns {boolean} Narrows `value` to `string` if no error is thrown.
768
+ *
740
769
  * @example
741
770
  * ```ts
742
771
  * // ✅ Simple usage