@rzl-zone/utils-js 3.14.0-beta.0 → 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 (196) hide show
  1. package/dist/.references/index.d.cts +1 -1
  2. package/dist/.references/index.d.ts +1 -1
  3. package/dist/{AbortError-DVT8lAKn.js → AbortError-CgE6QNOR.js} +3 -3
  4. package/dist/{AbortError-DVT8lAKn.js.map → AbortError-CgE6QNOR.js.map} +1 -1
  5. package/dist/{AbortError-DK6kpzbu.cjs → AbortError-D54txsmn.cjs} +3 -3
  6. package/dist/{AbortError-DK6kpzbu.cjs.map → AbortError-D54txsmn.cjs.map} +1 -1
  7. package/dist/{assertIsArray-CG7L7vlt.js → assertIsArray-DmlqnTiq.js} +3 -3
  8. package/dist/{assertIsArray-CG7L7vlt.js.map → assertIsArray-DmlqnTiq.js.map} +1 -1
  9. package/dist/{assertIsArray-CtCRD-_G.cjs → assertIsArray-Xx-zlo6O.cjs} +3 -3
  10. package/dist/{assertIsArray-CtCRD-_G.cjs.map → assertIsArray-Xx-zlo6O.cjs.map} +1 -1
  11. package/dist/{assertIsPlainObject-j9bDqNLo.js → assertIsPlainObject-CIzDchLs.js} +3 -3
  12. package/dist/{assertIsPlainObject-j9bDqNLo.js.map → assertIsPlainObject-CIzDchLs.js.map} +1 -1
  13. package/dist/{assertIsPlainObject-DPZLj-Ho.cjs → assertIsPlainObject-DYoxHcW5.cjs} +3 -3
  14. package/dist/{assertIsPlainObject-DPZLj-Ho.cjs.map → assertIsPlainObject-DYoxHcW5.cjs.map} +1 -1
  15. package/dist/{assertIsString-CjE9kbQ_.cjs → assertIsString-CuPbh3FB.cjs} +3 -3
  16. package/dist/{assertIsString-CjE9kbQ_.cjs.map → assertIsString-CuPbh3FB.cjs.map} +1 -1
  17. package/dist/{assertIsString-CHIwE12y.js → assertIsString-sgY3ml5f.js} +3 -3
  18. package/dist/{assertIsString-CHIwE12y.js.map → assertIsString-sgY3ml5f.js.map} +1 -1
  19. package/dist/assertions/index.cjs +7 -7
  20. package/dist/assertions/index.d.cts +2 -2
  21. package/dist/assertions/index.d.ts +2 -2
  22. package/dist/assertions/index.js +7 -7
  23. package/dist/conversions/index.cjs +6 -6
  24. package/dist/conversions/index.d.cts +2 -2
  25. package/dist/conversions/index.d.ts +2 -2
  26. package/dist/conversions/index.js +6 -6
  27. package/dist/{conversions-Ben5p5Ts.js → conversions-BkxqYXxy.js} +13 -13
  28. package/dist/{conversions-Ben5p5Ts.js.map → conversions-BkxqYXxy.js.map} +1 -1
  29. package/dist/{conversions-BFz6MKaV.cjs → conversions-UdMB90xR.cjs} +13 -13
  30. package/dist/{conversions-BFz6MKaV.cjs.map → conversions-UdMB90xR.cjs.map} +1 -1
  31. package/dist/errors/index.cjs +2 -2
  32. package/dist/errors/index.d.cts +1 -1
  33. package/dist/errors/index.d.ts +1 -1
  34. package/dist/errors/index.js +2 -2
  35. package/dist/events/index.cjs +5 -5
  36. package/dist/events/index.d.cts +1 -1
  37. package/dist/events/index.d.ts +1 -1
  38. package/dist/events/index.js +5 -5
  39. package/dist/{formatter-ekJQF_bA-xLD9mGk4.js → formatter-BFgV1HhV-BtIJs2H2.js} +3 -3
  40. package/dist/formatter-BFgV1HhV-BtIJs2H2.js.map +1 -0
  41. package/dist/{formatter-ekJQF_bA-BepnCBkQ.cjs → formatter-BFgV1HhV-DyybWSuj.cjs} +3 -3
  42. package/dist/formatter-BFgV1HhV-DyybWSuj.cjs.map +1 -0
  43. package/dist/formatters/index.cjs +2 -2
  44. package/dist/formatters/index.d.cts +2 -2
  45. package/dist/formatters/index.d.ts +2 -2
  46. package/dist/formatters/index.js +2 -2
  47. package/dist/{formatters-zd0Gs4Cs.cjs → formatters-Cjng28nY.cjs} +12 -12
  48. package/dist/{formatters-zd0Gs4Cs.cjs.map → formatters-Cjng28nY.cjs.map} +1 -1
  49. package/dist/{formatters-BAbGsnYA.js → formatters-Dqccnt-p.js} +12 -12
  50. package/dist/{formatters-BAbGsnYA.js.map → formatters-Dqccnt-p.js.map} +1 -1
  51. package/dist/generators/index.cjs +8 -8
  52. package/dist/generators/index.d.cts +2 -2
  53. package/dist/generators/index.d.ts +2 -2
  54. package/dist/generators/index.js +7 -7
  55. package/dist/{hasOwnProp-D9Tpgokd.cjs → hasOwnProp-DTWYqy7S.cjs} +5 -5
  56. package/dist/{hasOwnProp-D9Tpgokd.cjs.map → hasOwnProp-DTWYqy7S.cjs.map} +1 -1
  57. package/dist/{hasOwnProp-CVIhlD1i.js → hasOwnProp-yVVsxPin.js} +5 -5
  58. package/dist/{hasOwnProp-CVIhlD1i.js.map → hasOwnProp-yVVsxPin.js.map} +1 -1
  59. package/dist/{index-BVovC-yK.d.cts → index-9Ql1W3gt.d.cts} +3 -3
  60. package/dist/{index-9JsU_wMu.d.ts → index-BD0J8wkE.d.cts} +3 -3
  61. package/dist/{index-CjpbuJF4.d.ts → index-BcoUy2oV.d.ts} +2 -2
  62. package/dist/{index-hOqBIL7F.d.ts → index-Bpk3YwGW.d.ts} +3 -3
  63. package/dist/{index-Dm4a___O.d.ts → index-CTMG8cZV.d.ts} +2 -2
  64. package/dist/{index-C1X6ha9s.d.cts → index-DUBCXPy4.d.cts} +2 -2
  65. package/dist/{index-Dwduk7ez.d.cts → index-DhUTzQ_o.d.ts} +3 -3
  66. package/dist/{index-jyuOZMX7.d.ts → index-DqYMKSmd.d.ts} +3 -3
  67. package/dist/{index-DlyDmXUo.d.ts → index-JfwSupYB.d.ts} +2 -2
  68. package/dist/{index-BP3sUrAx.d.ts → index-O2q2f-pu.d.cts} +2 -2
  69. package/dist/{index-I5V6RbZM.d.cts → index-VgNZ6ndx.d.cts} +3 -3
  70. package/dist/{index-lI0b7iUz.d.cts → index-k_rjVRjU.d.ts} +2 -2
  71. package/dist/{index-DZHiYYR7.d.ts → index-or0oP9i2.d.cts} +2 -2
  72. package/dist/{index-DZHiYYR7.d.cts → index-or0oP9i2.d.ts} +2 -2
  73. package/dist/{index-CcPQZ41G.d.cts → index-u4-Euidh.d.cts} +2 -2
  74. package/dist/{index-CssrQyHh.d.cts → index-zAqCZxGr.d.cts} +2 -2
  75. package/dist/{isBigInt-Cez32M69.js → isBigInt-DdFRCpeE.js} +2 -2
  76. package/dist/{isBigInt-Cez32M69.js.map → isBigInt-DdFRCpeE.js.map} +1 -1
  77. package/dist/{isBigInt-YgpNKTbA.cjs → isBigInt-LkCpVJ3E.cjs} +2 -2
  78. package/dist/{isBigInt-YgpNKTbA.cjs.map → isBigInt-LkCpVJ3E.cjs.map} +1 -1
  79. package/dist/{isEmptyString-C9QLWjx2.js → isEmptyString-B6ubItgT.js} +3 -3
  80. package/dist/{isEmptyString-C9QLWjx2.js.map → isEmptyString-B6ubItgT.js.map} +1 -1
  81. package/dist/{isEmptyString-O4TFe1Ao.cjs → isEmptyString-Csc5Sf_W.cjs} +3 -3
  82. package/dist/{isEmptyString-O4TFe1Ao.cjs.map → isEmptyString-Csc5Sf_W.cjs.map} +1 -1
  83. package/dist/{isEmptyValue-kCjnLjbN.js → isEmptyValue-h97JT4pD.js} +4 -4
  84. package/dist/{isEmptyValue-kCjnLjbN.js.map → isEmptyValue-h97JT4pD.js.map} +1 -1
  85. package/dist/{isEmptyValue-CFExALXZ.cjs → isEmptyValue-qNOhUBFE.cjs} +4 -4
  86. package/dist/{isEmptyValue-CFExALXZ.cjs.map → isEmptyValue-qNOhUBFE.cjs.map} +1 -1
  87. package/dist/{isFinite-B_hHbDpa.cjs → isFinite-CKeuVXbD.cjs} +3 -3
  88. package/dist/{isFinite-B_hHbDpa.cjs.map → isFinite-CKeuVXbD.cjs.map} +1 -1
  89. package/dist/{isFinite-ZvNhyHlF.js → isFinite-CzYYv-mQ.js} +3 -3
  90. package/dist/{isFinite-ZvNhyHlF.js.map → isFinite-CzYYv-mQ.js.map} +1 -1
  91. package/dist/{isInteger-aZgzTTZG.js → isInteger-BtA3flbk.js} +2 -2
  92. package/dist/{isInteger-aZgzTTZG.js.map → isInteger-BtA3flbk.js.map} +1 -1
  93. package/dist/{isInteger-dnc6W63Z.cjs → isInteger-iTok9NaH.cjs} +2 -2
  94. package/dist/{isInteger-dnc6W63Z.cjs.map → isInteger-iTok9NaH.cjs.map} +1 -1
  95. package/dist/{isNumber-BCWD4dW0.js → isNumber-C1mOuBuA.js} +3 -3
  96. package/dist/{isNumber-BCWD4dW0.js.map → isNumber-C1mOuBuA.js.map} +1 -1
  97. package/dist/{isNumber-BkzwAe50.cjs → isNumber-CM1vdNcW.cjs} +3 -3
  98. package/dist/{isNumber-BkzwAe50.cjs.map → isNumber-CM1vdNcW.cjs.map} +1 -1
  99. package/dist/{isPlainObject-CJvRG4Je.d.ts → isPlainObject-DQoM4DGQ.d.ts} +2 -2
  100. package/dist/{isPlainObject-CAe_ElKO.d.cts → isPlainObject-Y__iykWN.d.cts} +2 -2
  101. package/dist/{isServer-DhFaedeT.cjs → isServer-CWlp2R2N.cjs} +2 -2
  102. package/dist/{isServer-DhFaedeT.cjs.map → isServer-CWlp2R2N.cjs.map} +1 -1
  103. package/dist/{isServer-CQzrX5e0.js → isServer-Drgyboev.js} +2 -2
  104. package/dist/{isServer-CQzrX5e0.js.map → isServer-Drgyboev.js.map} +1 -1
  105. package/dist/{isTypedArray-DxsPKrLh.js → isTypedArray-BY8CIj3k.js} +5 -5
  106. package/dist/{isTypedArray-DxsPKrLh.js.map → isTypedArray-BY8CIj3k.js.map} +1 -1
  107. package/dist/{isTypedArray-DjADSu8q.cjs → isTypedArray-DspIjxdk.cjs} +5 -5
  108. package/dist/{isTypedArray-DjADSu8q.cjs.map → isTypedArray-DspIjxdk.cjs.map} +1 -1
  109. package/dist/{isValidDomain-CDtNOhMc.js → isValidDomain-BPfJEkFk.js} +7 -7
  110. package/dist/{isValidDomain-CDtNOhMc.js.map → isValidDomain-BPfJEkFk.js.map} +1 -1
  111. package/dist/{isValidDomain-D_x7uNIu.cjs → isValidDomain-DUUCoKtD.cjs} +10 -10
  112. package/dist/{isValidDomain-D_x7uNIu.cjs.map → isValidDomain-DUUCoKtD.cjs.map} +1 -1
  113. package/dist/{logger-CUacYy3D.cjs → logger-BXg2xufj.cjs} +2 -2
  114. package/dist/{logger-CUacYy3D.cjs.map → logger-BXg2xufj.cjs.map} +1 -1
  115. package/dist/{logger-CLWnKRKE.js → logger-Wxl_Krg6.js} +2 -2
  116. package/dist/{logger-CLWnKRKE.js.map → logger-Wxl_Krg6.js.map} +1 -1
  117. package/dist/{noop-CjEbNsJL.cjs → noop-ByxeOveJ.cjs} +2 -2
  118. package/dist/{noop-CjEbNsJL.cjs.map → noop-ByxeOveJ.cjs.map} +1 -1
  119. package/dist/{noop-qxrcogt5.js → noop-D8aGbjbP.js} +2 -2
  120. package/dist/{noop-qxrcogt5.js.map → noop-D8aGbjbP.js.map} +1 -1
  121. package/dist/{normalizeSpaces-D0_Z4qnO.cjs → normalizeSpaces-CQ7tZLNG.cjs} +3 -3
  122. package/dist/{normalizeSpaces-D0_Z4qnO.cjs.map → normalizeSpaces-CQ7tZLNG.cjs.map} +1 -1
  123. package/dist/{normalizeSpaces-DAsxzBEQ.js → normalizeSpaces-DNUOxp_8.js} +3 -3
  124. package/dist/{normalizeSpaces-DAsxzBEQ.js.map → normalizeSpaces-DNUOxp_8.js.map} +1 -1
  125. package/dist/operations/index.cjs +8 -8
  126. package/dist/operations/index.d.cts +2 -2
  127. package/dist/operations/index.d.ts +2 -2
  128. package/dist/operations/index.js +8 -8
  129. package/dist/parsers/index.cjs +2 -2
  130. package/dist/parsers/index.d.cts +1 -1
  131. package/dist/parsers/index.d.ts +1 -1
  132. package/dist/parsers/index.js +2 -2
  133. package/dist/{parsers-i8WEeMJl.cjs → parsers-CJ5tHtqF.cjs} +4 -4
  134. package/dist/{parsers-i8WEeMJl.cjs.map → parsers-CJ5tHtqF.cjs.map} +1 -1
  135. package/dist/{parsers-BBAE_xVM.js → parsers-DMlqliPw.js} +4 -4
  136. package/dist/{parsers-BBAE_xVM.js.map → parsers-DMlqliPw.js.map} +1 -1
  137. package/dist/{parsing-DGjB8cwr.cjs → parsing-DB_S0WFz.cjs} +3 -3
  138. package/dist/{parsing-DGjB8cwr.cjs.map → parsing-DB_S0WFz.cjs.map} +1 -1
  139. package/dist/{parsing-D9tbKQ0v.js → parsing-DhIQhWpX.js} +3 -3
  140. package/dist/{parsing-D9tbKQ0v.js.map → parsing-DhIQhWpX.js.map} +1 -1
  141. package/dist/predicates/index.cjs +14 -14
  142. package/dist/predicates/index.d.cts +3 -3
  143. package/dist/predicates/index.d.ts +3 -3
  144. package/dist/predicates/index.js +14 -14
  145. package/dist/{predicates-C0dova7l.js → predicates-BzYMbNrZ.js} +11 -11
  146. package/dist/{predicates-C0dova7l.js.map → predicates-BzYMbNrZ.js.map} +1 -1
  147. package/dist/{predicates-Dd7To7B4.cjs → predicates-DDW3etqF.cjs} +11 -11
  148. package/dist/{predicates-Dd7To7B4.cjs.map → predicates-DDW3etqF.cjs.map} +1 -1
  149. package/dist/promises/index.cjs +5 -5
  150. package/dist/promises/index.d.cts +2 -2
  151. package/dist/promises/index.d.ts +2 -2
  152. package/dist/promises/index.js +5 -5
  153. package/dist/{punyCode-DHTLhGdD.cjs → punyCode-B_VPjG0d.cjs} +4 -4
  154. package/dist/{punyCode-DHTLhGdD.cjs.map → punyCode-B_VPjG0d.cjs.map} +1 -1
  155. package/dist/{punyCode-Deb1Mrkc.js → punyCode-DsuJbWCl.js} +4 -4
  156. package/dist/{punyCode-Deb1Mrkc.js.map → punyCode-DsuJbWCl.js.map} +1 -1
  157. package/dist/{removeSpaces-BPnsdRN0.js → removeSpaces-BF-T_1Yt.js} +3 -3
  158. package/dist/{removeSpaces-BPnsdRN0.js.map → removeSpaces-BF-T_1Yt.js.map} +1 -1
  159. package/dist/{removeSpaces-CN3pxBz_.cjs → removeSpaces-BJu-gKps.cjs} +3 -3
  160. package/dist/{removeSpaces-CN3pxBz_.cjs.map → removeSpaces-BJu-gKps.cjs.map} +1 -1
  161. package/dist/rzl-utils.global.js +1 -1
  162. package/dist/{safeJsonParse-D1FLVTEM.cjs → safeJsonParse-B5F8XtrZ.cjs} +7 -7
  163. package/dist/{safeJsonParse-D1FLVTEM.cjs.map → safeJsonParse-B5F8XtrZ.cjs.map} +1 -1
  164. package/dist/{safeJsonParse-DEVKNDSn.js → safeJsonParse-DYSkUnhM.js} +7 -7
  165. package/dist/{safeJsonParse-DEVKNDSn.js.map → safeJsonParse-DYSkUnhM.js.map} +1 -1
  166. package/dist/{safeStableStringify-DfwxmiWn.js → safeStableStringify-CDSYnLUz.js} +5 -5
  167. package/dist/{safeStableStringify-DfwxmiWn.js.map → safeStableStringify-CDSYnLUz.js.map} +1 -1
  168. package/dist/{safeStableStringify-C5HHKUdn.cjs → safeStableStringify-MuBiT-4B.cjs} +5 -5
  169. package/dist/{safeStableStringify-C5HHKUdn.cjs.map → safeStableStringify-MuBiT-4B.cjs.map} +1 -1
  170. package/dist/strings/index.cjs +6 -6
  171. package/dist/strings/index.d.cts +2 -2
  172. package/dist/strings/index.d.ts +2 -2
  173. package/dist/strings/index.js +6 -6
  174. package/dist/tailwind/index.cjs +2 -2
  175. package/dist/tailwind/index.d.cts +2 -2
  176. package/dist/tailwind/index.d.ts +2 -2
  177. package/dist/tailwind/index.js +2 -2
  178. package/dist/{tailwind-tJNnFPsF.js → tailwind-BhHULklj.js} +6 -6
  179. package/dist/{tailwind-tJNnFPsF.js.map → tailwind-BhHULklj.js.map} +1 -1
  180. package/dist/{tailwind-BG7B0cDs.cjs → tailwind-hx6TIFIL.cjs} +6 -6
  181. package/dist/{tailwind-BG7B0cDs.cjs.map → tailwind-hx6TIFIL.cjs.map} +1 -1
  182. package/dist/{toStringArrayUnRecursive-D0WbLIRz.js → toStringArrayUnRecursive-U-nkEIDs.js} +6 -6
  183. package/dist/{toStringArrayUnRecursive-D0WbLIRz.js.map → toStringArrayUnRecursive-U-nkEIDs.js.map} +1 -1
  184. package/dist/{toStringArrayUnRecursive-QLoaNX_-.cjs → toStringArrayUnRecursive-_lJEmBlf.cjs} +6 -6
  185. package/dist/{toStringArrayUnRecursive-QLoaNX_-.cjs.map → toStringArrayUnRecursive-_lJEmBlf.cjs.map} +1 -1
  186. package/dist/urls/index.cjs +3 -3
  187. package/dist/urls/index.d.cts +1 -1
  188. package/dist/urls/index.d.ts +1 -1
  189. package/dist/urls/index.js +3 -3
  190. package/dist/{urls-EoWslGgg.js → urls-BcGIFgfR.js} +14 -14
  191. package/dist/{urls-EoWslGgg.js.map → urls-BcGIFgfR.js.map} +1 -1
  192. package/dist/{urls-NCzPepe2.cjs → urls-DGvZsMSN.cjs} +15 -15
  193. package/dist/{urls-NCzPepe2.cjs.map → urls-DGvZsMSN.cjs.map} +1 -1
  194. package/package.json +4 -4
  195. package/dist/formatter-ekJQF_bA-BepnCBkQ.cjs.map +0 -1
  196. package/dist/formatter-ekJQF_bA-xLD9mGk4.js.map +0 -1
@@ -2,7 +2,7 @@
2
2
  * ========================================================================
3
3
  * @rzl-zone/utils-js
4
4
  * ------------------------------------------------------------------------
5
- * Version: `3.14.0-beta.0`
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
  * ========================================================================
@@ -2,7 +2,7 @@
2
2
  * ========================================================================
3
3
  * @rzl-zone/utils-js
4
4
  * ------------------------------------------------------------------------
5
- * Version: `3.14.0-beta.0`
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
  * ========================================================================
@@ -2,12 +2,12 @@
2
2
  * ========================================================================
3
3
  * @rzl-zone/utils-js
4
4
  * ------------------------------------------------------------------------
5
- * Version: `3.14.0-beta.0`
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
- import { w as isNonEmptyString } from "./logger-CLWnKRKE.js";
10
+ import { w as isNonEmptyString } from "./logger-Wxl_Krg6.js";
11
11
  var AbortError = class extends Error {
12
12
  constructor(message = "The operation was aborted", options) {
13
13
  super(message);
@@ -17,4 +17,4 @@ var AbortError = class extends Error {
17
17
  }
18
18
  };
19
19
  export { AbortError as t };
20
- //# sourceMappingURL=AbortError-DVT8lAKn.js.map
20
+ //# sourceMappingURL=AbortError-CgE6QNOR.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AbortError-DVT8lAKn.js","names":[],"sources":["../src/errors/AbortError.ts"],"sourcesContent":["import { isNonEmptyString } from \"@/predicates\";\n\ntype AbortErrorOptions = {\n /** -------------------------------------------------------------------\n * * ***Optional text inserted before `\"AbortError\"`.***\n * --------------------------------------------------------------------\n * Empty strings and whitespace-only values are ignored.\n *\n * ---\n * @default \"\"\n */\n prefix?: string;\n\n /** -------------------------------------------------------------------\n * * ***Optional text inserted after `\"AbortError\"`.***\n * --------------------------------------------------------------------\n *\n * Empty strings and whitespace-only values are ignored.\n *\n * ---\n * @default \"\"\n */\n suffix?: string;\n};\n\n/** ---------------------------------------------------------------------\n * * ***Class: `AbortError`.***\n * ----------------------------------------------------------------------\n * **Custom error type used for cancellation-related operations.**\n *\n * ---\n * - **Behavior:**\n * - Extends the native ***`Error`*** class.\n * - Provides a consistent abort error shape across runtimes.\n * - Useful for Promise-based utilities that support\n * cancellation via ***`AbortSignal`***.\n * - Uses `\"AbortError\"` as the base error name.\n * - Supports optional `prefix` and `suffix`\n * for contextual error naming.\n *\n * ---\n *\n * @extends Error - Extending `Error` Class.\n *\n * ---\n * @param {string} [message=\"The operation was aborted\"]\n * The error message describing the abort reason.\n *\n * @param {object} [options]\n * Optional configuration object.\n *\n * @param {string} [options.prefix]\n * Optional text inserted before `\"AbortError\"`.\n * Empty strings and whitespace-only values are ignored.\n *\n * @param {string} [options.suffix]\n * Optional text inserted after `\"AbortError\"`.\n * Empty strings and whitespace-only values are ignored.\n *\n * ---\n * @example\n * ```ts\n * throw new AbortError();\n * ```\n *\n * @example\n * ```ts\n * throw new AbortError(\n * \"Delay cancelled\",\n * {\n * prefix: \"Delay\"\n * }\n * );\n *\n * // Result:\n * // name -> \"DelayAbortError\"\n * ```\n *\n * @example\n * ```ts\n * throw new AbortError(\n * \"Queue cancelled\",\n * {\n * suffix: \":Queue\"\n * }\n * );\n *\n * // Result:\n * // name \"AbortError:Queue\"\n * ```\n *\n * @example\n * ```ts\n * try {\n * await delay(\n * 5000,\n * controller.signal\n * );\n * } catch (error) {\n * if (error instanceof AbortError) {\n * console.log(error.message);\n * }\n * }\n * ```\n */\nexport class AbortError extends Error {\n /** ------------------------------------------------------------\n * * ***Constructor: `AbortError`.***\n * -------------------------------------------------------------\n * **Creates a new `AbortError` instance with optional\n * contextual error name customization.**\n *\n * ---\n * - **Behavior:**\n * - Initializes the native ***`Error`*** base class.\n * - Uses `\"AbortError\"` as the default error name.\n * - Automatically trims `prefix` and `suffix` values.\n * - Ignores empty or whitespace-only values.\n * - Generates a contextual error name using:\n * `prefix + \"AbortError\" + suffix`.\n *\n * ---\n * @param {string} [message=\"The operation was aborted\"]\n * The error message describing the abort reason.\n *\n * @param {AbortErrorOptions} [options]\n * Optional configuration object.\n *\n * @param {string} [options.prefix]\n * Optional text inserted before `\"AbortError\"`.\n * Empty strings and whitespace-only values are ignored.\n *\n * @param {string} [options.suffix]\n * Optional text inserted after `\"AbortError\"`.\n * Empty strings and whitespace-only values are ignored.\n *\n * ---\n * @example\n * ```ts\n * new AbortError();\n *\n * // Result:\n * // name -> \"AbortError\"\n * // message -> \"The operation was aborted\"\n * ```\n *\n * @example\n * ```ts\n * new AbortError(\n * \"Delay cancelled\",\n * {\n * prefix: \"Delay\"\n * }\n * );\n *\n * // Result:\n * // name -> \"DelayAbortError\"\n * ```\n *\n * @example\n * ```ts\n * new AbortError(\n * \"Queue cancelled\",\n * {\n * suffix: \":Queue\"\n * }\n * );\n *\n * // Result:\n * // name -> \"AbortError:Queue\"\n * ```\n */\n constructor(\n message: string = \"The operation was aborted\",\n options?: AbortErrorOptions\n ) {\n super(message);\n\n const prefix = isNonEmptyString(options?.prefix)\n ? `${options.prefix.trim()}`\n : \"\";\n\n const suffix = isNonEmptyString(options?.suffix)\n ? `${options.suffix.trim()}`\n : \"\";\n\n this.name = `${prefix}AbortError${suffix}`;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyGA,IAAa,aAAb,cAAgC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmEpC,YACE,UAAkB,6BAClB,SACA;EACA,MAAM,OAAO;EAEb,MAAM,SAAS,iBAAiB,SAAS,MAAM,IAC3C,GAAG,QAAQ,OAAO,KAAK,MACvB;EAEJ,MAAM,SAAS,iBAAiB,SAAS,MAAM,IAC3C,GAAG,QAAQ,OAAO,KAAK,MACvB;EAEJ,KAAK,OAAO,GAAG,OAAO,YAAY;CACpC;AACF"}
1
+ {"version":3,"file":"AbortError-CgE6QNOR.js","names":[],"sources":["../src/errors/AbortError.ts"],"sourcesContent":["import { isNonEmptyString } from \"@/predicates\";\n\ntype AbortErrorOptions = {\n /** -------------------------------------------------------------------\n * * ***Optional text inserted before `\"AbortError\"`.***\n * --------------------------------------------------------------------\n * Empty strings and whitespace-only values are ignored.\n *\n * ---\n * @default \"\"\n */\n prefix?: string;\n\n /** -------------------------------------------------------------------\n * * ***Optional text inserted after `\"AbortError\"`.***\n * --------------------------------------------------------------------\n *\n * Empty strings and whitespace-only values are ignored.\n *\n * ---\n * @default \"\"\n */\n suffix?: string;\n};\n\n/** ---------------------------------------------------------------------\n * * ***Class: `AbortError`.***\n * ----------------------------------------------------------------------\n * **Custom error type used for cancellation-related operations.**\n *\n * ---\n * - **Behavior:**\n * - Extends the native ***`Error`*** class.\n * - Provides a consistent abort error shape across runtimes.\n * - Useful for Promise-based utilities that support\n * cancellation via ***`AbortSignal`***.\n * - Uses `\"AbortError\"` as the base error name.\n * - Supports optional `prefix` and `suffix`\n * for contextual error naming.\n *\n * ---\n *\n * @extends Error - Extending `Error` Class.\n *\n * ---\n * @param {string} [message=\"The operation was aborted\"]\n * The error message describing the abort reason.\n *\n * @param {object} [options]\n * Optional configuration object.\n *\n * @param {string} [options.prefix]\n * Optional text inserted before `\"AbortError\"`.\n * Empty strings and whitespace-only values are ignored.\n *\n * @param {string} [options.suffix]\n * Optional text inserted after `\"AbortError\"`.\n * Empty strings and whitespace-only values are ignored.\n *\n * ---\n * @example\n * ```ts\n * throw new AbortError();\n * ```\n *\n * @example\n * ```ts\n * throw new AbortError(\n * \"Delay cancelled\",\n * {\n * prefix: \"Delay\"\n * }\n * );\n *\n * // Result:\n * // name -> \"DelayAbortError\"\n * ```\n *\n * @example\n * ```ts\n * throw new AbortError(\n * \"Queue cancelled\",\n * {\n * suffix: \":Queue\"\n * }\n * );\n *\n * // Result:\n * // name \"AbortError:Queue\"\n * ```\n *\n * @example\n * ```ts\n * try {\n * await delay(\n * 5000,\n * controller.signal\n * );\n * } catch (error) {\n * if (error instanceof AbortError) {\n * console.log(error.message);\n * }\n * }\n * ```\n */\nexport class AbortError extends Error {\n /** ------------------------------------------------------------\n * * ***Constructor: `AbortError`.***\n * -------------------------------------------------------------\n * **Creates a new `AbortError` instance with optional\n * contextual error name customization.**\n *\n * ---\n * - **Behavior:**\n * - Initializes the native ***`Error`*** base class.\n * - Uses `\"AbortError\"` as the default error name.\n * - Automatically trims `prefix` and `suffix` values.\n * - Ignores empty or whitespace-only values.\n * - Generates a contextual error name using:\n * `prefix + \"AbortError\" + suffix`.\n *\n * ---\n * @param {string} [message=\"The operation was aborted\"]\n * The error message describing the abort reason.\n *\n * @param {AbortErrorOptions} [options]\n * Optional configuration object.\n *\n * @param {string} [options.prefix]\n * Optional text inserted before `\"AbortError\"`.\n * Empty strings and whitespace-only values are ignored.\n *\n * @param {string} [options.suffix]\n * Optional text inserted after `\"AbortError\"`.\n * Empty strings and whitespace-only values are ignored.\n *\n * ---\n * @example\n * ```ts\n * new AbortError();\n *\n * // Result:\n * // name -> \"AbortError\"\n * // message -> \"The operation was aborted\"\n * ```\n *\n * @example\n * ```ts\n * new AbortError(\n * \"Delay cancelled\",\n * {\n * prefix: \"Delay\"\n * }\n * );\n *\n * // Result:\n * // name -> \"DelayAbortError\"\n * ```\n *\n * @example\n * ```ts\n * new AbortError(\n * \"Queue cancelled\",\n * {\n * suffix: \":Queue\"\n * }\n * );\n *\n * // Result:\n * // name -> \"AbortError:Queue\"\n * ```\n */\n constructor(\n message: string = \"The operation was aborted\",\n options?: AbortErrorOptions\n ) {\n super(message);\n\n const prefix = isNonEmptyString(options?.prefix)\n ? `${options.prefix.trim()}`\n : \"\";\n\n const suffix = isNonEmptyString(options?.suffix)\n ? `${options.suffix.trim()}`\n : \"\";\n\n this.name = `${prefix}AbortError${suffix}`;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyGA,IAAa,aAAb,cAAgC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmEpC,YACE,UAAkB,6BAClB,SACA;EACA,MAAM,OAAO;EAEb,MAAM,SAAS,iBAAiB,SAAS,MAAM,IAC3C,GAAG,QAAQ,OAAO,KAAK,MACvB;EAEJ,MAAM,SAAS,iBAAiB,SAAS,MAAM,IAC3C,GAAG,QAAQ,OAAO,KAAK,MACvB;EAEJ,KAAK,OAAO,GAAG,OAAO,YAAY;CACpC;AACF"}
@@ -2,13 +2,13 @@
2
2
  * ========================================================================
3
3
  * @rzl-zone/utils-js
4
4
  * ------------------------------------------------------------------------
5
- * Version: `3.14.0-beta.0`
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
  "use strict";
11
- const require_logger = require('./logger-CUacYy3D.cjs');
11
+ const require_logger = require('./logger-BXg2xufj.cjs');
12
12
  var AbortError = class extends Error {
13
13
  constructor(message = "The operation was aborted", options) {
14
14
  super(message);
@@ -23,4 +23,4 @@ Object.defineProperty(exports, 'AbortError', {
23
23
  return AbortError;
24
24
  }
25
25
  });
26
- //# sourceMappingURL=AbortError-DK6kpzbu.cjs.map
26
+ //# sourceMappingURL=AbortError-D54txsmn.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"AbortError-DK6kpzbu.cjs","names":["isNonEmptyString"],"sources":["../src/errors/AbortError.ts"],"sourcesContent":["import { isNonEmptyString } from \"@/predicates\";\n\ntype AbortErrorOptions = {\n /** -------------------------------------------------------------------\n * * ***Optional text inserted before `\"AbortError\"`.***\n * --------------------------------------------------------------------\n * Empty strings and whitespace-only values are ignored.\n *\n * ---\n * @default \"\"\n */\n prefix?: string;\n\n /** -------------------------------------------------------------------\n * * ***Optional text inserted after `\"AbortError\"`.***\n * --------------------------------------------------------------------\n *\n * Empty strings and whitespace-only values are ignored.\n *\n * ---\n * @default \"\"\n */\n suffix?: string;\n};\n\n/** ---------------------------------------------------------------------\n * * ***Class: `AbortError`.***\n * ----------------------------------------------------------------------\n * **Custom error type used for cancellation-related operations.**\n *\n * ---\n * - **Behavior:**\n * - Extends the native ***`Error`*** class.\n * - Provides a consistent abort error shape across runtimes.\n * - Useful for Promise-based utilities that support\n * cancellation via ***`AbortSignal`***.\n * - Uses `\"AbortError\"` as the base error name.\n * - Supports optional `prefix` and `suffix`\n * for contextual error naming.\n *\n * ---\n *\n * @extends Error - Extending `Error` Class.\n *\n * ---\n * @param {string} [message=\"The operation was aborted\"]\n * The error message describing the abort reason.\n *\n * @param {object} [options]\n * Optional configuration object.\n *\n * @param {string} [options.prefix]\n * Optional text inserted before `\"AbortError\"`.\n * Empty strings and whitespace-only values are ignored.\n *\n * @param {string} [options.suffix]\n * Optional text inserted after `\"AbortError\"`.\n * Empty strings and whitespace-only values are ignored.\n *\n * ---\n * @example\n * ```ts\n * throw new AbortError();\n * ```\n *\n * @example\n * ```ts\n * throw new AbortError(\n * \"Delay cancelled\",\n * {\n * prefix: \"Delay\"\n * }\n * );\n *\n * // Result:\n * // name -> \"DelayAbortError\"\n * ```\n *\n * @example\n * ```ts\n * throw new AbortError(\n * \"Queue cancelled\",\n * {\n * suffix: \":Queue\"\n * }\n * );\n *\n * // Result:\n * // name \"AbortError:Queue\"\n * ```\n *\n * @example\n * ```ts\n * try {\n * await delay(\n * 5000,\n * controller.signal\n * );\n * } catch (error) {\n * if (error instanceof AbortError) {\n * console.log(error.message);\n * }\n * }\n * ```\n */\nexport class AbortError extends Error {\n /** ------------------------------------------------------------\n * * ***Constructor: `AbortError`.***\n * -------------------------------------------------------------\n * **Creates a new `AbortError` instance with optional\n * contextual error name customization.**\n *\n * ---\n * - **Behavior:**\n * - Initializes the native ***`Error`*** base class.\n * - Uses `\"AbortError\"` as the default error name.\n * - Automatically trims `prefix` and `suffix` values.\n * - Ignores empty or whitespace-only values.\n * - Generates a contextual error name using:\n * `prefix + \"AbortError\" + suffix`.\n *\n * ---\n * @param {string} [message=\"The operation was aborted\"]\n * The error message describing the abort reason.\n *\n * @param {AbortErrorOptions} [options]\n * Optional configuration object.\n *\n * @param {string} [options.prefix]\n * Optional text inserted before `\"AbortError\"`.\n * Empty strings and whitespace-only values are ignored.\n *\n * @param {string} [options.suffix]\n * Optional text inserted after `\"AbortError\"`.\n * Empty strings and whitespace-only values are ignored.\n *\n * ---\n * @example\n * ```ts\n * new AbortError();\n *\n * // Result:\n * // name -> \"AbortError\"\n * // message -> \"The operation was aborted\"\n * ```\n *\n * @example\n * ```ts\n * new AbortError(\n * \"Delay cancelled\",\n * {\n * prefix: \"Delay\"\n * }\n * );\n *\n * // Result:\n * // name -> \"DelayAbortError\"\n * ```\n *\n * @example\n * ```ts\n * new AbortError(\n * \"Queue cancelled\",\n * {\n * suffix: \":Queue\"\n * }\n * );\n *\n * // Result:\n * // name -> \"AbortError:Queue\"\n * ```\n */\n constructor(\n message: string = \"The operation was aborted\",\n options?: AbortErrorOptions\n ) {\n super(message);\n\n const prefix = isNonEmptyString(options?.prefix)\n ? `${options.prefix.trim()}`\n : \"\";\n\n const suffix = isNonEmptyString(options?.suffix)\n ? `${options.suffix.trim()}`\n : \"\";\n\n this.name = `${prefix}AbortError${suffix}`;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyGA,IAAa,aAAb,cAAgC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmEpC,YACE,UAAkB,6BAClB,SACA;EACA,MAAM,OAAO;EAEb,MAAM,SAASA,gCAAiB,SAAS,MAAM,IAC3C,GAAG,QAAQ,OAAO,KAAK,MACvB;EAEJ,MAAM,SAASA,gCAAiB,SAAS,MAAM,IAC3C,GAAG,QAAQ,OAAO,KAAK,MACvB;EAEJ,KAAK,OAAO,GAAG,OAAO,YAAY;CACpC;AACF"}
1
+ {"version":3,"file":"AbortError-D54txsmn.cjs","names":["isNonEmptyString"],"sources":["../src/errors/AbortError.ts"],"sourcesContent":["import { isNonEmptyString } from \"@/predicates\";\n\ntype AbortErrorOptions = {\n /** -------------------------------------------------------------------\n * * ***Optional text inserted before `\"AbortError\"`.***\n * --------------------------------------------------------------------\n * Empty strings and whitespace-only values are ignored.\n *\n * ---\n * @default \"\"\n */\n prefix?: string;\n\n /** -------------------------------------------------------------------\n * * ***Optional text inserted after `\"AbortError\"`.***\n * --------------------------------------------------------------------\n *\n * Empty strings and whitespace-only values are ignored.\n *\n * ---\n * @default \"\"\n */\n suffix?: string;\n};\n\n/** ---------------------------------------------------------------------\n * * ***Class: `AbortError`.***\n * ----------------------------------------------------------------------\n * **Custom error type used for cancellation-related operations.**\n *\n * ---\n * - **Behavior:**\n * - Extends the native ***`Error`*** class.\n * - Provides a consistent abort error shape across runtimes.\n * - Useful for Promise-based utilities that support\n * cancellation via ***`AbortSignal`***.\n * - Uses `\"AbortError\"` as the base error name.\n * - Supports optional `prefix` and `suffix`\n * for contextual error naming.\n *\n * ---\n *\n * @extends Error - Extending `Error` Class.\n *\n * ---\n * @param {string} [message=\"The operation was aborted\"]\n * The error message describing the abort reason.\n *\n * @param {object} [options]\n * Optional configuration object.\n *\n * @param {string} [options.prefix]\n * Optional text inserted before `\"AbortError\"`.\n * Empty strings and whitespace-only values are ignored.\n *\n * @param {string} [options.suffix]\n * Optional text inserted after `\"AbortError\"`.\n * Empty strings and whitespace-only values are ignored.\n *\n * ---\n * @example\n * ```ts\n * throw new AbortError();\n * ```\n *\n * @example\n * ```ts\n * throw new AbortError(\n * \"Delay cancelled\",\n * {\n * prefix: \"Delay\"\n * }\n * );\n *\n * // Result:\n * // name -> \"DelayAbortError\"\n * ```\n *\n * @example\n * ```ts\n * throw new AbortError(\n * \"Queue cancelled\",\n * {\n * suffix: \":Queue\"\n * }\n * );\n *\n * // Result:\n * // name \"AbortError:Queue\"\n * ```\n *\n * @example\n * ```ts\n * try {\n * await delay(\n * 5000,\n * controller.signal\n * );\n * } catch (error) {\n * if (error instanceof AbortError) {\n * console.log(error.message);\n * }\n * }\n * ```\n */\nexport class AbortError extends Error {\n /** ------------------------------------------------------------\n * * ***Constructor: `AbortError`.***\n * -------------------------------------------------------------\n * **Creates a new `AbortError` instance with optional\n * contextual error name customization.**\n *\n * ---\n * - **Behavior:**\n * - Initializes the native ***`Error`*** base class.\n * - Uses `\"AbortError\"` as the default error name.\n * - Automatically trims `prefix` and `suffix` values.\n * - Ignores empty or whitespace-only values.\n * - Generates a contextual error name using:\n * `prefix + \"AbortError\" + suffix`.\n *\n * ---\n * @param {string} [message=\"The operation was aborted\"]\n * The error message describing the abort reason.\n *\n * @param {AbortErrorOptions} [options]\n * Optional configuration object.\n *\n * @param {string} [options.prefix]\n * Optional text inserted before `\"AbortError\"`.\n * Empty strings and whitespace-only values are ignored.\n *\n * @param {string} [options.suffix]\n * Optional text inserted after `\"AbortError\"`.\n * Empty strings and whitespace-only values are ignored.\n *\n * ---\n * @example\n * ```ts\n * new AbortError();\n *\n * // Result:\n * // name -> \"AbortError\"\n * // message -> \"The operation was aborted\"\n * ```\n *\n * @example\n * ```ts\n * new AbortError(\n * \"Delay cancelled\",\n * {\n * prefix: \"Delay\"\n * }\n * );\n *\n * // Result:\n * // name -> \"DelayAbortError\"\n * ```\n *\n * @example\n * ```ts\n * new AbortError(\n * \"Queue cancelled\",\n * {\n * suffix: \":Queue\"\n * }\n * );\n *\n * // Result:\n * // name -> \"AbortError:Queue\"\n * ```\n */\n constructor(\n message: string = \"The operation was aborted\",\n options?: AbortErrorOptions\n ) {\n super(message);\n\n const prefix = isNonEmptyString(options?.prefix)\n ? `${options.prefix.trim()}`\n : \"\";\n\n const suffix = isNonEmptyString(options?.suffix)\n ? `${options.suffix.trim()}`\n : \"\";\n\n this.name = `${prefix}AbortError${suffix}`;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyGA,IAAa,aAAb,cAAgC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmEpC,YACE,UAAkB,6BAClB,SACA;EACA,MAAM,OAAO;EAEb,MAAM,SAASA,gCAAiB,SAAS,MAAM,IAC3C,GAAG,QAAQ,OAAO,KAAK,MACvB;EAEJ,MAAM,SAASA,gCAAiB,SAAS,MAAM,IAC3C,GAAG,QAAQ,OAAO,KAAK,MACvB;EAEJ,KAAK,OAAO,GAAG,OAAO,YAAY;CACpC;AACF"}
@@ -2,12 +2,12 @@
2
2
  * ========================================================================
3
3
  * @rzl-zone/utils-js
4
4
  * ------------------------------------------------------------------------
5
- * Version: `3.14.0-beta.0`
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
- import { O as isArray, r as resolveErrorMessageAssertions } from "./logger-CLWnKRKE.js";
10
+ import { O as isArray, r as resolveErrorMessageAssertions } from "./logger-Wxl_Krg6.js";
11
11
  function assertIsArray(value, options) {
12
12
  if (isArray(value)) return;
13
13
  resolveErrorMessageAssertions({
@@ -17,4 +17,4 @@ function assertIsArray(value, options) {
17
17
  });
18
18
  }
19
19
  export { assertIsArray as t };
20
- //# sourceMappingURL=assertIsArray-CG7L7vlt.js.map
20
+ //# sourceMappingURL=assertIsArray-DmlqnTiq.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"assertIsArray-CG7L7vlt.js","names":[],"sources":["../src/assertions/objects/assertIsArray.ts"],"sourcesContent":["import type {\n IsArray,\n IsReadonlyArray,\n IsUnknown\n} from \"@rzl-zone/ts-types-plus\";\nimport type { ArrayFallback } from \"@/_private/types.arrays\";\n\nimport { isArray } from \"@/predicates/is/isArray\";\n\nimport {\n resolveErrorMessageAssertions,\n type OptionsAssertIs\n} from \"../_private/assertIs\";\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\ntype AssertIsArrayResult<T> =\n IsUnknown<T> extends true\n ? unknown[] & T\n : IsReadonlyArray<T> extends true\n ? T\n : T extends []\n ? T\n : IsArray<T> extends true\n ? T\n : Extract<T, unknown[] | [] | readonly []>;\n\n/** --------------------------------------------------------------------------------\n * * ***Type guard assertion: `assertIsArray`.***\n * ---------------------------------------------------------------------------------\n * **This function is an **assertion function**.**\n *\n * - **Behavior:**\n * - Validates that the given `value` is an **array**.\n * - After it returns successfully, TypeScript narrows the type of `value` to `array` **(generic support)**.\n * - If `value` is an `array` ➔ execution continues normally.\n * - If `value` is not an `array` ➔ throws a built-in error with either:\n * - A custom error message (`options.message`), or\n * - A default message including the actual type.\n * - **Error type selection (`options.errorType`):**\n * - You can override the type of error thrown when validation fails.\n * - Must be one of the standard JavaScript built-in errors:\n * - [`TypeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError) |\n * [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) |\n * [`EvalError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError) |\n * [`RangeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError) |\n * [`ReferenceError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError) |\n * [`SyntaxError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError) |\n * [`URIError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError).\n * - **Default:** `\"TypeError\"` if not provided or invalid.\n *\n * @template T - The input type being asserted.\n * @param {*} value - ***The value to validate.***\n * @param {OptionsAssertIs} [options]\n * ***Optional configuration:***\n * - `message`: A custom error message (`string` or `function`).\n * - `errorType`: Built-in JavaScript error type to throw on failure (default `\"TypeError\"`).\n * - `formatCase`: Controls how detected type names are formatted case in error messages.\n * - `useAcronyms`: Control uppercase preservation of recognized acronyms during formatting.\n *\n * @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.\n * @returns {boolean} Narrows `value` to an `array` **(generic support)** if no error is thrown.\n *\n * @example\n * ```ts\n * // ✅ Simple usage\n * assertIsArray([]);\n * assertIsArray([\"123\", 456]);\n * assertIsArray(Array.from([\"abc\"]));\n * // No error, value is array\n *\n * // ❌ Throws TypeError (default behavior)\n * // Case 1: Invalid input type — received a string instead of a array\n * assertIsArray(\"42\");\n * // ➔ TypeError: \"Parameter input (`value`) must be of type `array`, but received: `string`.\"\n *\n * // ❌ Throws custom error type (e.g., RangeError)\n * assertIsArray(async function () {}, { errorType: \"RangeError\" });\n * // ➔ RangeError: \"Parameter input (`value`) must be of type `array`, but received: `async-function`.\"\n *\n * // ❌ Throws a TypeError with a custom string static message\n * assertIsArray(\"123\", { message: \"Must be a array!\" });\n * // ➔ TypeError: \"Must be a array!\"\n *\n * // ❌ Throws a TypeError with a custom message function and formatCase\n * assertIsArray(/regex/, {\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * formatCase: \"toPascalCaseSpace\"\n * });\n * // ➔ TypeError: \"Expected array but got (Reg Exp).\"\n *\n * // ❌ Throws a TypeError with a custom useAcronyms option\n * // Case 1:\n * assertIsArray(new URL(\"https://example.com\"),{\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected array but got (url).\"\n * assertIsArray(new URL(\"https://example.com\"), {\n * useAcronyms: true,\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected array but got (URL).\"\n *\n * // Case 2:\n * assertIsArray(new URLSearchParams, {\n * formatCase: \"toPascalCase\",\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected array but got (UrlSearchParams).\"\n * assertIsArray(new URLSearchParams, {\n * useAcronyms: true,\n * formatCase: \"toPascalCase\",\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected array but got (URLSearchParams).\"\n * ```\n * -------------------------------------------------------\n * ✅ ***Real-world usage example***:\n * ```ts\n * const mixedValue: string | number[] | undefined = getUserInput();\n *\n * // Runtime assertion: throws if `mixedValue` is not a `number[]`\n * assertIsArray(mixedValue, {\n * errorType: \"RangeError\",\n * message: \"Must be array!\"\n * });\n *\n * // ✅ If no error thrown, TypeScript narrows `mixedValue` to `number[]` here\n * const result: number[] = mixedValue; // ➔ Safe type assignment\n * console.log(result.push(1, 2, 3)); // ➔ Safe to use array methods\n * ```\n */\nexport function assertIsArray(\n value: [],\n options?: OptionsAssertIs\n): asserts value is [];\nexport function assertIsArray<T>(\n value: T,\n options?: OptionsAssertIs\n): asserts value is ArrayFallback<T>;\nexport function assertIsArray(\n value: unknown,\n options?: OptionsAssertIs\n): asserts value is unknown[];\nexport function assertIsArray<T>(value: T, options?: OptionsAssertIs) {\n if (isArray(value)) return;\n\n resolveErrorMessageAssertions({ value, options, requiredValidType: \"array\" });\n}\n"],"mappings":";;;;;;;;;;;;;AAyJA,SAAgB,cAAiB,OAAU,SAA2B;CACpE,IAAI,QAAQ,KAAK,GAAG;CAEpB,8BAA8B;EAAE;EAAO;EAAS,mBAAmB;CAAQ,CAAC;AAC9E"}
1
+ {"version":3,"file":"assertIsArray-DmlqnTiq.js","names":[],"sources":["../src/assertions/objects/assertIsArray.ts"],"sourcesContent":["import type {\n IsArray,\n IsReadonlyArray,\n IsUnknown\n} from \"@rzl-zone/ts-types-plus\";\nimport type { ArrayFallback } from \"@/_private/types.arrays\";\n\nimport { isArray } from \"@/predicates/is/isArray\";\n\nimport {\n resolveErrorMessageAssertions,\n type OptionsAssertIs\n} from \"../_private/assertIs\";\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\ntype AssertIsArrayResult<T> =\n IsUnknown<T> extends true\n ? unknown[] & T\n : IsReadonlyArray<T> extends true\n ? T\n : T extends []\n ? T\n : IsArray<T> extends true\n ? T\n : Extract<T, unknown[] | [] | readonly []>;\n\n/** --------------------------------------------------------------------------------\n * * ***Type guard assertion: `assertIsArray`.***\n * ---------------------------------------------------------------------------------\n * **This function is an **assertion function**.**\n *\n * - **Behavior:**\n * - Validates that the given `value` is an **array**.\n * - After it returns successfully, TypeScript narrows the type of `value` to `array` **(generic support)**.\n * - If `value` is an `array` ➔ execution continues normally.\n * - If `value` is not an `array` ➔ throws a built-in error with either:\n * - A custom error message (`options.message`), or\n * - A default message including the actual type.\n * - **Error type selection (`options.errorType`):**\n * - You can override the type of error thrown when validation fails.\n * - Must be one of the standard JavaScript built-in errors:\n * - [`TypeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError) |\n * [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) |\n * [`EvalError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError) |\n * [`RangeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError) |\n * [`ReferenceError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError) |\n * [`SyntaxError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError) |\n * [`URIError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError).\n * - **Default:** `\"TypeError\"` if not provided or invalid.\n *\n * @template T - The input type being asserted.\n * @param {*} value - ***The value to validate.***\n * @param {OptionsAssertIs} [options]\n * ***Optional configuration:***\n * - `message`: A custom error message (`string` or `function`).\n * - `errorType`: Built-in JavaScript error type to throw on failure (default `\"TypeError\"`).\n * - `formatCase`: Controls how detected type names are formatted case in error messages.\n * - `useAcronyms`: Control uppercase preservation of recognized acronyms during formatting.\n *\n * @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.\n * @returns {boolean} Narrows `value` to an `array` **(generic support)** if no error is thrown.\n *\n * @example\n * ```ts\n * // ✅ Simple usage\n * assertIsArray([]);\n * assertIsArray([\"123\", 456]);\n * assertIsArray(Array.from([\"abc\"]));\n * // No error, value is array\n *\n * // ❌ Throws TypeError (default behavior)\n * // Case 1: Invalid input type — received a string instead of a array\n * assertIsArray(\"42\");\n * // ➔ TypeError: \"Parameter input (`value`) must be of type `array`, but received: `string`.\"\n *\n * // ❌ Throws custom error type (e.g., RangeError)\n * assertIsArray(async function () {}, { errorType: \"RangeError\" });\n * // ➔ RangeError: \"Parameter input (`value`) must be of type `array`, but received: `async-function`.\"\n *\n * // ❌ Throws a TypeError with a custom string static message\n * assertIsArray(\"123\", { message: \"Must be a array!\" });\n * // ➔ TypeError: \"Must be a array!\"\n *\n * // ❌ Throws a TypeError with a custom message function and formatCase\n * assertIsArray(/regex/, {\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * formatCase: \"toPascalCaseSpace\"\n * });\n * // ➔ TypeError: \"Expected array but got (Reg Exp).\"\n *\n * // ❌ Throws a TypeError with a custom useAcronyms option\n * // Case 1:\n * assertIsArray(new URL(\"https://example.com\"),{\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected array but got (url).\"\n * assertIsArray(new URL(\"https://example.com\"), {\n * useAcronyms: true,\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected array but got (URL).\"\n *\n * // Case 2:\n * assertIsArray(new URLSearchParams, {\n * formatCase: \"toPascalCase\",\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected array but got (UrlSearchParams).\"\n * assertIsArray(new URLSearchParams, {\n * useAcronyms: true,\n * formatCase: \"toPascalCase\",\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected array but got (URLSearchParams).\"\n * ```\n * -------------------------------------------------------\n * ✅ ***Real-world usage example***:\n * ```ts\n * const mixedValue: string | number[] | undefined = getUserInput();\n *\n * // Runtime assertion: throws if `mixedValue` is not a `number[]`\n * assertIsArray(mixedValue, {\n * errorType: \"RangeError\",\n * message: \"Must be array!\"\n * });\n *\n * // ✅ If no error thrown, TypeScript narrows `mixedValue` to `number[]` here\n * const result: number[] = mixedValue; // ➔ Safe type assignment\n * console.log(result.push(1, 2, 3)); // ➔ Safe to use array methods\n * ```\n */\nexport function assertIsArray(\n value: [],\n options?: OptionsAssertIs\n): asserts value is [];\nexport function assertIsArray<T>(\n value: T,\n options?: OptionsAssertIs\n): asserts value is ArrayFallback<T>;\nexport function assertIsArray(\n value: unknown,\n options?: OptionsAssertIs\n): asserts value is unknown[];\nexport function assertIsArray<T>(value: T, options?: OptionsAssertIs) {\n if (isArray(value)) return;\n\n resolveErrorMessageAssertions({ value, options, requiredValidType: \"array\" });\n}\n"],"mappings":";;;;;;;;;;;;;AAyJA,SAAgB,cAAiB,OAAU,SAA2B;CACpE,IAAI,QAAQ,KAAK,GAAG;CAEpB,8BAA8B;EAAE;EAAO;EAAS,mBAAmB;CAAQ,CAAC;AAC9E"}
@@ -2,13 +2,13 @@
2
2
  * ========================================================================
3
3
  * @rzl-zone/utils-js
4
4
  * ------------------------------------------------------------------------
5
- * Version: `3.14.0-beta.0`
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
  "use strict";
11
- const require_logger = require('./logger-CUacYy3D.cjs');
11
+ const require_logger = require('./logger-BXg2xufj.cjs');
12
12
  function assertIsArray(value, options) {
13
13
  if (require_logger.isArray(value)) return;
14
14
  require_logger.resolveErrorMessageAssertions({
@@ -23,4 +23,4 @@ Object.defineProperty(exports, 'assertIsArray', {
23
23
  return assertIsArray;
24
24
  }
25
25
  });
26
- //# sourceMappingURL=assertIsArray-CtCRD-_G.cjs.map
26
+ //# sourceMappingURL=assertIsArray-Xx-zlo6O.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"assertIsArray-CtCRD-_G.cjs","names":["isArray"],"sources":["../src/assertions/objects/assertIsArray.ts"],"sourcesContent":["import type {\n IsArray,\n IsReadonlyArray,\n IsUnknown\n} from \"@rzl-zone/ts-types-plus\";\nimport type { ArrayFallback } from \"@/_private/types.arrays\";\n\nimport { isArray } from \"@/predicates/is/isArray\";\n\nimport {\n resolveErrorMessageAssertions,\n type OptionsAssertIs\n} from \"../_private/assertIs\";\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\ntype AssertIsArrayResult<T> =\n IsUnknown<T> extends true\n ? unknown[] & T\n : IsReadonlyArray<T> extends true\n ? T\n : T extends []\n ? T\n : IsArray<T> extends true\n ? T\n : Extract<T, unknown[] | [] | readonly []>;\n\n/** --------------------------------------------------------------------------------\n * * ***Type guard assertion: `assertIsArray`.***\n * ---------------------------------------------------------------------------------\n * **This function is an **assertion function**.**\n *\n * - **Behavior:**\n * - Validates that the given `value` is an **array**.\n * - After it returns successfully, TypeScript narrows the type of `value` to `array` **(generic support)**.\n * - If `value` is an `array` ➔ execution continues normally.\n * - If `value` is not an `array` ➔ throws a built-in error with either:\n * - A custom error message (`options.message`), or\n * - A default message including the actual type.\n * - **Error type selection (`options.errorType`):**\n * - You can override the type of error thrown when validation fails.\n * - Must be one of the standard JavaScript built-in errors:\n * - [`TypeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError) |\n * [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) |\n * [`EvalError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError) |\n * [`RangeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError) |\n * [`ReferenceError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError) |\n * [`SyntaxError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError) |\n * [`URIError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError).\n * - **Default:** `\"TypeError\"` if not provided or invalid.\n *\n * @template T - The input type being asserted.\n * @param {*} value - ***The value to validate.***\n * @param {OptionsAssertIs} [options]\n * ***Optional configuration:***\n * - `message`: A custom error message (`string` or `function`).\n * - `errorType`: Built-in JavaScript error type to throw on failure (default `\"TypeError\"`).\n * - `formatCase`: Controls how detected type names are formatted case in error messages.\n * - `useAcronyms`: Control uppercase preservation of recognized acronyms during formatting.\n *\n * @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.\n * @returns {boolean} Narrows `value` to an `array` **(generic support)** if no error is thrown.\n *\n * @example\n * ```ts\n * // ✅ Simple usage\n * assertIsArray([]);\n * assertIsArray([\"123\", 456]);\n * assertIsArray(Array.from([\"abc\"]));\n * // No error, value is array\n *\n * // ❌ Throws TypeError (default behavior)\n * // Case 1: Invalid input type — received a string instead of a array\n * assertIsArray(\"42\");\n * // ➔ TypeError: \"Parameter input (`value`) must be of type `array`, but received: `string`.\"\n *\n * // ❌ Throws custom error type (e.g., RangeError)\n * assertIsArray(async function () {}, { errorType: \"RangeError\" });\n * // ➔ RangeError: \"Parameter input (`value`) must be of type `array`, but received: `async-function`.\"\n *\n * // ❌ Throws a TypeError with a custom string static message\n * assertIsArray(\"123\", { message: \"Must be a array!\" });\n * // ➔ TypeError: \"Must be a array!\"\n *\n * // ❌ Throws a TypeError with a custom message function and formatCase\n * assertIsArray(/regex/, {\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * formatCase: \"toPascalCaseSpace\"\n * });\n * // ➔ TypeError: \"Expected array but got (Reg Exp).\"\n *\n * // ❌ Throws a TypeError with a custom useAcronyms option\n * // Case 1:\n * assertIsArray(new URL(\"https://example.com\"),{\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected array but got (url).\"\n * assertIsArray(new URL(\"https://example.com\"), {\n * useAcronyms: true,\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected array but got (URL).\"\n *\n * // Case 2:\n * assertIsArray(new URLSearchParams, {\n * formatCase: \"toPascalCase\",\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected array but got (UrlSearchParams).\"\n * assertIsArray(new URLSearchParams, {\n * useAcronyms: true,\n * formatCase: \"toPascalCase\",\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected array but got (URLSearchParams).\"\n * ```\n * -------------------------------------------------------\n * ✅ ***Real-world usage example***:\n * ```ts\n * const mixedValue: string | number[] | undefined = getUserInput();\n *\n * // Runtime assertion: throws if `mixedValue` is not a `number[]`\n * assertIsArray(mixedValue, {\n * errorType: \"RangeError\",\n * message: \"Must be array!\"\n * });\n *\n * // ✅ If no error thrown, TypeScript narrows `mixedValue` to `number[]` here\n * const result: number[] = mixedValue; // ➔ Safe type assignment\n * console.log(result.push(1, 2, 3)); // ➔ Safe to use array methods\n * ```\n */\nexport function assertIsArray(\n value: [],\n options?: OptionsAssertIs\n): asserts value is [];\nexport function assertIsArray<T>(\n value: T,\n options?: OptionsAssertIs\n): asserts value is ArrayFallback<T>;\nexport function assertIsArray(\n value: unknown,\n options?: OptionsAssertIs\n): asserts value is unknown[];\nexport function assertIsArray<T>(value: T, options?: OptionsAssertIs) {\n if (isArray(value)) return;\n\n resolveErrorMessageAssertions({ value, options, requiredValidType: \"array\" });\n}\n"],"mappings":";;;;;;;;;;;;;AAyJA,SAAgB,cAAiB,OAAU,SAA2B;CACpE,IAAIA,uBAAQ,KAAK,GAAG;CAEpB,6CAA8B;EAAE;EAAO;EAAS,mBAAmB;CAAQ,CAAC;AAC9E"}
1
+ {"version":3,"file":"assertIsArray-Xx-zlo6O.cjs","names":["isArray"],"sources":["../src/assertions/objects/assertIsArray.ts"],"sourcesContent":["import type {\n IsArray,\n IsReadonlyArray,\n IsUnknown\n} from \"@rzl-zone/ts-types-plus\";\nimport type { ArrayFallback } from \"@/_private/types.arrays\";\n\nimport { isArray } from \"@/predicates/is/isArray\";\n\nimport {\n resolveErrorMessageAssertions,\n type OptionsAssertIs\n} from \"../_private/assertIs\";\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\ntype AssertIsArrayResult<T> =\n IsUnknown<T> extends true\n ? unknown[] & T\n : IsReadonlyArray<T> extends true\n ? T\n : T extends []\n ? T\n : IsArray<T> extends true\n ? T\n : Extract<T, unknown[] | [] | readonly []>;\n\n/** --------------------------------------------------------------------------------\n * * ***Type guard assertion: `assertIsArray`.***\n * ---------------------------------------------------------------------------------\n * **This function is an **assertion function**.**\n *\n * - **Behavior:**\n * - Validates that the given `value` is an **array**.\n * - After it returns successfully, TypeScript narrows the type of `value` to `array` **(generic support)**.\n * - If `value` is an `array` ➔ execution continues normally.\n * - If `value` is not an `array` ➔ throws a built-in error with either:\n * - A custom error message (`options.message`), or\n * - A default message including the actual type.\n * - **Error type selection (`options.errorType`):**\n * - You can override the type of error thrown when validation fails.\n * - Must be one of the standard JavaScript built-in errors:\n * - [`TypeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError) |\n * [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) |\n * [`EvalError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError) |\n * [`RangeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError) |\n * [`ReferenceError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError) |\n * [`SyntaxError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError) |\n * [`URIError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError).\n * - **Default:** `\"TypeError\"` if not provided or invalid.\n *\n * @template T - The input type being asserted.\n * @param {*} value - ***The value to validate.***\n * @param {OptionsAssertIs} [options]\n * ***Optional configuration:***\n * - `message`: A custom error message (`string` or `function`).\n * - `errorType`: Built-in JavaScript error type to throw on failure (default `\"TypeError\"`).\n * - `formatCase`: Controls how detected type names are formatted case in error messages.\n * - `useAcronyms`: Control uppercase preservation of recognized acronyms during formatting.\n *\n * @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.\n * @returns {boolean} Narrows `value` to an `array` **(generic support)** if no error is thrown.\n *\n * @example\n * ```ts\n * // ✅ Simple usage\n * assertIsArray([]);\n * assertIsArray([\"123\", 456]);\n * assertIsArray(Array.from([\"abc\"]));\n * // No error, value is array\n *\n * // ❌ Throws TypeError (default behavior)\n * // Case 1: Invalid input type — received a string instead of a array\n * assertIsArray(\"42\");\n * // ➔ TypeError: \"Parameter input (`value`) must be of type `array`, but received: `string`.\"\n *\n * // ❌ Throws custom error type (e.g., RangeError)\n * assertIsArray(async function () {}, { errorType: \"RangeError\" });\n * // ➔ RangeError: \"Parameter input (`value`) must be of type `array`, but received: `async-function`.\"\n *\n * // ❌ Throws a TypeError with a custom string static message\n * assertIsArray(\"123\", { message: \"Must be a array!\" });\n * // ➔ TypeError: \"Must be a array!\"\n *\n * // ❌ Throws a TypeError with a custom message function and formatCase\n * assertIsArray(/regex/, {\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * formatCase: \"toPascalCaseSpace\"\n * });\n * // ➔ TypeError: \"Expected array but got (Reg Exp).\"\n *\n * // ❌ Throws a TypeError with a custom useAcronyms option\n * // Case 1:\n * assertIsArray(new URL(\"https://example.com\"),{\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected array but got (url).\"\n * assertIsArray(new URL(\"https://example.com\"), {\n * useAcronyms: true,\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected array but got (URL).\"\n *\n * // Case 2:\n * assertIsArray(new URLSearchParams, {\n * formatCase: \"toPascalCase\",\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected array but got (UrlSearchParams).\"\n * assertIsArray(new URLSearchParams, {\n * useAcronyms: true,\n * formatCase: \"toPascalCase\",\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected array but got (URLSearchParams).\"\n * ```\n * -------------------------------------------------------\n * ✅ ***Real-world usage example***:\n * ```ts\n * const mixedValue: string | number[] | undefined = getUserInput();\n *\n * // Runtime assertion: throws if `mixedValue` is not a `number[]`\n * assertIsArray(mixedValue, {\n * errorType: \"RangeError\",\n * message: \"Must be array!\"\n * });\n *\n * // ✅ If no error thrown, TypeScript narrows `mixedValue` to `number[]` here\n * const result: number[] = mixedValue; // ➔ Safe type assignment\n * console.log(result.push(1, 2, 3)); // ➔ Safe to use array methods\n * ```\n */\nexport function assertIsArray(\n value: [],\n options?: OptionsAssertIs\n): asserts value is [];\nexport function assertIsArray<T>(\n value: T,\n options?: OptionsAssertIs\n): asserts value is ArrayFallback<T>;\nexport function assertIsArray(\n value: unknown,\n options?: OptionsAssertIs\n): asserts value is unknown[];\nexport function assertIsArray<T>(value: T, options?: OptionsAssertIs) {\n if (isArray(value)) return;\n\n resolveErrorMessageAssertions({ value, options, requiredValidType: \"array\" });\n}\n"],"mappings":";;;;;;;;;;;;;AAyJA,SAAgB,cAAiB,OAAU,SAA2B;CACpE,IAAIA,uBAAQ,KAAK,GAAG;CAEpB,6CAA8B;EAAE;EAAO;EAAS,mBAAmB;CAAQ,CAAC;AAC9E"}
@@ -2,12 +2,12 @@
2
2
  * ========================================================================
3
3
  * @rzl-zone/utils-js
4
4
  * ------------------------------------------------------------------------
5
- * Version: `3.14.0-beta.0`
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
- import { E as isPlainObject, r as resolveErrorMessageAssertions } from "./logger-CLWnKRKE.js";
10
+ import { E as isPlainObject, r as resolveErrorMessageAssertions } from "./logger-Wxl_Krg6.js";
11
11
  function assertIsPlainObject(value, options) {
12
12
  if (isPlainObject(value)) return;
13
13
  resolveErrorMessageAssertions({
@@ -17,4 +17,4 @@ function assertIsPlainObject(value, options) {
17
17
  });
18
18
  }
19
19
  export { assertIsPlainObject as t };
20
- //# sourceMappingURL=assertIsPlainObject-j9bDqNLo.js.map
20
+ //# sourceMappingURL=assertIsPlainObject-CIzDchLs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"assertIsPlainObject-j9bDqNLo.js","names":[],"sources":["../src/assertions/objects/assertIsPlainObject.ts"],"sourcesContent":["import {\n isPlainObject,\n type IsPlainObjectResult\n} from \"@/predicates/is/isPlainObject\";\nimport {\n type OptionsAssertIs,\n resolveErrorMessageAssertions\n} from \"../_private/assertIs\";\n\n/** --------------------------------------------------------------------------------\n * * ***Type guard assertion: `assertIsPlainObject`.***\n * ---------------------------------------------------------------------------------\n * **This function is an **assertion function**.**\n *\n * - **Behavior:**\n * - Validates that the given `value` is a **plain-object**.\n * - After it returns successfully, TypeScript narrows the type of `value` to `plain-object` **(generic support)**.\n * - If `value` is a `plain-object` ➔ execution continues normally.\n * - If `value` is not a `plain-object` ➔ throws a built-in error with either:\n * - A custom error message (`options.message`), or\n * - A default message including the actual type.\n * - **A valid `plain object` is:**\n * - Created by the `Object` constructor, or\n * - Has a `[[Prototype]]` of `null` (e.g. `Object.create(null)`).\n * - **Returns `undefined` (valid) for:**\n * - Empty object literals: `{}`\n * - Objects with null prototype: `Object.create(null)`\n * - **Returns `throws` for:**\n * - Arrays (`[]`, `new Array()`)\n * - Functions (regular, arrow, or class constructors)\n * - Built-in objects: `Date`, `RegExp`, `Error`, `Map`, `Set`, `WeakMap`, `WeakSet`\n * - Boxed primitives: `new String()`, `new Number()`, `new Boolean()`\n * - `null` or `undefined`\n * - Symbols\n * - Class instances\n * - **Error type selection (`options.errorType`):**\n * - You can override the type of error thrown when validation fails.\n * - Must be one of the standard JavaScript built-in errors:\n * - [`TypeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError) |\n * [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) |\n * [`EvalError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError) |\n * [`RangeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError) |\n * [`ReferenceError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError) |\n * [`SyntaxError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError) |\n * [`URIError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError).\n * - **Default:** `\"TypeError\"` if not provided or invalid.\n *\n * @template T - The input type being asserted.\n * @param {*} value - ***The value to validate.***\n * @param {OptionsAssertIs} [options]\n * ***Optional configuration:***\n * - `message`: A custom error message (`string` or `function`).\n * - `errorType`: Built-in JavaScript error type to throw on failure (default `\"TypeError\"`).\n * - `formatCase`: Controls how detected type names are formatted case in error messages.\n * - `useAcronyms`: Control uppercase preservation of recognized acronyms during formatting.\n *\n * @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.\n * @returns {boolean} Narrows `value` to a `plain-object` **(generic support)** if no error is thrown.\n *\n * @example\n * ```ts\n * // ✅ Simple usage\n * assertIsPlainObject({ a: 1, b: 2 });\n * // No error, value is plain-object\n *\n * // ❌ Throws TypeError (default behavior)\n * // Case 1: Invalid input type — received a string instead of a plain-object\n * assertIsPlainObject(\"42\");\n * // ➔ TypeError: \"Parameter input (`value`) must be of type `plain-object`, but received: `string`.\"\n *\n * // ❌ Throws custom error type (e.g., RangeError)\n * assertIsPlainObject(async function () {}, { errorType: \"RangeError\" });\n * // ➔ RangeError: \"Parameter input (`value`) must be of type `plain-object`, but received: `async-function`.\"\n *\n * // ❌ Throws a TypeError with a custom string static message\n * assertIsPlainObject(\"123\", { message: \"Must be a plain-object!\" });\n * // ➔ TypeError: \"Must be a plain-object!\"\n *\n * // ❌ Throws a TypeError with a custom message function and formatCase\n * assertIsPlainObject(/regex/, {\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * formatCase: \"toPascalCaseSpace\"\n * });\n * // ➔ TypeError: \"Expected plain-object but got (Reg Exp).\"\n *\n * // ❌ Throws a TypeError with a custom useAcronyms option\n * // Case 1:\n * assertIsPlainObject(new URL(\"https://example.com\"),{\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected plain-object but got (url).\"\n * assertIsPlainObject(new URL(\"https://example.com\"), {\n * useAcronyms: true,\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected plain-object but got (URL).\"\n *\n * // Case 2:\n * assertIsPlainObject(new URLSearchParams, {\n * formatCase: \"toPascalCase\",\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected plain-object but got (UrlSearchParams).\"\n * assertIsPlainObject(new URLSearchParams, {\n * useAcronyms: true,\n * formatCase: \"toPascalCase\",\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected plain-object but got (URLSearchParams).\"\n * ```\n * -------------------------------------------------------\n * ✅ ***Real-world usage with generic narrowing***:\n * ```ts\n * type User = { name: string; email: string };\n * const mixedValue: string | User | boolean | number | undefined = getUserInput();\n *\n * // Runtime assertion: throws if `mixedValue` is not a `plain-object`\n * assertIsPlainObject(mixedValue, {\n * errorType: \"RangeError\",\n * message: \"Must be plain object!\"\n * });\n *\n * // ✅ If no error thrown, TypeScript narrows `mixedValue` to `User` here\n * const user: User = mixedValue; // ➔ Safe type assignment\n * console.log(user.email); // ➔ Safe to access object properties\n * ```\n */\nexport function assertIsPlainObject<T>(\n value: T,\n options?: OptionsAssertIs\n): asserts value is IsPlainObjectResult<T> {\n if (isPlainObject(value)) return;\n\n resolveErrorMessageAssertions({\n value,\n options,\n requiredValidType: \"plain object\"\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyIA,SAAgB,oBACd,OACA,SACyC;CACzC,IAAI,cAAc,KAAK,GAAG;CAE1B,8BAA8B;EAC5B;EACA;EACA,mBAAmB;CACrB,CAAC;AACH"}
1
+ {"version":3,"file":"assertIsPlainObject-CIzDchLs.js","names":[],"sources":["../src/assertions/objects/assertIsPlainObject.ts"],"sourcesContent":["import {\n isPlainObject,\n type IsPlainObjectResult\n} from \"@/predicates/is/isPlainObject\";\nimport {\n type OptionsAssertIs,\n resolveErrorMessageAssertions\n} from \"../_private/assertIs\";\n\n/** --------------------------------------------------------------------------------\n * * ***Type guard assertion: `assertIsPlainObject`.***\n * ---------------------------------------------------------------------------------\n * **This function is an **assertion function**.**\n *\n * - **Behavior:**\n * - Validates that the given `value` is a **plain-object**.\n * - After it returns successfully, TypeScript narrows the type of `value` to `plain-object` **(generic support)**.\n * - If `value` is a `plain-object` ➔ execution continues normally.\n * - If `value` is not a `plain-object` ➔ throws a built-in error with either:\n * - A custom error message (`options.message`), or\n * - A default message including the actual type.\n * - **A valid `plain object` is:**\n * - Created by the `Object` constructor, or\n * - Has a `[[Prototype]]` of `null` (e.g. `Object.create(null)`).\n * - **Returns `undefined` (valid) for:**\n * - Empty object literals: `{}`\n * - Objects with null prototype: `Object.create(null)`\n * - **Returns `throws` for:**\n * - Arrays (`[]`, `new Array()`)\n * - Functions (regular, arrow, or class constructors)\n * - Built-in objects: `Date`, `RegExp`, `Error`, `Map`, `Set`, `WeakMap`, `WeakSet`\n * - Boxed primitives: `new String()`, `new Number()`, `new Boolean()`\n * - `null` or `undefined`\n * - Symbols\n * - Class instances\n * - **Error type selection (`options.errorType`):**\n * - You can override the type of error thrown when validation fails.\n * - Must be one of the standard JavaScript built-in errors:\n * - [`TypeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError) |\n * [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) |\n * [`EvalError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError) |\n * [`RangeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError) |\n * [`ReferenceError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError) |\n * [`SyntaxError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError) |\n * [`URIError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError).\n * - **Default:** `\"TypeError\"` if not provided or invalid.\n *\n * @template T - The input type being asserted.\n * @param {*} value - ***The value to validate.***\n * @param {OptionsAssertIs} [options]\n * ***Optional configuration:***\n * - `message`: A custom error message (`string` or `function`).\n * - `errorType`: Built-in JavaScript error type to throw on failure (default `\"TypeError\"`).\n * - `formatCase`: Controls how detected type names are formatted case in error messages.\n * - `useAcronyms`: Control uppercase preservation of recognized acronyms during formatting.\n *\n * @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.\n * @returns {boolean} Narrows `value` to a `plain-object` **(generic support)** if no error is thrown.\n *\n * @example\n * ```ts\n * // ✅ Simple usage\n * assertIsPlainObject({ a: 1, b: 2 });\n * // No error, value is plain-object\n *\n * // ❌ Throws TypeError (default behavior)\n * // Case 1: Invalid input type — received a string instead of a plain-object\n * assertIsPlainObject(\"42\");\n * // ➔ TypeError: \"Parameter input (`value`) must be of type `plain-object`, but received: `string`.\"\n *\n * // ❌ Throws custom error type (e.g., RangeError)\n * assertIsPlainObject(async function () {}, { errorType: \"RangeError\" });\n * // ➔ RangeError: \"Parameter input (`value`) must be of type `plain-object`, but received: `async-function`.\"\n *\n * // ❌ Throws a TypeError with a custom string static message\n * assertIsPlainObject(\"123\", { message: \"Must be a plain-object!\" });\n * // ➔ TypeError: \"Must be a plain-object!\"\n *\n * // ❌ Throws a TypeError with a custom message function and formatCase\n * assertIsPlainObject(/regex/, {\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * formatCase: \"toPascalCaseSpace\"\n * });\n * // ➔ TypeError: \"Expected plain-object but got (Reg Exp).\"\n *\n * // ❌ Throws a TypeError with a custom useAcronyms option\n * // Case 1:\n * assertIsPlainObject(new URL(\"https://example.com\"),{\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected plain-object but got (url).\"\n * assertIsPlainObject(new URL(\"https://example.com\"), {\n * useAcronyms: true,\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected plain-object but got (URL).\"\n *\n * // Case 2:\n * assertIsPlainObject(new URLSearchParams, {\n * formatCase: \"toPascalCase\",\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected plain-object but got (UrlSearchParams).\"\n * assertIsPlainObject(new URLSearchParams, {\n * useAcronyms: true,\n * formatCase: \"toPascalCase\",\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected plain-object but got (URLSearchParams).\"\n * ```\n * -------------------------------------------------------\n * ✅ ***Real-world usage with generic narrowing***:\n * ```ts\n * type User = { name: string; email: string };\n * const mixedValue: string | User | boolean | number | undefined = getUserInput();\n *\n * // Runtime assertion: throws if `mixedValue` is not a `plain-object`\n * assertIsPlainObject(mixedValue, {\n * errorType: \"RangeError\",\n * message: \"Must be plain object!\"\n * });\n *\n * // ✅ If no error thrown, TypeScript narrows `mixedValue` to `User` here\n * const user: User = mixedValue; // ➔ Safe type assignment\n * console.log(user.email); // ➔ Safe to access object properties\n * ```\n */\nexport function assertIsPlainObject<T>(\n value: T,\n options?: OptionsAssertIs\n): asserts value is IsPlainObjectResult<T> {\n if (isPlainObject(value)) return;\n\n resolveErrorMessageAssertions({\n value,\n options,\n requiredValidType: \"plain object\"\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyIA,SAAgB,oBACd,OACA,SACyC;CACzC,IAAI,cAAc,KAAK,GAAG;CAE1B,8BAA8B;EAC5B;EACA;EACA,mBAAmB;CACrB,CAAC;AACH"}
@@ -2,13 +2,13 @@
2
2
  * ========================================================================
3
3
  * @rzl-zone/utils-js
4
4
  * ------------------------------------------------------------------------
5
- * Version: `3.14.0-beta.0`
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
  "use strict";
11
- const require_logger = require('./logger-CUacYy3D.cjs');
11
+ const require_logger = require('./logger-BXg2xufj.cjs');
12
12
  function assertIsPlainObject(value, options) {
13
13
  if (require_logger.isPlainObject(value)) return;
14
14
  require_logger.resolveErrorMessageAssertions({
@@ -23,4 +23,4 @@ Object.defineProperty(exports, 'assertIsPlainObject', {
23
23
  return assertIsPlainObject;
24
24
  }
25
25
  });
26
- //# sourceMappingURL=assertIsPlainObject-DPZLj-Ho.cjs.map
26
+ //# sourceMappingURL=assertIsPlainObject-DYoxHcW5.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"assertIsPlainObject-DPZLj-Ho.cjs","names":["isPlainObject"],"sources":["../src/assertions/objects/assertIsPlainObject.ts"],"sourcesContent":["import {\n isPlainObject,\n type IsPlainObjectResult\n} from \"@/predicates/is/isPlainObject\";\nimport {\n type OptionsAssertIs,\n resolveErrorMessageAssertions\n} from \"../_private/assertIs\";\n\n/** --------------------------------------------------------------------------------\n * * ***Type guard assertion: `assertIsPlainObject`.***\n * ---------------------------------------------------------------------------------\n * **This function is an **assertion function**.**\n *\n * - **Behavior:**\n * - Validates that the given `value` is a **plain-object**.\n * - After it returns successfully, TypeScript narrows the type of `value` to `plain-object` **(generic support)**.\n * - If `value` is a `plain-object` ➔ execution continues normally.\n * - If `value` is not a `plain-object` ➔ throws a built-in error with either:\n * - A custom error message (`options.message`), or\n * - A default message including the actual type.\n * - **A valid `plain object` is:**\n * - Created by the `Object` constructor, or\n * - Has a `[[Prototype]]` of `null` (e.g. `Object.create(null)`).\n * - **Returns `undefined` (valid) for:**\n * - Empty object literals: `{}`\n * - Objects with null prototype: `Object.create(null)`\n * - **Returns `throws` for:**\n * - Arrays (`[]`, `new Array()`)\n * - Functions (regular, arrow, or class constructors)\n * - Built-in objects: `Date`, `RegExp`, `Error`, `Map`, `Set`, `WeakMap`, `WeakSet`\n * - Boxed primitives: `new String()`, `new Number()`, `new Boolean()`\n * - `null` or `undefined`\n * - Symbols\n * - Class instances\n * - **Error type selection (`options.errorType`):**\n * - You can override the type of error thrown when validation fails.\n * - Must be one of the standard JavaScript built-in errors:\n * - [`TypeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError) |\n * [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) |\n * [`EvalError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError) |\n * [`RangeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError) |\n * [`ReferenceError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError) |\n * [`SyntaxError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError) |\n * [`URIError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError).\n * - **Default:** `\"TypeError\"` if not provided or invalid.\n *\n * @template T - The input type being asserted.\n * @param {*} value - ***The value to validate.***\n * @param {OptionsAssertIs} [options]\n * ***Optional configuration:***\n * - `message`: A custom error message (`string` or `function`).\n * - `errorType`: Built-in JavaScript error type to throw on failure (default `\"TypeError\"`).\n * - `formatCase`: Controls how detected type names are formatted case in error messages.\n * - `useAcronyms`: Control uppercase preservation of recognized acronyms during formatting.\n *\n * @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.\n * @returns {boolean} Narrows `value` to a `plain-object` **(generic support)** if no error is thrown.\n *\n * @example\n * ```ts\n * // ✅ Simple usage\n * assertIsPlainObject({ a: 1, b: 2 });\n * // No error, value is plain-object\n *\n * // ❌ Throws TypeError (default behavior)\n * // Case 1: Invalid input type — received a string instead of a plain-object\n * assertIsPlainObject(\"42\");\n * // ➔ TypeError: \"Parameter input (`value`) must be of type `plain-object`, but received: `string`.\"\n *\n * // ❌ Throws custom error type (e.g., RangeError)\n * assertIsPlainObject(async function () {}, { errorType: \"RangeError\" });\n * // ➔ RangeError: \"Parameter input (`value`) must be of type `plain-object`, but received: `async-function`.\"\n *\n * // ❌ Throws a TypeError with a custom string static message\n * assertIsPlainObject(\"123\", { message: \"Must be a plain-object!\" });\n * // ➔ TypeError: \"Must be a plain-object!\"\n *\n * // ❌ Throws a TypeError with a custom message function and formatCase\n * assertIsPlainObject(/regex/, {\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * formatCase: \"toPascalCaseSpace\"\n * });\n * // ➔ TypeError: \"Expected plain-object but got (Reg Exp).\"\n *\n * // ❌ Throws a TypeError with a custom useAcronyms option\n * // Case 1:\n * assertIsPlainObject(new URL(\"https://example.com\"),{\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected plain-object but got (url).\"\n * assertIsPlainObject(new URL(\"https://example.com\"), {\n * useAcronyms: true,\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected plain-object but got (URL).\"\n *\n * // Case 2:\n * assertIsPlainObject(new URLSearchParams, {\n * formatCase: \"toPascalCase\",\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected plain-object but got (UrlSearchParams).\"\n * assertIsPlainObject(new URLSearchParams, {\n * useAcronyms: true,\n * formatCase: \"toPascalCase\",\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected plain-object but got (URLSearchParams).\"\n * ```\n * -------------------------------------------------------\n * ✅ ***Real-world usage with generic narrowing***:\n * ```ts\n * type User = { name: string; email: string };\n * const mixedValue: string | User | boolean | number | undefined = getUserInput();\n *\n * // Runtime assertion: throws if `mixedValue` is not a `plain-object`\n * assertIsPlainObject(mixedValue, {\n * errorType: \"RangeError\",\n * message: \"Must be plain object!\"\n * });\n *\n * // ✅ If no error thrown, TypeScript narrows `mixedValue` to `User` here\n * const user: User = mixedValue; // ➔ Safe type assignment\n * console.log(user.email); // ➔ Safe to access object properties\n * ```\n */\nexport function assertIsPlainObject<T>(\n value: T,\n options?: OptionsAssertIs\n): asserts value is IsPlainObjectResult<T> {\n if (isPlainObject(value)) return;\n\n resolveErrorMessageAssertions({\n value,\n options,\n requiredValidType: \"plain object\"\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyIA,SAAgB,oBACd,OACA,SACyC;CACzC,IAAIA,6BAAc,KAAK,GAAG;CAE1B,6CAA8B;EAC5B;EACA;EACA,mBAAmB;CACrB,CAAC;AACH"}
1
+ {"version":3,"file":"assertIsPlainObject-DYoxHcW5.cjs","names":["isPlainObject"],"sources":["../src/assertions/objects/assertIsPlainObject.ts"],"sourcesContent":["import {\n isPlainObject,\n type IsPlainObjectResult\n} from \"@/predicates/is/isPlainObject\";\nimport {\n type OptionsAssertIs,\n resolveErrorMessageAssertions\n} from \"../_private/assertIs\";\n\n/** --------------------------------------------------------------------------------\n * * ***Type guard assertion: `assertIsPlainObject`.***\n * ---------------------------------------------------------------------------------\n * **This function is an **assertion function**.**\n *\n * - **Behavior:**\n * - Validates that the given `value` is a **plain-object**.\n * - After it returns successfully, TypeScript narrows the type of `value` to `plain-object` **(generic support)**.\n * - If `value` is a `plain-object` ➔ execution continues normally.\n * - If `value` is not a `plain-object` ➔ throws a built-in error with either:\n * - A custom error message (`options.message`), or\n * - A default message including the actual type.\n * - **A valid `plain object` is:**\n * - Created by the `Object` constructor, or\n * - Has a `[[Prototype]]` of `null` (e.g. `Object.create(null)`).\n * - **Returns `undefined` (valid) for:**\n * - Empty object literals: `{}`\n * - Objects with null prototype: `Object.create(null)`\n * - **Returns `throws` for:**\n * - Arrays (`[]`, `new Array()`)\n * - Functions (regular, arrow, or class constructors)\n * - Built-in objects: `Date`, `RegExp`, `Error`, `Map`, `Set`, `WeakMap`, `WeakSet`\n * - Boxed primitives: `new String()`, `new Number()`, `new Boolean()`\n * - `null` or `undefined`\n * - Symbols\n * - Class instances\n * - **Error type selection (`options.errorType`):**\n * - You can override the type of error thrown when validation fails.\n * - Must be one of the standard JavaScript built-in errors:\n * - [`TypeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError) |\n * [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) |\n * [`EvalError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError) |\n * [`RangeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError) |\n * [`ReferenceError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError) |\n * [`SyntaxError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError) |\n * [`URIError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError).\n * - **Default:** `\"TypeError\"` if not provided or invalid.\n *\n * @template T - The input type being asserted.\n * @param {*} value - ***The value to validate.***\n * @param {OptionsAssertIs} [options]\n * ***Optional configuration:***\n * - `message`: A custom error message (`string` or `function`).\n * - `errorType`: Built-in JavaScript error type to throw on failure (default `\"TypeError\"`).\n * - `formatCase`: Controls how detected type names are formatted case in error messages.\n * - `useAcronyms`: Control uppercase preservation of recognized acronyms during formatting.\n *\n * @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.\n * @returns {boolean} Narrows `value` to a `plain-object` **(generic support)** if no error is thrown.\n *\n * @example\n * ```ts\n * // ✅ Simple usage\n * assertIsPlainObject({ a: 1, b: 2 });\n * // No error, value is plain-object\n *\n * // ❌ Throws TypeError (default behavior)\n * // Case 1: Invalid input type — received a string instead of a plain-object\n * assertIsPlainObject(\"42\");\n * // ➔ TypeError: \"Parameter input (`value`) must be of type `plain-object`, but received: `string`.\"\n *\n * // ❌ Throws custom error type (e.g., RangeError)\n * assertIsPlainObject(async function () {}, { errorType: \"RangeError\" });\n * // ➔ RangeError: \"Parameter input (`value`) must be of type `plain-object`, but received: `async-function`.\"\n *\n * // ❌ Throws a TypeError with a custom string static message\n * assertIsPlainObject(\"123\", { message: \"Must be a plain-object!\" });\n * // ➔ TypeError: \"Must be a plain-object!\"\n *\n * // ❌ Throws a TypeError with a custom message function and formatCase\n * assertIsPlainObject(/regex/, {\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * formatCase: \"toPascalCaseSpace\"\n * });\n * // ➔ TypeError: \"Expected plain-object but got (Reg Exp).\"\n *\n * // ❌ Throws a TypeError with a custom useAcronyms option\n * // Case 1:\n * assertIsPlainObject(new URL(\"https://example.com\"),{\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected plain-object but got (url).\"\n * assertIsPlainObject(new URL(\"https://example.com\"), {\n * useAcronyms: true,\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected plain-object but got (URL).\"\n *\n * // Case 2:\n * assertIsPlainObject(new URLSearchParams, {\n * formatCase: \"toPascalCase\",\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected plain-object but got (UrlSearchParams).\"\n * assertIsPlainObject(new URLSearchParams, {\n * useAcronyms: true,\n * formatCase: \"toPascalCase\",\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected plain-object but got (URLSearchParams).\"\n * ```\n * -------------------------------------------------------\n * ✅ ***Real-world usage with generic narrowing***:\n * ```ts\n * type User = { name: string; email: string };\n * const mixedValue: string | User | boolean | number | undefined = getUserInput();\n *\n * // Runtime assertion: throws if `mixedValue` is not a `plain-object`\n * assertIsPlainObject(mixedValue, {\n * errorType: \"RangeError\",\n * message: \"Must be plain object!\"\n * });\n *\n * // ✅ If no error thrown, TypeScript narrows `mixedValue` to `User` here\n * const user: User = mixedValue; // ➔ Safe type assignment\n * console.log(user.email); // ➔ Safe to access object properties\n * ```\n */\nexport function assertIsPlainObject<T>(\n value: T,\n options?: OptionsAssertIs\n): asserts value is IsPlainObjectResult<T> {\n if (isPlainObject(value)) return;\n\n resolveErrorMessageAssertions({\n value,\n options,\n requiredValidType: \"plain object\"\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyIA,SAAgB,oBACd,OACA,SACyC;CACzC,IAAIA,6BAAc,KAAK,GAAG;CAE1B,6CAA8B;EAC5B;EACA;EACA,mBAAmB;CACrB,CAAC;AACH"}
@@ -2,13 +2,13 @@
2
2
  * ========================================================================
3
3
  * @rzl-zone/utils-js
4
4
  * ------------------------------------------------------------------------
5
- * Version: `3.14.0-beta.0`
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
  "use strict";
11
- const require_logger = require('./logger-CUacYy3D.cjs');
11
+ const require_logger = require('./logger-BXg2xufj.cjs');
12
12
  const assertIsString = (value, options) => {
13
13
  if (require_logger.isString(value)) return;
14
14
  require_logger.resolveErrorMessageAssertions({
@@ -23,4 +23,4 @@ Object.defineProperty(exports, 'assertIsString', {
23
23
  return assertIsString;
24
24
  }
25
25
  });
26
- //# sourceMappingURL=assertIsString-CjE9kbQ_.cjs.map
26
+ //# sourceMappingURL=assertIsString-CuPbh3FB.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"assertIsString-CjE9kbQ_.cjs","names":["isString"],"sources":["../src/assertions/strings/assertIsString.ts"],"sourcesContent":["import { isString } from \"@/predicates/is/isString\";\nimport {\n resolveErrorMessageAssertions,\n type OptionsAssertIs\n} from \"../_private/assertIs\";\n\n/** --------------------------------------------------------------------------------\n * * ***Type guard assertion: `assertIsString`.***\n * ---------------------------------------------------------------------------------\n * **This function is an **assertion function**.**\n *\n * - **Behavior:**\n * - Validates that the given `value` is a **primitive-string**.\n * - After it returns successfully, TypeScript narrows the type of `value` to `primitive-string`.\n * - If `value` is a `primitive-string` ➔ execution continues normally.\n * - If `value` is not a `primitive-string` ➔ throws a built-in error with either:\n * - A custom error message (`options.message`), or\n * - A default message including the actual type.\n * - **Note:**\n * - A \"string\" refers strictly to a JavaScript `primitive-string` type (e.g., `\"hello\"`, `\"\"`, `\"123\"`).\n * - This function excludes `String` objects created with `new String()`.\n * - **Error type selection (`options.errorType`):**\n * - You can override the type of error thrown when validation fails.\n * - Must be one of the standard JavaScript built-in errors:\n * - [`TypeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError) |\n * [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) |\n * [`EvalError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError) |\n * [`RangeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError) |\n * [`ReferenceError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError) |\n * [`SyntaxError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError) |\n * [`URIError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError).\n * - **Default:** `\"TypeError\"` if not provided or invalid.\n *\n * @param {*} value - ***The value to validate.***\n * @param {OptionsAssertIs} [options]\n * ***Optional configuration:***\n * - `message`: A custom error message (`string` or `function`).\n * - `errorType`: Built-in JavaScript error type to throw on failure (default `\"TypeError\"`).\n * - `formatCase`: Controls how detected type names are formatted case in error messages.\n * - `useAcronyms`: Control uppercase preservation of recognized acronyms during formatting.\n *\n * @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.\n * @returns {boolean} Narrows `value` to `string` if no error is thrown.\n *\n * @example\n * ```ts\n * // ✅ Simple usage\n * assertIsString(\"hello\");\n * // No error, value is string\n *\n * // ❌ Throws TypeError (default behavior)\n * // Case 1: Invalid input type — received a string instead of a string\n * assertIsString(42);\n * // ➔ TypeError: \"Parameter input (`value`) must be of type `string`, but received: `number`.\"\n *\n * // Case 3: The new String() is a String object (constructor), not a primitive string\n * assertIsString(new String(\"abc\"));\n * // ➔ TypeError: \"Parameter input (`value`) must be of type `string`, but received: `string-constructor`.\"\n *\n * // ❌ Throws custom error type (e.g., RangeError)\n * assertIsString(async function () {}, { errorType: \"RangeError\" });\n * // ➔ RangeError: \"Parameter input (`value`) must be of type `string`, but received: `async-function`.\"\n *\n * // ❌ Throws a TypeError with a custom string static message\n * assertIsString(123, { message: \"Must be a string!\" });\n * // ➔ TypeError: \"Must be a string!\"\n *\n * // ❌ Throws a TypeError with a custom message function and formatCase\n * assertIsString(/regex/, {\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * formatCase: \"toPascalCaseSpace\"\n * });\n * // ➔ TypeError: \"Expected string but got (Reg Exp).\"\n *\n * // ❌ Throws a TypeError with a custom useAcronyms option\n * // Case 1:\n * assertIsString(new URL(\"https://example.com\"),{\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected string but got (url).\"\n * assertIsString(new URL(\"https://example.com\"), {\n * useAcronyms: true,\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected string but got (URL).\"\n *\n * // Case 2:\n * assertIsString(new URLSearchParams, {\n * formatCase: \"toPascalCase\",\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected string but got (UrlSearchParams).\"\n * assertIsString(new URLSearchParams, {\n * useAcronyms: true,\n * formatCase: \"toPascalCase\",\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected string but got (URLSearchParams).\"\n * ```\n * -------------------------------------------------------\n * ✅ ***Real-world usage with generic narrowing***:\n * ```ts\n * const mixedValue: string | boolean | undefined = getUserInput();\n *\n * // Runtime assertion: throws if `mixedValue` is not a `string`\n * assertIsString(mixedValue, {\n * errorType: \"RangeError\",\n * message: \"Must be a string!\"\n * });\n *\n * // ✅ If no error thrown, TypeScript narrows `mixedValue` to `string` here\n * const result: string = mixedValue; // ➔ Safe type assignment\n * console.log(result.toUpperCase()); // ➔ Safe to call String.prototype methods\n * ```\n */\nexport const assertIsString: (\n value: unknown,\n options?: OptionsAssertIs\n) => asserts value is string = (\n value: unknown,\n options?: OptionsAssertIs\n): asserts value is string => {\n if (isString(value)) return;\n\n resolveErrorMessageAssertions({\n value,\n options,\n requiredValidType: \"string\"\n });\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6HA,MAAa,kBAIX,OACA,YAC4B;CAC5B,IAAIA,wBAAS,KAAK,GAAG;CAErB,6CAA8B;EAC5B;EACA;EACA,mBAAmB;CACrB,CAAC;AACH"}
1
+ {"version":3,"file":"assertIsString-CuPbh3FB.cjs","names":["isString"],"sources":["../src/assertions/strings/assertIsString.ts"],"sourcesContent":["import { isString } from \"@/predicates/is/isString\";\nimport {\n resolveErrorMessageAssertions,\n type OptionsAssertIs\n} from \"../_private/assertIs\";\n\n/** --------------------------------------------------------------------------------\n * * ***Type guard assertion: `assertIsString`.***\n * ---------------------------------------------------------------------------------\n * **This function is an **assertion function**.**\n *\n * - **Behavior:**\n * - Validates that the given `value` is a **primitive-string**.\n * - After it returns successfully, TypeScript narrows the type of `value` to `primitive-string`.\n * - If `value` is a `primitive-string` ➔ execution continues normally.\n * - If `value` is not a `primitive-string` ➔ throws a built-in error with either:\n * - A custom error message (`options.message`), or\n * - A default message including the actual type.\n * - **Note:**\n * - A \"string\" refers strictly to a JavaScript `primitive-string` type (e.g., `\"hello\"`, `\"\"`, `\"123\"`).\n * - This function excludes `String` objects created with `new String()`.\n * - **Error type selection (`options.errorType`):**\n * - You can override the type of error thrown when validation fails.\n * - Must be one of the standard JavaScript built-in errors:\n * - [`TypeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError) |\n * [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) |\n * [`EvalError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError) |\n * [`RangeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError) |\n * [`ReferenceError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError) |\n * [`SyntaxError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError) |\n * [`URIError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError).\n * - **Default:** `\"TypeError\"` if not provided or invalid.\n *\n * @param {*} value - ***The value to validate.***\n * @param {OptionsAssertIs} [options]\n * ***Optional configuration:***\n * - `message`: A custom error message (`string` or `function`).\n * - `errorType`: Built-in JavaScript error type to throw on failure (default `\"TypeError\"`).\n * - `formatCase`: Controls how detected type names are formatted case in error messages.\n * - `useAcronyms`: Control uppercase preservation of recognized acronyms during formatting.\n *\n * @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.\n * @returns {boolean} Narrows `value` to `string` if no error is thrown.\n *\n * @example\n * ```ts\n * // ✅ Simple usage\n * assertIsString(\"hello\");\n * // No error, value is string\n *\n * // ❌ Throws TypeError (default behavior)\n * // Case 1: Invalid input type — received a string instead of a string\n * assertIsString(42);\n * // ➔ TypeError: \"Parameter input (`value`) must be of type `string`, but received: `number`.\"\n *\n * // Case 3: The new String() is a String object (constructor), not a primitive string\n * assertIsString(new String(\"abc\"));\n * // ➔ TypeError: \"Parameter input (`value`) must be of type `string`, but received: `string-constructor`.\"\n *\n * // ❌ Throws custom error type (e.g., RangeError)\n * assertIsString(async function () {}, { errorType: \"RangeError\" });\n * // ➔ RangeError: \"Parameter input (`value`) must be of type `string`, but received: `async-function`.\"\n *\n * // ❌ Throws a TypeError with a custom string static message\n * assertIsString(123, { message: \"Must be a string!\" });\n * // ➔ TypeError: \"Must be a string!\"\n *\n * // ❌ Throws a TypeError with a custom message function and formatCase\n * assertIsString(/regex/, {\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * formatCase: \"toPascalCaseSpace\"\n * });\n * // ➔ TypeError: \"Expected string but got (Reg Exp).\"\n *\n * // ❌ Throws a TypeError with a custom useAcronyms option\n * // Case 1:\n * assertIsString(new URL(\"https://example.com\"),{\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected string but got (url).\"\n * assertIsString(new URL(\"https://example.com\"), {\n * useAcronyms: true,\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected string but got (URL).\"\n *\n * // Case 2:\n * assertIsString(new URLSearchParams, {\n * formatCase: \"toPascalCase\",\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected string but got (UrlSearchParams).\"\n * assertIsString(new URLSearchParams, {\n * useAcronyms: true,\n * formatCase: \"toPascalCase\",\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected string but got (URLSearchParams).\"\n * ```\n * -------------------------------------------------------\n * ✅ ***Real-world usage with generic narrowing***:\n * ```ts\n * const mixedValue: string | boolean | undefined = getUserInput();\n *\n * // Runtime assertion: throws if `mixedValue` is not a `string`\n * assertIsString(mixedValue, {\n * errorType: \"RangeError\",\n * message: \"Must be a string!\"\n * });\n *\n * // ✅ If no error thrown, TypeScript narrows `mixedValue` to `string` here\n * const result: string = mixedValue; // ➔ Safe type assignment\n * console.log(result.toUpperCase()); // ➔ Safe to call String.prototype methods\n * ```\n */\nexport const assertIsString: (\n value: unknown,\n options?: OptionsAssertIs\n) => asserts value is string = (\n value: unknown,\n options?: OptionsAssertIs\n): asserts value is string => {\n if (isString(value)) return;\n\n resolveErrorMessageAssertions({\n value,\n options,\n requiredValidType: \"string\"\n });\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6HA,MAAa,kBAIX,OACA,YAC4B;CAC5B,IAAIA,wBAAS,KAAK,GAAG;CAErB,6CAA8B;EAC5B;EACA;EACA,mBAAmB;CACrB,CAAC;AACH"}
@@ -2,12 +2,12 @@
2
2
  * ========================================================================
3
3
  * @rzl-zone/utils-js
4
4
  * ------------------------------------------------------------------------
5
- * Version: `3.14.0-beta.0`
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
- import { T as isString, r as resolveErrorMessageAssertions } from "./logger-CLWnKRKE.js";
10
+ import { T as isString, r as resolveErrorMessageAssertions } from "./logger-Wxl_Krg6.js";
11
11
  const assertIsString = (value, options) => {
12
12
  if (isString(value)) return;
13
13
  resolveErrorMessageAssertions({
@@ -17,4 +17,4 @@ const assertIsString = (value, options) => {
17
17
  });
18
18
  };
19
19
  export { assertIsString as t };
20
- //# sourceMappingURL=assertIsString-CHIwE12y.js.map
20
+ //# sourceMappingURL=assertIsString-sgY3ml5f.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"assertIsString-CHIwE12y.js","names":[],"sources":["../src/assertions/strings/assertIsString.ts"],"sourcesContent":["import { isString } from \"@/predicates/is/isString\";\nimport {\n resolveErrorMessageAssertions,\n type OptionsAssertIs\n} from \"../_private/assertIs\";\n\n/** --------------------------------------------------------------------------------\n * * ***Type guard assertion: `assertIsString`.***\n * ---------------------------------------------------------------------------------\n * **This function is an **assertion function**.**\n *\n * - **Behavior:**\n * - Validates that the given `value` is a **primitive-string**.\n * - After it returns successfully, TypeScript narrows the type of `value` to `primitive-string`.\n * - If `value` is a `primitive-string` ➔ execution continues normally.\n * - If `value` is not a `primitive-string` ➔ throws a built-in error with either:\n * - A custom error message (`options.message`), or\n * - A default message including the actual type.\n * - **Note:**\n * - A \"string\" refers strictly to a JavaScript `primitive-string` type (e.g., `\"hello\"`, `\"\"`, `\"123\"`).\n * - This function excludes `String` objects created with `new String()`.\n * - **Error type selection (`options.errorType`):**\n * - You can override the type of error thrown when validation fails.\n * - Must be one of the standard JavaScript built-in errors:\n * - [`TypeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError) |\n * [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) |\n * [`EvalError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError) |\n * [`RangeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError) |\n * [`ReferenceError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError) |\n * [`SyntaxError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError) |\n * [`URIError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError).\n * - **Default:** `\"TypeError\"` if not provided or invalid.\n *\n * @param {*} value - ***The value to validate.***\n * @param {OptionsAssertIs} [options]\n * ***Optional configuration:***\n * - `message`: A custom error message (`string` or `function`).\n * - `errorType`: Built-in JavaScript error type to throw on failure (default `\"TypeError\"`).\n * - `formatCase`: Controls how detected type names are formatted case in error messages.\n * - `useAcronyms`: Control uppercase preservation of recognized acronyms during formatting.\n *\n * @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.\n * @returns {boolean} Narrows `value` to `string` if no error is thrown.\n *\n * @example\n * ```ts\n * // ✅ Simple usage\n * assertIsString(\"hello\");\n * // No error, value is string\n *\n * // ❌ Throws TypeError (default behavior)\n * // Case 1: Invalid input type — received a string instead of a string\n * assertIsString(42);\n * // ➔ TypeError: \"Parameter input (`value`) must be of type `string`, but received: `number`.\"\n *\n * // Case 3: The new String() is a String object (constructor), not a primitive string\n * assertIsString(new String(\"abc\"));\n * // ➔ TypeError: \"Parameter input (`value`) must be of type `string`, but received: `string-constructor`.\"\n *\n * // ❌ Throws custom error type (e.g., RangeError)\n * assertIsString(async function () {}, { errorType: \"RangeError\" });\n * // ➔ RangeError: \"Parameter input (`value`) must be of type `string`, but received: `async-function`.\"\n *\n * // ❌ Throws a TypeError with a custom string static message\n * assertIsString(123, { message: \"Must be a string!\" });\n * // ➔ TypeError: \"Must be a string!\"\n *\n * // ❌ Throws a TypeError with a custom message function and formatCase\n * assertIsString(/regex/, {\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * formatCase: \"toPascalCaseSpace\"\n * });\n * // ➔ TypeError: \"Expected string but got (Reg Exp).\"\n *\n * // ❌ Throws a TypeError with a custom useAcronyms option\n * // Case 1:\n * assertIsString(new URL(\"https://example.com\"),{\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected string but got (url).\"\n * assertIsString(new URL(\"https://example.com\"), {\n * useAcronyms: true,\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected string but got (URL).\"\n *\n * // Case 2:\n * assertIsString(new URLSearchParams, {\n * formatCase: \"toPascalCase\",\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected string but got (UrlSearchParams).\"\n * assertIsString(new URLSearchParams, {\n * useAcronyms: true,\n * formatCase: \"toPascalCase\",\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected string but got (URLSearchParams).\"\n * ```\n * -------------------------------------------------------\n * ✅ ***Real-world usage with generic narrowing***:\n * ```ts\n * const mixedValue: string | boolean | undefined = getUserInput();\n *\n * // Runtime assertion: throws if `mixedValue` is not a `string`\n * assertIsString(mixedValue, {\n * errorType: \"RangeError\",\n * message: \"Must be a string!\"\n * });\n *\n * // ✅ If no error thrown, TypeScript narrows `mixedValue` to `string` here\n * const result: string = mixedValue; // ➔ Safe type assignment\n * console.log(result.toUpperCase()); // ➔ Safe to call String.prototype methods\n * ```\n */\nexport const assertIsString: (\n value: unknown,\n options?: OptionsAssertIs\n) => asserts value is string = (\n value: unknown,\n options?: OptionsAssertIs\n): asserts value is string => {\n if (isString(value)) return;\n\n resolveErrorMessageAssertions({\n value,\n options,\n requiredValidType: \"string\"\n });\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6HA,MAAa,kBAIX,OACA,YAC4B;CAC5B,IAAI,SAAS,KAAK,GAAG;CAErB,8BAA8B;EAC5B;EACA;EACA,mBAAmB;CACrB,CAAC;AACH"}
1
+ {"version":3,"file":"assertIsString-sgY3ml5f.js","names":[],"sources":["../src/assertions/strings/assertIsString.ts"],"sourcesContent":["import { isString } from \"@/predicates/is/isString\";\nimport {\n resolveErrorMessageAssertions,\n type OptionsAssertIs\n} from \"../_private/assertIs\";\n\n/** --------------------------------------------------------------------------------\n * * ***Type guard assertion: `assertIsString`.***\n * ---------------------------------------------------------------------------------\n * **This function is an **assertion function**.**\n *\n * - **Behavior:**\n * - Validates that the given `value` is a **primitive-string**.\n * - After it returns successfully, TypeScript narrows the type of `value` to `primitive-string`.\n * - If `value` is a `primitive-string` ➔ execution continues normally.\n * - If `value` is not a `primitive-string` ➔ throws a built-in error with either:\n * - A custom error message (`options.message`), or\n * - A default message including the actual type.\n * - **Note:**\n * - A \"string\" refers strictly to a JavaScript `primitive-string` type (e.g., `\"hello\"`, `\"\"`, `\"123\"`).\n * - This function excludes `String` objects created with `new String()`.\n * - **Error type selection (`options.errorType`):**\n * - You can override the type of error thrown when validation fails.\n * - Must be one of the standard JavaScript built-in errors:\n * - [`TypeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError) |\n * [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) |\n * [`EvalError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError) |\n * [`RangeError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError) |\n * [`ReferenceError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError) |\n * [`SyntaxError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError) |\n * [`URIError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError).\n * - **Default:** `\"TypeError\"` if not provided or invalid.\n *\n * @param {*} value - ***The value to validate.***\n * @param {OptionsAssertIs} [options]\n * ***Optional configuration:***\n * - `message`: A custom error message (`string` or `function`).\n * - `errorType`: Built-in JavaScript error type to throw on failure (default `\"TypeError\"`).\n * - `formatCase`: Controls how detected type names are formatted case in error messages.\n * - `useAcronyms`: Control uppercase preservation of recognized acronyms during formatting.\n *\n * @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.\n * @returns {boolean} Narrows `value` to `string` if no error is thrown.\n *\n * @example\n * ```ts\n * // ✅ Simple usage\n * assertIsString(\"hello\");\n * // No error, value is string\n *\n * // ❌ Throws TypeError (default behavior)\n * // Case 1: Invalid input type — received a string instead of a string\n * assertIsString(42);\n * // ➔ TypeError: \"Parameter input (`value`) must be of type `string`, but received: `number`.\"\n *\n * // Case 3: The new String() is a String object (constructor), not a primitive string\n * assertIsString(new String(\"abc\"));\n * // ➔ TypeError: \"Parameter input (`value`) must be of type `string`, but received: `string-constructor`.\"\n *\n * // ❌ Throws custom error type (e.g., RangeError)\n * assertIsString(async function () {}, { errorType: \"RangeError\" });\n * // ➔ RangeError: \"Parameter input (`value`) must be of type `string`, but received: `async-function`.\"\n *\n * // ❌ Throws a TypeError with a custom string static message\n * assertIsString(123, { message: \"Must be a string!\" });\n * // ➔ TypeError: \"Must be a string!\"\n *\n * // ❌ Throws a TypeError with a custom message function and formatCase\n * assertIsString(/regex/, {\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * formatCase: \"toPascalCaseSpace\"\n * });\n * // ➔ TypeError: \"Expected string but got (Reg Exp).\"\n *\n * // ❌ Throws a TypeError with a custom useAcronyms option\n * // Case 1:\n * assertIsString(new URL(\"https://example.com\"),{\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected string but got (url).\"\n * assertIsString(new URL(\"https://example.com\"), {\n * useAcronyms: true,\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected string but got (URL).\"\n *\n * // Case 2:\n * assertIsString(new URLSearchParams, {\n * formatCase: \"toPascalCase\",\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected string but got (UrlSearchParams).\"\n * assertIsString(new URLSearchParams, {\n * useAcronyms: true,\n * formatCase: \"toPascalCase\",\n * message: ({ currentType, validType }) => {\n * return `Expected ${validType} but got (${currentType}).`\n * },\n * });\n * // ➔ TypeError: \"Expected string but got (URLSearchParams).\"\n * ```\n * -------------------------------------------------------\n * ✅ ***Real-world usage with generic narrowing***:\n * ```ts\n * const mixedValue: string | boolean | undefined = getUserInput();\n *\n * // Runtime assertion: throws if `mixedValue` is not a `string`\n * assertIsString(mixedValue, {\n * errorType: \"RangeError\",\n * message: \"Must be a string!\"\n * });\n *\n * // ✅ If no error thrown, TypeScript narrows `mixedValue` to `string` here\n * const result: string = mixedValue; // ➔ Safe type assignment\n * console.log(result.toUpperCase()); // ➔ Safe to call String.prototype methods\n * ```\n */\nexport const assertIsString: (\n value: unknown,\n options?: OptionsAssertIs\n) => asserts value is string = (\n value: unknown,\n options?: OptionsAssertIs\n): asserts value is string => {\n if (isString(value)) return;\n\n resolveErrorMessageAssertions({\n value,\n options,\n requiredValidType: \"string\"\n });\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6HA,MAAa,kBAIX,OACA,YAC4B;CAC5B,IAAI,SAAS,KAAK,GAAG;CAErB,8BAA8B;EAC5B;EACA;EACA,mBAAmB;CACrB,CAAC;AACH"}
@@ -2,19 +2,19 @@
2
2
  * ========================================================================
3
3
  * @rzl-zone/utils-js
4
4
  * ------------------------------------------------------------------------
5
- * Version: `3.14.0-beta.0`
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
  "use strict";
11
11
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
12
- const require_logger = require('../logger-CUacYy3D.cjs');
13
- const require_isBigInt = require('../isBigInt-YgpNKTbA.cjs');
14
- const require_isNumber = require('../isNumber-BkzwAe50.cjs');
15
- const require_assertIsArray = require('../assertIsArray-CtCRD-_G.cjs');
16
- const require_assertIsPlainObject = require('../assertIsPlainObject-DPZLj-Ho.cjs');
17
- const require_assertIsString = require('../assertIsString-CjE9kbQ_.cjs');
12
+ const require_logger = require('../logger-BXg2xufj.cjs');
13
+ const require_isBigInt = require('../isBigInt-LkCpVJ3E.cjs');
14
+ const require_isNumber = require('../isNumber-CM1vdNcW.cjs');
15
+ const require_assertIsArray = require('../assertIsArray-Xx-zlo6O.cjs');
16
+ const require_assertIsPlainObject = require('../assertIsPlainObject-DYoxHcW5.cjs');
17
+ const require_assertIsString = require('../assertIsString-CuPbh3FB.cjs');
18
18
  const assertIsBigInt = (value, options) => {
19
19
  if (require_isBigInt.isBigInt(value)) return;
20
20
  require_logger.resolveErrorMessageAssertions({
@@ -2,11 +2,11 @@
2
2
  * ========================================================================
3
3
  * @rzl-zone/utils-js
4
4
  * ------------------------------------------------------------------------
5
- * Version: `3.14.0-beta.0`
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 assertIsBigInt, i as assertIsNumber, n as assertIsPlainObject, o as assertIsBoolean, r as assertIsArray, t as assertIsString } from "../index-BVovC-yK.cjs";
11
+ import { a as assertIsBigInt, i as assertIsNumber, n as assertIsPlainObject, o as assertIsBoolean, r as assertIsArray, t as assertIsString } from "../index-9Ql1W3gt.cjs";
12
12
  export { assertIsArray, assertIsBigInt, assertIsBoolean, assertIsNumber, assertIsPlainObject, assertIsString };
@@ -2,11 +2,11 @@
2
2
  * ========================================================================
3
3
  * @rzl-zone/utils-js
4
4
  * ------------------------------------------------------------------------
5
- * Version: `3.14.0-beta.0`
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 assertIsBigInt, i as assertIsNumber, n as assertIsPlainObject, o as assertIsBoolean, r as assertIsArray, t as assertIsString } from "../index-jyuOZMX7.js";
11
+ import { a as assertIsBigInt, i as assertIsNumber, n as assertIsPlainObject, o as assertIsBoolean, r as assertIsArray, t as assertIsString } from "../index-DqYMKSmd.js";
12
12
  export { assertIsArray, assertIsBigInt, assertIsBoolean, assertIsNumber, assertIsPlainObject, assertIsString };