@rzl-zone/utils-js 3.12.1-beta.0 → 3.12.1-beta.1

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 (239) hide show
  1. package/README.md +7 -7
  2. package/dist/.references/index.d.cts +1 -1
  3. package/dist/.references/index.d.ts +1 -1
  4. package/dist/{assertIsArray-BChqwPiP.cjs → assertIsArray-DJXkjHZs.cjs} +3 -3
  5. package/dist/{assertIsArray-BChqwPiP.cjs.map → assertIsArray-DJXkjHZs.cjs.map} +1 -1
  6. package/dist/{assertIsArray-BfAbIUfa.js → assertIsArray-bTA3XLjq.js} +3 -3
  7. package/dist/{assertIsArray-BfAbIUfa.js.map → assertIsArray-bTA3XLjq.js.map} +1 -1
  8. package/dist/{assertIsBoolean-DozdtbNi.cjs → assertIsBoolean-C8WEXVr2.cjs} +8 -8
  9. package/dist/assertIsBoolean-C8WEXVr2.cjs.map +1 -0
  10. package/dist/{assertIsBoolean-BlBct0Fc.js → assertIsBoolean-DR1SaXPD.js} +8 -8
  11. package/dist/assertIsBoolean-DR1SaXPD.js.map +1 -0
  12. package/dist/{assertIsString-Bvk7bUL7.cjs → assertIsString-BiHQSrB2.cjs} +3 -3
  13. package/dist/{assertIsString-Bvk7bUL7.cjs.map → assertIsString-BiHQSrB2.cjs.map} +1 -1
  14. package/dist/{assertIsString-DqV9NwbI.js → assertIsString-CEB07_83.js} +3 -3
  15. package/dist/{assertIsString-DqV9NwbI.js.map → assertIsString-CEB07_83.js.map} +1 -1
  16. package/dist/assertions/index.cjs +5 -5
  17. package/dist/assertions/index.d.cts +2 -2
  18. package/dist/assertions/index.d.ts +2 -2
  19. package/dist/assertions/index.js +5 -5
  20. package/dist/conversions/index.cjs +6 -6
  21. package/dist/conversions/index.d.cts +2 -2
  22. package/dist/conversions/index.d.ts +2 -2
  23. package/dist/conversions/index.js +6 -6
  24. package/dist/{conversions-EMJa3g-D.js → conversions-BNIh_tCH.js} +16 -18
  25. package/dist/conversions-BNIh_tCH.js.map +1 -0
  26. package/dist/{conversions-CBs8-REq.cjs → conversions-D_Kh0a_C.cjs} +16 -18
  27. package/dist/conversions-D_Kh0a_C.cjs.map +1 -0
  28. package/dist/events/index.cjs +4 -4
  29. package/dist/events/index.cjs.map +1 -1
  30. package/dist/events/index.d.cts +153 -151
  31. package/dist/events/index.d.ts +153 -151
  32. package/dist/events/index.js +4 -4
  33. package/dist/events/index.js.map +1 -1
  34. package/dist/{formatEnvPort-hHNvOim-.cjs → formatEnvPort-B3OLxQk9.cjs} +9 -9
  35. package/dist/formatEnvPort-B3OLxQk9.cjs.map +1 -0
  36. package/dist/{formatEnvPort-DpIXzPAZ.js → formatEnvPort-ByFVLjSV.js} +9 -9
  37. package/dist/formatEnvPort-ByFVLjSV.js.map +1 -0
  38. package/dist/formatters/index.cjs +2 -2
  39. package/dist/formatters/index.d.cts +2 -2
  40. package/dist/formatters/index.d.ts +2 -2
  41. package/dist/formatters/index.js +2 -2
  42. package/dist/{formatters-QcZO_Cpx.js → formatters--1m_vpE8.js} +17 -15
  43. package/dist/formatters--1m_vpE8.js.map +1 -0
  44. package/dist/{formatters-lAYgA11L.cjs → formatters-Cbij0XLU.cjs} +17 -15
  45. package/dist/formatters-Cbij0XLU.cjs.map +1 -0
  46. package/dist/generators/index.cjs +12 -8
  47. package/dist/generators/index.cjs.map +1 -1
  48. package/dist/generators/index.d.cts +2 -2
  49. package/dist/generators/index.d.ts +2 -2
  50. package/dist/generators/index.js +12 -8
  51. package/dist/generators/index.js.map +1 -1
  52. package/dist/index-59zbLcPr.d.ts +340 -0
  53. package/dist/index-B6tawc8L.d.cts +1716 -0
  54. package/dist/index-C267akkJ.d.ts +2158 -0
  55. package/dist/index-CeBC2Vvl.d.cts +2361 -0
  56. package/dist/index-CgRDTI6f.d.ts +822 -0
  57. package/dist/index-CoiUBVmr.d.ts +720 -0
  58. package/dist/index-D4fcasfZ.d.cts +720 -0
  59. package/dist/index-DDrSQKIc.d.ts +1716 -0
  60. package/dist/index-DsGxO31H.d.cts +765 -0
  61. package/dist/index-Hg1qJkjl.d.ts +765 -0
  62. package/dist/index-Qm3iFwd0.d.cts +2158 -0
  63. package/dist/index-UPp94Agr.d.ts +2361 -0
  64. package/dist/index-gBA_8SuF.d.cts +340 -0
  65. package/dist/index-jyDqzicx.d.cts +822 -0
  66. package/dist/{isBigInt-B1cijjqm.cjs → isBigInt-C4krUeAw.cjs} +2 -2
  67. package/dist/{isBigInt-B1cijjqm.cjs.map → isBigInt-C4krUeAw.cjs.map} +1 -1
  68. package/dist/{isBigInt-C0bN0Rhu.js → isBigInt-DKe0M6hp.js} +2 -2
  69. package/dist/{isBigInt-C0bN0Rhu.js.map → isBigInt-DKe0M6hp.js.map} +1 -1
  70. package/dist/{isEmptyObject-DeLVIJpl.js → isEmptyObject-DCipFwxJ.js} +3 -3
  71. package/dist/{isEmptyObject-DeLVIJpl.js.map → isEmptyObject-DCipFwxJ.js.map} +1 -1
  72. package/dist/{isEmptyObject-DI42NEo0.cjs → isEmptyObject-ZkSwRC_D.cjs} +3 -3
  73. package/dist/{isEmptyObject-DI42NEo0.cjs.map → isEmptyObject-ZkSwRC_D.cjs.map} +1 -1
  74. package/dist/{isEmptyString-BTUWYTbw.js → isEmptyString-BXzKAC2j.js} +3 -3
  75. package/dist/{isEmptyString-BTUWYTbw.js.map → isEmptyString-BXzKAC2j.js.map} +1 -1
  76. package/dist/{isEmptyString-CCK3bP74.cjs → isEmptyString-UiiUsSQj.cjs} +3 -3
  77. package/dist/{isEmptyString-CCK3bP74.cjs.map → isEmptyString-UiiUsSQj.cjs.map} +1 -1
  78. package/dist/{isEmptyValue-DMSMFTU8.cjs → isEmptyValue-BQzcjVaL.cjs} +5 -5
  79. package/dist/{isEmptyValue-DMSMFTU8.cjs.map → isEmptyValue-BQzcjVaL.cjs.map} +1 -1
  80. package/dist/{isEmptyValue-fjnfQnt5.js → isEmptyValue-jqOr7OHD.js} +5 -5
  81. package/dist/{isEmptyValue-fjnfQnt5.js.map → isEmptyValue-jqOr7OHD.js.map} +1 -1
  82. package/dist/{isEqual-DhyP8fB_.js → isEqual-BX49cF9m.js} +4 -4
  83. package/dist/{isEqual-DhyP8fB_.js.map → isEqual-BX49cF9m.js.map} +1 -1
  84. package/dist/{isEqual-B1fRgEuU.cjs → isEqual-BvumA3RA.cjs} +4 -4
  85. package/dist/{isEqual-B1fRgEuU.cjs.map → isEqual-BvumA3RA.cjs.map} +1 -1
  86. package/dist/{isFinite-BYMOo0os.js → isFinite-BCnaDpod.js} +3 -3
  87. package/dist/{isFinite-BYMOo0os.js.map → isFinite-BCnaDpod.js.map} +1 -1
  88. package/dist/{isFinite-sFkps2TY.cjs → isFinite-D24ZaE6c.cjs} +3 -3
  89. package/dist/{isFinite-sFkps2TY.cjs.map → isFinite-D24ZaE6c.cjs.map} +1 -1
  90. package/dist/{isInteger-FTCthMre.cjs → isInteger-Caeuz0rB.cjs} +2 -2
  91. package/dist/{isInteger-FTCthMre.cjs.map → isInteger-Caeuz0rB.cjs.map} +1 -1
  92. package/dist/{isInteger-DS9V7l_f.js → isInteger-naMbJsxJ.js} +2 -2
  93. package/dist/{isInteger-DS9V7l_f.js.map → isInteger-naMbJsxJ.js.map} +1 -1
  94. package/dist/isPlainObject-BF-2-phb.d.cts +339 -0
  95. package/dist/isPlainObject-DxNDL8XU.d.ts +339 -0
  96. package/dist/{isServer-q-QLFCqE.cjs → isServer-BJHVnixd.cjs} +2 -2
  97. package/dist/{isServer-q-QLFCqE.cjs.map → isServer-BJHVnixd.cjs.map} +1 -1
  98. package/dist/{isServer-D1TXfOs3.js → isServer-Da3o3XSs.js} +2 -2
  99. package/dist/{isServer-D1TXfOs3.js.map → isServer-Da3o3XSs.js.map} +1 -1
  100. package/dist/{isTypedArray-47R0wdrc.js → isTypedArray-DuNA8tK6.js} +3 -3
  101. package/dist/{isTypedArray-47R0wdrc.js.map → isTypedArray-DuNA8tK6.js.map} +1 -1
  102. package/dist/{isTypedArray-DiCoqffZ.cjs → isTypedArray-TJptiw2b.cjs} +3 -3
  103. package/dist/{isTypedArray-DiCoqffZ.cjs.map → isTypedArray-TJptiw2b.cjs.map} +1 -1
  104. package/dist/{isURL-CQiowFq2.js → isURL-C-kSk6KJ.js} +2 -2
  105. package/dist/{isURL-CQiowFq2.js.map → isURL-C-kSk6KJ.js.map} +1 -1
  106. package/dist/{isURL-WZypXsax.cjs → isURL-DeUPO_oR.cjs} +2 -2
  107. package/dist/{isURL-WZypXsax.cjs.map → isURL-DeUPO_oR.cjs.map} +1 -1
  108. package/dist/{isValidDomain-BSXshgkC.cjs → isValidDomain-BB9IGhJs.cjs} +65 -8
  109. package/dist/isValidDomain-BB9IGhJs.cjs.map +1 -0
  110. package/dist/{isValidDomain-DwA2EN79.js → isValidDomain-DoE98yhJ.js} +54 -9
  111. package/dist/isValidDomain-DoE98yhJ.js.map +1 -0
  112. package/dist/next/index.cjs +7 -7
  113. package/dist/next/index.cjs.map +1 -1
  114. package/dist/next/index.d.cts +185 -191
  115. package/dist/next/index.d.ts +185 -191
  116. package/dist/next/index.js +7 -7
  117. package/dist/next/index.js.map +1 -1
  118. package/dist/next/server/index.cjs +2 -2
  119. package/dist/next/server/index.d.cts +26 -26
  120. package/dist/next/server/index.d.ts +26 -26
  121. package/dist/next/server/index.js +2 -2
  122. package/dist/{noop-B2mTBhW-.cjs → noop-B13_ii35.cjs} +2 -2
  123. package/dist/{noop-B2mTBhW-.cjs.map → noop-B13_ii35.cjs.map} +1 -1
  124. package/dist/{noop-BzktGBVz.js → noop-ubqAIbHD.js} +2 -2
  125. package/dist/{noop-BzktGBVz.js.map → noop-ubqAIbHD.js.map} +1 -1
  126. package/dist/{normalizeSpaces-WS_iERJk.js → normalizeSpaces-Bg2IZW7W.js} +3 -3
  127. package/dist/{normalizeSpaces-WS_iERJk.js.map → normalizeSpaces-Bg2IZW7W.js.map} +1 -1
  128. package/dist/{normalizeSpaces-DQHR3Tlr.cjs → normalizeSpaces-ZXnR4Qzp.cjs} +3 -3
  129. package/dist/{normalizeSpaces-DQHR3Tlr.cjs.map → normalizeSpaces-ZXnR4Qzp.cjs.map} +1 -1
  130. package/dist/{normalizeString-2WLth_Gj.js → normalizeString-BDdkaXui.js} +3 -3
  131. package/dist/{normalizeString-2WLth_Gj.js.map → normalizeString-BDdkaXui.js.map} +1 -1
  132. package/dist/{normalizeString-D8euBcRD.cjs → normalizeString-BE6ELqEb.cjs} +3 -3
  133. package/dist/{normalizeString-D8euBcRD.cjs.map → normalizeString-BE6ELqEb.cjs.map} +1 -1
  134. package/dist/operations/index.cjs +10 -10
  135. package/dist/operations/index.cjs.map +1 -1
  136. package/dist/operations/index.d.cts +120 -120
  137. package/dist/operations/index.d.ts +120 -120
  138. package/dist/operations/index.js +10 -10
  139. package/dist/operations/index.js.map +1 -1
  140. package/dist/parsers/index.cjs +2 -2
  141. package/dist/parsers/index.d.cts +222 -222
  142. package/dist/parsers/index.d.ts +222 -222
  143. package/dist/parsers/index.js +2 -2
  144. package/dist/{parsers-Dpuq-V4u.js → parsers-BSBPgvsq.js} +4 -4
  145. package/dist/{parsers-Dpuq-V4u.js.map → parsers-BSBPgvsq.js.map} +1 -1
  146. package/dist/{parsers-DXtpsDyj.cjs → parsers-OqDeffqc.cjs} +4 -4
  147. package/dist/{parsers-DXtpsDyj.cjs.map → parsers-OqDeffqc.cjs.map} +1 -1
  148. package/dist/{parsing-B43x1sxn.js → parsing-Cao8b358.js} +3 -3
  149. package/dist/{parsing-B43x1sxn.js.map → parsing-Cao8b358.js.map} +1 -1
  150. package/dist/{parsing-lRoxn1Nz.cjs → parsing-DOGSCH6N.cjs} +3 -3
  151. package/dist/{parsing-lRoxn1Nz.cjs.map → parsing-DOGSCH6N.cjs.map} +1 -1
  152. package/dist/predicates/index.cjs +15 -15
  153. package/dist/predicates/index.d.cts +3 -3
  154. package/dist/predicates/index.d.ts +3 -3
  155. package/dist/predicates/index.js +15 -15
  156. package/dist/{predicates-gNepszvo.js → predicates-Bj6meyXV.js} +13 -14
  157. package/dist/{predicates-gNepszvo.js.map → predicates-Bj6meyXV.js.map} +1 -1
  158. package/dist/{predicates-DiaYA7Ps.cjs → predicates-D0ubqgqy.cjs} +13 -14
  159. package/dist/{predicates-DiaYA7Ps.cjs.map → predicates-D0ubqgqy.cjs.map} +1 -1
  160. package/dist/promises/index.cjs +4 -4
  161. package/dist/promises/index.d.cts +101 -101
  162. package/dist/promises/index.d.ts +101 -101
  163. package/dist/promises/index.js +4 -4
  164. package/dist/{punyCode-hmiFzLWT.js → punyCode-8SrbMWfM.js} +6 -6
  165. package/dist/punyCode-8SrbMWfM.js.map +1 -0
  166. package/dist/{punyCode-CTWXVVFo.cjs → punyCode-D-Qu6nj6.cjs} +6 -6
  167. package/dist/punyCode-D-Qu6nj6.cjs.map +1 -0
  168. package/dist/{removeSpaces-BE8lfh-4.js → removeSpaces-Bmc5DX4F.js} +3 -3
  169. package/dist/removeSpaces-Bmc5DX4F.js.map +1 -0
  170. package/dist/{removeSpaces-DRRxNWlb.cjs → removeSpaces-CWIvhZHg.cjs} +3 -3
  171. package/dist/removeSpaces-CWIvhZHg.cjs.map +1 -0
  172. package/dist/rzl-utils.global.js +21 -0
  173. package/dist/{safeJsonParse-CXruaP0p.js → safeJsonParse-BP38mwlj.js} +9 -9
  174. package/dist/safeJsonParse-BP38mwlj.js.map +1 -0
  175. package/dist/{safeJsonParse-BBnQElk8.cjs → safeJsonParse-Sms2CJf4.cjs} +9 -9
  176. package/dist/safeJsonParse-Sms2CJf4.cjs.map +1 -0
  177. package/dist/{safeStableStringify-Cc62pfRp.cjs → safeStableStringify-CJtP89qn.cjs} +4 -4
  178. package/dist/{safeStableStringify-Cc62pfRp.cjs.map → safeStableStringify-CJtP89qn.cjs.map} +1 -1
  179. package/dist/{safeStableStringify-BNh3D0K0.js → safeStableStringify-CXOZ9Ub8.js} +4 -4
  180. package/dist/{safeStableStringify-BNh3D0K0.js.map → safeStableStringify-CXOZ9Ub8.js.map} +1 -1
  181. package/dist/strings/index.cjs +12 -9
  182. package/dist/strings/index.cjs.map +1 -1
  183. package/dist/strings/index.d.cts +2 -2
  184. package/dist/strings/index.d.ts +2 -2
  185. package/dist/strings/index.js +12 -9
  186. package/dist/strings/index.js.map +1 -1
  187. package/dist/tailwind/index.cjs +2 -2
  188. package/dist/tailwind/index.d.cts +2 -2
  189. package/dist/tailwind/index.d.ts +2 -2
  190. package/dist/tailwind/index.js +2 -2
  191. package/dist/{tailwind-IJvOdkZp.js → tailwind-B2ssevxq.js} +5 -5
  192. package/dist/tailwind-B2ssevxq.js.map +1 -0
  193. package/dist/{tailwind-DJ4cmLUw.cjs → tailwind-CHIx9uxu.cjs} +5 -5
  194. package/dist/tailwind-CHIx9uxu.cjs.map +1 -0
  195. package/dist/{toStringArrayUnRecursive-xUaU8Ot9.cjs → toStringArrayUnRecursive-C4zYCja7.cjs} +6 -6
  196. package/dist/{toStringArrayUnRecursive-xUaU8Ot9.cjs.map → toStringArrayUnRecursive-C4zYCja7.cjs.map} +1 -1
  197. package/dist/{toStringArrayUnRecursive-CFs0jTEg.js → toStringArrayUnRecursive-DJGtPsFb.js} +6 -6
  198. package/dist/{toStringArrayUnRecursive-CFs0jTEg.js.map → toStringArrayUnRecursive-DJGtPsFb.js.map} +1 -1
  199. package/dist/urls/index.cjs +15 -14
  200. package/dist/urls/index.cjs.map +1 -1
  201. package/dist/urls/index.d.cts +656 -659
  202. package/dist/urls/index.d.ts +656 -659
  203. package/dist/urls/index.js +15 -14
  204. package/dist/urls/index.js.map +1 -1
  205. package/package.json +2 -2
  206. package/dist/assertIsBoolean-BlBct0Fc.js.map +0 -1
  207. package/dist/assertIsBoolean-DozdtbNi.cjs.map +0 -1
  208. package/dist/conversions-CBs8-REq.cjs.map +0 -1
  209. package/dist/conversions-EMJa3g-D.js.map +0 -1
  210. package/dist/formatEnvPort-DpIXzPAZ.js.map +0 -1
  211. package/dist/formatEnvPort-hHNvOim-.cjs.map +0 -1
  212. package/dist/formatters-QcZO_Cpx.js.map +0 -1
  213. package/dist/formatters-lAYgA11L.cjs.map +0 -1
  214. package/dist/index-26W7ItWx.d.ts +0 -760
  215. package/dist/index-BPPQjAfs.d.cts +0 -2359
  216. package/dist/index-BXjlgBLz.d.cts +0 -2139
  217. package/dist/index-B_Wwo91H.d.ts +0 -2359
  218. package/dist/index-CpufydcI.d.cts +0 -704
  219. package/dist/index-Czc4O526.d.ts +0 -333
  220. package/dist/index-DPs1_p5G.d.cts +0 -760
  221. package/dist/index-DRpOyBSC.d.ts +0 -1703
  222. package/dist/index-DWWvtHUn.d.cts +0 -822
  223. package/dist/index-DnM0LD0n.d.cts +0 -333
  224. package/dist/index-GUZ9fK6T.d.ts +0 -2139
  225. package/dist/index-I4fAzwXV.d.ts +0 -704
  226. package/dist/index-JDrOl_19.d.ts +0 -822
  227. package/dist/index-b66P49Qe.d.cts +0 -1703
  228. package/dist/isPlainObject-DcFGh3_5.d.ts +0 -530
  229. package/dist/isPlainObject-doTI11Ib.d.cts +0 -530
  230. package/dist/isValidDomain-BSXshgkC.cjs.map +0 -1
  231. package/dist/isValidDomain-DwA2EN79.js.map +0 -1
  232. package/dist/punyCode-CTWXVVFo.cjs.map +0 -1
  233. package/dist/punyCode-hmiFzLWT.js.map +0 -1
  234. package/dist/removeSpaces-BE8lfh-4.js.map +0 -1
  235. package/dist/removeSpaces-DRRxNWlb.cjs.map +0 -1
  236. package/dist/safeJsonParse-BBnQElk8.cjs.map +0 -1
  237. package/dist/safeJsonParse-CXruaP0p.js.map +0 -1
  238. package/dist/tailwind-DJ4cmLUw.cjs.map +0 -1
  239. package/dist/tailwind-IJvOdkZp.js.map +0 -1
@@ -0,0 +1,765 @@
1
+ /*!
2
+ * ========================================================================
3
+ * @rzl-zone/utils-js
4
+ * ------------------------------------------------------------------------
5
+ * Version: `3.12.1-beta.1`
6
+ * Author: `Rizalvin Dwiky <rizalvindwiky@gmail.com>`
7
+ * Repository: `https://github.com/rzl-zone/rzl-zone/tree/main/packages/utils-js`
8
+ * ========================================================================
9
+ */
10
+
11
+ import { Extends, Nilable } from "@rzl-zone/ts-types-plus";
12
+ type CapitalizeFirstOptions = {
13
+ /** If true **(default)**, the rest of the string will be converted to lowercase after capitalizing the first letter.
14
+ *
15
+ * @default true
16
+ */
17
+ lowerCaseNextRest?: boolean;
18
+ /** If true, the string will trimmed, default: `false`.
19
+ *
20
+ * @default false
21
+ */
22
+ trim?: boolean;
23
+ };
24
+ /** ----------------------------------------------------------
25
+ * * ***Utility: `capitalizeFirst`.***
26
+ * ----------------------------------------------------------
27
+ * **Capitalizes the first letter of a string, with optionally lowercases the rest and trims whitespace.**
28
+ * @param {string | null | undefined} string - The string to be processed.
29
+ * @param {CapitalizeFirstOptions} [options] - Options to control behavior.
30
+ * @param {CapitalizeFirstOptions["lowerCaseNextRest"]} [options.lowerCaseNextRest=true] - If true, lowercases the rest (next first letter), default: `true`.
31
+ * @param {CapitalizeFirstOptions["trim"]} [options.trim=false] - If true, trims the string before processing, default: `false`.
32
+ * @returns {string} The processed string, returns `""` if input is `null`, `undefined`, or `not a valid string`.
33
+ * @example
34
+ * ```ts
35
+ * capitalizeFirst(" hello WORLD ");
36
+ * // ➔ " Hello world"
37
+ * capitalizeFirst(" hello WORLD ", { trim: true });
38
+ * // ➔ "Hello world"
39
+ * capitalizeFirst("FOO", { lowerCaseNextRest: false });
40
+ * // ➔ "FOO"
41
+ * capitalizeFirst(" foo BAR ", { trim: true, lowerCaseNextRest: false });
42
+ * // ➔ "Foo BAR"
43
+ * ```
44
+ * #### ℹ️ If null, undefined, or not a valid string input, return `""`.
45
+ * ```ts
46
+ * capitalizeFirst(123);
47
+ * capitalizeFirst(null);
48
+ * capitalizeFirst(undefined);
49
+ * // ➔ ""
50
+ * ```
51
+ */
52
+ declare const capitalizeFirst: (string: string | null | undefined, options?: CapitalizeFirstOptions) => string;
53
+ type CapitalizeWordsOptions = {
54
+ /** If `true`, removes leading and trailing spaces, default `false`.
55
+ *
56
+ * @default false
57
+ */
58
+ trim?: boolean;
59
+ /** If `true`, collapses multiple spaces **between words** into a single space (while preserving leading/trailing spaces), default `false`.
60
+ *
61
+ * @default false
62
+ */
63
+ collapseSpaces?: boolean;
64
+ };
65
+ /** ----------------------------------------------------------
66
+ * * ***Utility: `capitalizeWords`.***
67
+ * ----------------------------------------------------------
68
+ * **Capitalizes the first letter of each word in a string while converting the rest to lowercase.**
69
+ * @param {string | null | undefined} value
70
+ * ***The input string to be processed.***
71
+ * - If `null` or `undefined`, returns an empty-string (`""`).
72
+ * @param {CapitalizeWordsOptions} [options]
73
+ * ***Optional settings to control the output:***
74
+ * - `trim`: If `true`, removes leading and trailing spaces, defaultValue: `false`.
75
+ * - `collapseSpaces`: If `true`, collapses multiple spaces **between words** into a single space (while preserving leading/trailing spaces), defaultValue: `false`.
76
+ * @returns {string} A new string where each word starts with an uppercase letter
77
+ * and the remaining letters are lowercase.
78
+ * - If `value` is `empty`, `null`, or `undefined`, returns an `empty-string`.
79
+ * @example
80
+ * ```ts
81
+ * capitalizeWords(" hello world ");
82
+ * // ➔ " Hello World "
83
+ * capitalizeWords(" hello world ", { trim: true });
84
+ * // ➔ "Hello World"
85
+ * capitalizeWords(" hello world ", { collapseSpaces: true });
86
+ * // ➔ " Hello World "
87
+ * capitalizeWords(" hello world ", { trim: true, collapseSpaces: true });
88
+ * // ➔ "Hello World"
89
+ * ```
90
+ * #### ℹ️ If null, undefined, or not a valid string input, return "".
91
+ * ```ts
92
+ * capitalizeWords(123);
93
+ * capitalizeWords(null);
94
+ * capitalizeWords(undefined);
95
+ * // ➔ ""
96
+ * ```
97
+ */
98
+ declare const capitalizeWords: (value: string | null | undefined, options?: CapitalizeWordsOptions) => string;
99
+ /** --------------------------------------------------
100
+ * * ***Represents a string input.***
101
+ * --------------------------------------------------
102
+ * - **Can be one of:**
103
+ * - A single `string`
104
+ * - An array of strings (`string[]`)
105
+ * - A readonly array of strings (`readonly string[]`)
106
+ * - `null` or `undefined`
107
+ * @template T - A string or array of strings.
108
+ *
109
+ *
110
+ * @note ***Types input for {@link toCamelCase}, {@link toPascalCaseSpace}, {@link toPascalCase}, {@link toLowerCase}, {@link toKebabCase}, {@link toSnakeCase}, {@link toDotCase} and {@link slugify}.***
111
+ */
112
+ type StringLike = Nilable<string | string[] | ReadonlyArray<string>>;
113
+ /** --------------------------------------------------
114
+ * * ***Represents a collection of strings.***
115
+ * --------------------------------------------------
116
+ * - **Can be one of:**
117
+ * - A single `string`
118
+ * - An array of strings (`string[]`)
119
+ * - A readonly array of strings (`readonly string[]`)
120
+ * - A `Set<string>`
121
+ * - A `ReadonlySet<string>`
122
+ *
123
+ *
124
+ * @note ***Types options for {@link toCamelCase}, {@link toPascalCaseSpace}, {@link toPascalCase}, {@link toLowerCase}, {@link toKebabCase}, {@link toSnakeCase}, {@link toDotCase} and {@link slugify}.***
125
+ */
126
+ type StringCollection = string | string[] | ReadonlyArray<string> | Set<string> | ReadonlySet<string>;
127
+ /** ----------------------------------------------------------
128
+ * * ***Utility: `slugify`.***
129
+ * ----------------------------------------------------------
130
+ * **Slugifies a string (or array of strings) for safe use in URLs, with optionally leaving specific words unchanged.**
131
+ * - **Behavior:**
132
+ * - Accepts a `string` or an `array of strings`:
133
+ * - If an array is provided, elements are trimmed, empty ones removed,
134
+ * then joined with `"-"` before conversion.
135
+ * - Splits the input by non-alphanumeric characters
136
+ * (spaces, punctuation, symbols, hyphens, underscores, emojis, etc.).
137
+ * - The first word is fully lowercase; subsequent words are capitalized.
138
+ * - Words listed in `ignoreWord` remain unchanged in the output.
139
+ * - `ignoreWord` is normalized (trimmed, delimiters removed), empty values ignored.
140
+ * - `ignoreWord` accepts:
141
+ * - a single string,
142
+ * - an array of strings, or
143
+ * - a `Set` of strings.
144
+ * - Multiple delimiters collapse into one; empty segments ignored.
145
+ * - Returns `""` if the input is `null`, `undefined`, or empty.
146
+ * @param {StringLike} input - The string or array to convert. Returns `""` if empty, `null`, or `undefined`.
147
+ * @param {StringCollection} [ignoreWord] - Optional word(s) to leave unchanged in the output.
148
+ * @returns {string} The slugified string.
149
+ * @example
150
+ * // Basic usage
151
+ * slugify("Hello World!");
152
+ * // ➔ "hello-world"
153
+ *
154
+ * // Array input is joined before conversion
155
+ * slugify(["Join", "Words", "Here"]);
156
+ * // ➔ "join-words-here"
157
+ *
158
+ * // Trims and cleans input
159
+ * slugify(" --- Convert to Slug? --- ");
160
+ * // ➔ "convert-to-slug"
161
+ *
162
+ * // Ignore single word
163
+ * slugify("This URL path", "URL");
164
+ * // ➔ "this-URL-path"
165
+ *
166
+ * // Ignore multiple words
167
+ * slugify("ignore API and URL", ["API", "URL"]);
168
+ * // ➔ "ignore-API-and-URL"
169
+ *
170
+ * // Ignore using Set
171
+ * slugify("ignore API and URL", new Set(["API", "URL"]));
172
+ * // ➔ "ignore-API-and-URL"
173
+ *
174
+ * // Supports emojis and symbols
175
+ * slugify("🔥 Fire_and_ice ❄️");
176
+ * // ➔ "fire-and-ice"
177
+ *
178
+ * // Null, Undefined or empty (string or array) input returns empty string
179
+ * slugify(undefined);
180
+ * // ➔ ""
181
+ */
182
+ declare const slugify: (input: StringLike, ignoreWord?: StringCollection) => string;
183
+ /** ----------------------------------------------------------
184
+ * * ***Utility: `toCamelCase`.***
185
+ * ----------------------------------------------------------
186
+ * **Converts a string (or array of strings) into `camelCase`, with optionally leaving specific words unchanged.**
187
+ * - **Behavior:**
188
+ * - Accepts a `string` or an `array of strings`:
189
+ * - If an array is provided, elements are trimmed, empty ones removed,
190
+ * then joined with `"-"` before conversion.
191
+ * - Splits the input by non-alphanumeric characters
192
+ * (spaces, punctuation, symbols, hyphens, underscores, emojis, etc.).
193
+ * - The first word is fully lowercase; subsequent words are capitalized.
194
+ * - Words listed in `ignoreWord` remain unchanged in the output.
195
+ * - `ignoreWord` is normalized (trimmed, delimiters removed), empty values ignored.
196
+ * - `ignoreWord` accepts:
197
+ * - a single string,
198
+ * - an array of strings, or
199
+ * - a `Set` of strings.
200
+ * - Multiple delimiters collapse into one; empty segments ignored.
201
+ * - Returns `""` if the input is `null`, `undefined`, or empty.
202
+ * @param {StringLike} input - The string or array to convert. Returns `""` if empty, `null`, or `undefined`.
203
+ * @param {StringCollection} [ignoreWord] - Optional word(s) to leave unchanged in the output.
204
+ * @returns {string} The camelCase formatted string.
205
+ * @example
206
+ * // Basic usage
207
+ * toCamelCase("hello world");
208
+ * // ➔ "helloWorld"
209
+ *
210
+ * // Array input is joined before conversion
211
+ * toCamelCase(["Join", "Words", "Here"]);
212
+ * // ➔ "joinWordsHere"
213
+ *
214
+ * // Supports mixed delimiters
215
+ * toCamelCase("convert_to-camel case");
216
+ * // ➔ "convertToCamelCase"
217
+ *
218
+ * // Words in ignoreWord stay unchanged
219
+ * toCamelCase("this URL path will ignore", "URL");
220
+ * // ➔ "thisURLPathWillIgnore"
221
+ *
222
+ * // Multiple ignored words
223
+ * toCamelCase("ignore API and URL", ["API", "URL"]);
224
+ * // ➔ "ignoreAPIAndURL"
225
+ *
226
+ * // Set can also be used
227
+ * toCamelCase("ignore API and URL", new Set(["API", "URL"]));
228
+ * // ➔ "ignoreAPIAndURL"
229
+ *
230
+ * // Null, Undefined or empty (string or array) input returns empty string
231
+ * toCamelCase(null);
232
+ * // ➔ ""
233
+ */
234
+ declare const toCamelCase: (input: StringLike, ignoreWord?: StringCollection) => string;
235
+ /** ----------------------------------------------------------
236
+ * * ***Utility: `toDotCase`.***
237
+ * ----------------------------------------------------------
238
+ * **Converts a string (or array of strings) into `dot.case`, with optionally leaving specific words unchanged.**
239
+ * - **Behavior:**
240
+ * - Accepts a `string` or an `array of strings`:
241
+ * - If an array is provided, elements are trimmed, empty ones removed,
242
+ * then joined with `"-"` before conversion.
243
+ * - Splits the input by non-alphanumeric characters
244
+ * (spaces, punctuation, symbols, hyphens, underscores, emojis, etc.).
245
+ * - The first word is fully lowercase; subsequent words are capitalized.
246
+ * - Words listed in `ignoreWord` remain unchanged in the output.
247
+ * - `ignoreWord` is normalized (trimmed, delimiters removed), empty values ignored.
248
+ * - `ignoreWord` accepts:
249
+ * - a single string,
250
+ * - an array of strings, or
251
+ * - a `Set` of strings.
252
+ * - Multiple delimiters collapse into one; empty segments ignored.
253
+ * - Returns `""` if the input is `null`, `undefined`, or empty.
254
+ * @param {StringLike} input - The string or array to convert. Returns `""` if empty, `null`, or `undefined`.
255
+ * @param {StringCollection} [ignoreWord] - Optional word(s) to leave unchanged in the output.
256
+ * @returns {string} The dot.case formatted string.
257
+ * @example
258
+ * // Basic usage
259
+ * toDotCase("Hello World");
260
+ * // ➔ "hello.world"
261
+ *
262
+ * // Array input is joined before conversion
263
+ * toDotCase(["Join", "Words", "Here"]);
264
+ * // ➔ "join.words.here"
265
+ *
266
+ * // Handles underscores and hyphens
267
+ * toDotCase("convert-to_dot case");
268
+ * // ➔ "convert.to.dot.case"
269
+ *
270
+ * // Multiple delimiters and trimming
271
+ * toDotCase("___Hello--World__ again!!");
272
+ * // ➔ "hello.world.again"
273
+ *
274
+ * // Supports emojis and symbols
275
+ * toDotCase("🔥Fire_and-ice❄️");
276
+ * // ➔ "fire.and.ice"
277
+ *
278
+ * // Ignore single word
279
+ * toDotCase("this URL path", "URL");
280
+ * // ➔ "this.URL.path"
281
+ *
282
+ * // Ignore multiple words
283
+ * toDotCase("ignore API and URL", ["API", "URL"]);
284
+ * // ➔ "ignore.API.and.URL"
285
+ *
286
+ * // Ignore using Set
287
+ * toDotCase("ignore API and URL", new Set(["API", "URL"]));
288
+ * // ➔ "ignore.API.and.URL"
289
+ *
290
+ * // Null, Undefined or empty (string or array) input returns empty string
291
+ * toDotCase(undefined);
292
+ * // ➔ ""
293
+ */
294
+ declare const toDotCase: (input: StringLike, ignoreWord?: StringCollection) => string;
295
+ /** ----------------------------------------------------------
296
+ * * ***Utility: `toKebabCase`.***
297
+ * ----------------------------------------------------------
298
+ * **Converts a string (or array of strings) into `kebab-case`, with optionally leaving specific words unchanged.**
299
+ * - **Behavior:**
300
+ * - Accepts a `string` or an `array of strings`:
301
+ * - If an array is provided, elements are trimmed, empty ones removed,
302
+ * then joined with `"-"` before conversion.
303
+ * - Splits the input by non-alphanumeric characters
304
+ * (spaces, punctuation, symbols, hyphens, underscores, emojis, etc.).
305
+ * - The first word is fully lowercase; subsequent words are capitalized.
306
+ * - Words listed in `ignoreWord` remain unchanged in the output.
307
+ * - `ignoreWord` is normalized (trimmed, delimiters removed), empty values ignored.
308
+ * - `ignoreWord` accepts:
309
+ * - a single string,
310
+ * - an array of strings, or
311
+ * - a `Set` of strings.
312
+ * - Multiple delimiters collapse into one; empty segments ignored.
313
+ * - Returns `""` if the input is `null`, `undefined`, or empty.
314
+ * @param {StringLike} input - The string or array to convert. Returns `""` if empty, `null`, or `undefined`.
315
+ * @param {StringCollection} [ignoreWord] - Optional word(s) to leave unchanged in the output.
316
+ * @returns {string} The kebab-case formatted string.
317
+ * @example
318
+ * // Basic usage
319
+ * toKebabCase("Hello World");
320
+ * // ➔ "hello-world"
321
+ *
322
+ * // Array input is joined before conversion
323
+ * toKebabCase(["Join", "Words", "Here"]);
324
+ * // ➔ "join-words-here"
325
+ *
326
+ * // Handles underscores and hyphens
327
+ * toKebabCase("convert_to-kebab case");
328
+ * // ➔ "convert-to-kebab-case"
329
+ *
330
+ * // Handles emojis and symbols
331
+ * toKebabCase("🔥fire___and--ice❄️");
332
+ * // ➔ "fire-and-ice"
333
+ *
334
+ * // Ignore specific word
335
+ * toKebabCase("ignore URL case", "URL");
336
+ * // ➔ "ignore-URL-case"
337
+ *
338
+ * // Ignore multiple words
339
+ * toKebabCase("ignore API and URL", ["API", "URL"]);
340
+ * // ➔ "ignore-API-and-URL"
341
+ *
342
+ * // Ignore with Set
343
+ * toKebabCase("ignore API and URL", new Set(["API", "URL"]));
344
+ * // ➔ "ignore-API-and-URL"
345
+ *
346
+ * // Null, Undefined or empty (string or array) input returns empty string
347
+ * toKebabCase(null);
348
+ * // ➔ ""
349
+ */
350
+ declare const toKebabCase: (input: StringLike, ignoreWord?: StringCollection) => string;
351
+ /** ----------------------------------------------------------
352
+ * * ***Utility: `toLowerCase`.***
353
+ * ----------------------------------------------------------
354
+ * **Converts a string (or array of strings) into `lower case`, with optionally leaving specific words unchanged.**
355
+ * - **Behavior:**
356
+ * - Accepts a `string` or an `array of strings`:
357
+ * - If an array is provided, elements are trimmed, empty ones removed,
358
+ * then joined with `"-"` before conversion.
359
+ * - Splits the input by non-alphanumeric characters
360
+ * (spaces, punctuation, symbols, hyphens, underscores, emojis, etc.).
361
+ * - The first word is fully lowercase; subsequent words are capitalized.
362
+ * - Words listed in `ignoreWord` remain unchanged in the output.
363
+ * - `ignoreWord` is normalized (trimmed, delimiters removed), empty values ignored.
364
+ * - `ignoreWord` accepts:
365
+ * - a single string,
366
+ * - an array of strings, or
367
+ * - a `Set` of strings.
368
+ * - Multiple delimiters collapse into one; empty segments ignored.
369
+ * - Returns `""` if the input is `null`, `undefined`, or empty.
370
+ * @param {StringLike} input - The string or array to convert. Returns `""` if empty, `null`, or `undefined`.
371
+ * @param {StringCollection} [ignoreWord] - Optional word(s) to leave unchanged in the output.
372
+ * @returns {string} The LowerCase formatted string.
373
+ * @example
374
+ * // Basic usage
375
+ * toLowerCase("Hello World");
376
+ * // ➔ "hello world"
377
+ *
378
+ * // Array input is joined before conversion
379
+ * toLowerCase(["Join", "WORLD", "Here"]);
380
+ * // ➔ "join words here"
381
+ *
382
+ * // Handles underscores and hyphens
383
+ * toLowerCase("convert_to-pascal case");
384
+ * // ➔ "convert to lower case"
385
+ *
386
+ * // Trims extra delimiters
387
+ * toLowerCase("___hello--world__ again!!");
388
+ * // ➔ "hello world again"
389
+ *
390
+ * // Supports emojis and symbols
391
+ * toLowerCase("🔥fire_and-ice❄️");
392
+ * // ➔ "fire and ice"
393
+ *
394
+ * // Ignore single word
395
+ * toLowerCase("this URL path will ignore", "URL");
396
+ * // ➔ "this URL path will ignore"
397
+ *
398
+ * // Ignore multiple words
399
+ * toLowerCase("ignore API and URL", ["API", "URL"]);
400
+ * // ➔ "ignore API and URL"
401
+ *
402
+ * // Ignore using Set
403
+ * toLowerCase("ignore API and URL", new Set(["API", "URL"]));
404
+ * // ➔ "ignore API and URL"
405
+ *
406
+ * // Null, Undefined or empty (string or array) input returns empty string
407
+ * toLowerCase(undefined);
408
+ * // ➔ ""
409
+ */
410
+ declare const toLowerCase: (input: StringLike, ignoreWord?: StringCollection) => string;
411
+ /** ----------------------------------------------------------
412
+ * * ***Utility: `toPascalCase`.***
413
+ * ----------------------------------------------------------
414
+ * **Converts a string (or array of strings) into `PascalCase`, with optionally leaving specific words unchanged.**
415
+ * - **Behavior:**
416
+ * - Accepts a `string` or an `array of strings`:
417
+ * - If an array is provided, elements are trimmed, empty ones removed,
418
+ * then joined with `"-"` before conversion.
419
+ * - Splits the input by non-alphanumeric characters
420
+ * (spaces, punctuation, symbols, hyphens, underscores, emojis, etc.).
421
+ * - The first word is fully lowercase; subsequent words are capitalized.
422
+ * - Words listed in `ignoreWord` remain unchanged in the output.
423
+ * - `ignoreWord` is normalized (trimmed, delimiters removed), empty values ignored.
424
+ * - `ignoreWord` accepts:
425
+ * - a single string,
426
+ * - an array of strings, or
427
+ * - a `Set` of strings.
428
+ * - Multiple delimiters collapse into one; empty segments ignored.
429
+ * - Returns `""` if the input is `null`, `undefined`, or empty.
430
+ * @param {StringLike} input - The string or array to convert. Returns `""` if empty, `null`, or `undefined`.
431
+ * @param {StringCollection} [ignoreWord] - Optional word(s) to leave unchanged in the output.
432
+ * @returns {string} The PascalCase formatted string.
433
+ * @example
434
+ * // Basic usage
435
+ * toPascalCase("hello world");
436
+ * // ➔ "HelloWorld"
437
+ *
438
+ * // Array input is joined before conversion
439
+ * toPascalCase(["Join", "Words", "Here"]);
440
+ * // ➔ "JoinWordsHere"
441
+ *
442
+ * // Handles underscores and hyphens
443
+ * toPascalCase("convert_to-pascal case");
444
+ * // ➔ "ConvertToPascalCase"
445
+ *
446
+ * // Trims extra delimiters
447
+ * toPascalCase("___hello--world__ again!!");
448
+ * // ➔ "HelloWorldAgain"
449
+ *
450
+ * // Supports emojis and symbols
451
+ * toPascalCase("🔥fire_and-ice❄️");
452
+ * // ➔ "FireAndIce"
453
+ *
454
+ * // Ignore single word
455
+ * toPascalCase("this URL path will ignore", "URL");
456
+ * // ➔ "ThisURLPathWillIgnore"
457
+ *
458
+ * // Ignore multiple words
459
+ * toPascalCase("ignore API and URL", ["API", "URL"]);
460
+ * // ➔ "IgnoreAPIAndURL"
461
+ *
462
+ * // Ignore using Set
463
+ * toPascalCase("ignore API and URL", new Set(["API", "URL"]));
464
+ * // ➔ "IgnoreAPIAndURL"
465
+ *
466
+ * // Null, Undefined or empty (string or array) input returns empty string
467
+ * toPascalCase(undefined);
468
+ * // ➔ ""
469
+ */
470
+ declare const toPascalCase: (input: StringLike, ignoreWord?: StringCollection) => string;
471
+ /** ----------------------------------------------------------
472
+ * * ***Utility: `toPascalCaseSpace`.***
473
+ * ----------------------------------------------------------
474
+ * **Converts a string (or array of strings) into `PascalCaseSpace`, with optionally leaving specific words unchanged.**
475
+ * - **Behavior:**
476
+ * - Accepts a `string` or an `array of strings`:
477
+ * - If an array is provided, elements are trimmed, empty ones removed,
478
+ * then joined with `"-"` before conversion.
479
+ * - Splits the input by non-alphanumeric characters
480
+ * (spaces, punctuation, symbols, hyphens, underscores, emojis, etc.).
481
+ * - The first word is fully lowercase; subsequent words are capitalized.
482
+ * - Words listed in `ignoreWord` remain unchanged in the output.
483
+ * - `ignoreWord` is normalized (trimmed, delimiters removed), empty values ignored.
484
+ * - `ignoreWord` accepts:
485
+ * - a single string,
486
+ * - an array of strings, or
487
+ * - a `Set` of strings.
488
+ * - Multiple delimiters collapse into one; empty segments ignored.
489
+ * - Returns `""` if the input is `null`, `undefined`, or empty.
490
+ * @param {StringLike} input - The string or array to convert. Returns `""` if empty, `null`, or `undefined`.
491
+ * @param {StringCollection} [ignoreWord] - Optional word(s) to leave unchanged in the output.
492
+ * @returns {string} The PascalCaseSpace formatted string.
493
+ * @example
494
+ * // Basic usage
495
+ * toPascalCaseSpace("hello world");
496
+ * // ➔ "Hello World"
497
+ *
498
+ * // Array input is joined before conversion
499
+ * toPascalCaseSpace(["Join", "Words", "Here"]);
500
+ * // ➔ "Join Words Here"
501
+ *
502
+ * // Handles underscores and hyphens
503
+ * toPascalCaseSpace("convert_to-pascal case");
504
+ * // ➔ "Convert To Pascal Case Space"
505
+ *
506
+ * // Trims extra delimiters
507
+ * toPascalCaseSpace("___hello--world__ again!!");
508
+ * // ➔ "Hello World Again"
509
+ *
510
+ * // Supports emojis and symbols
511
+ * toPascalCaseSpace("🔥fire_and-ice❄️");
512
+ * // ➔ "Fire And Ice"
513
+ *
514
+ * // Ignore single word
515
+ * toPascalCaseSpace("this URL path will ignore", "URL");
516
+ * // ➔ "This URL Path Will Ignore"
517
+ *
518
+ * // Ignore multiple words
519
+ * toPascalCaseSpace("ignore API and URL", ["API", "URL"]);
520
+ * // ➔ "Ignore API And URL"
521
+ *
522
+ * // Ignore using Set
523
+ * toPascalCaseSpace("ignore API and URL", new Set(["API", "URL"]));
524
+ * // ➔ "Ignore API And URL"
525
+ *
526
+ * // Null, Undefined or empty (string or array) input returns empty string
527
+ * toPascalCaseSpace(undefined);
528
+ * // ➔ ""
529
+ */
530
+ declare const toPascalCaseSpace: (input: StringLike, ignoreWord?: StringCollection) => string;
531
+ /** ----------------------------------------------------------
532
+ * * ***Utility: `toSnakeCase`.***
533
+ * ----------------------------------------------------------
534
+ * **Converts a string (or array of strings) into `snake_case`, with optionally leaving specific words unchanged.**
535
+ * - **Behavior:**
536
+ * - Accepts a `string` or an `array of strings`:
537
+ * - If an array is provided, elements are trimmed, empty ones removed,
538
+ * then joined with `"-"` before conversion.
539
+ * - Splits the input by non-alphanumeric characters
540
+ * (spaces, punctuation, symbols, hyphens, underscores, emojis, etc.).
541
+ * - The first word is fully lowercase; subsequent words are capitalized.
542
+ * - Words listed in `ignoreWord` remain unchanged in the output.
543
+ * - `ignoreWord` is normalized (trimmed, delimiters removed), empty values ignored.
544
+ * - `ignoreWord` accepts:
545
+ * - a single string,
546
+ * - an array of strings, or
547
+ * - a `Set` of strings.
548
+ * - Multiple delimiters collapse into one; empty segments ignored.
549
+ * - Returns `""` if the input is `null`, `undefined`, or empty.
550
+ * @param {StringLike} input - The string or array to convert. Returns `""` if empty, `null`, or `undefined`.
551
+ * @param {StringCollection} [ignoreWord] - Optional word(s) to leave unchanged in the output.
552
+ * @returns {string} The snake_case formatted string.
553
+ * @example
554
+ * // Basic usage
555
+ * toSnakeCase("Hello World");
556
+ * // ➔ "hello_world"
557
+ *
558
+ * // Array input is joined before conversion
559
+ * toSnakeCase(["Join", "Words", "Here"]);
560
+ * // ➔ "join_words_here"
561
+ *
562
+ * // Handles underscores, hyphens, spaces
563
+ * toSnakeCase("convert-to_snake case");
564
+ * // ➔ "convert_to_snake_case"
565
+ *
566
+ * // Handles emojis and symbols
567
+ * toSnakeCase("🔥fire___and--ice❄️");
568
+ * // ➔ "fire_and_ice"
569
+ *
570
+ * // Ignore specific word
571
+ * toSnakeCase("ignore URL case", "URL");
572
+ * // ➔ "ignore_URL_case"
573
+ *
574
+ * // Ignore multiple words
575
+ * toSnakeCase("ignore API and URL", ["API", "URL"]);
576
+ * // ➔ "ignore_API_and_URL"
577
+ *
578
+ * // Ignore with Set
579
+ * toSnakeCase("ignore API and URL", new Set(["API", "URL"]));
580
+ * // ➔ "ignore_API_and_URL"
581
+ *
582
+ * // Null, Undefined or empty (string or array) input returns empty string
583
+ * toSnakeCase(null);
584
+ * // ➔ ""
585
+ */
586
+ declare const toSnakeCase: (input: StringLike, ignoreWord?: StringCollection) => string;
587
+ type NormalizeSpacesOptions = {
588
+ /** If `true`, skips normalization and only trims whitespace from start & end, defaultValue: `false`.
589
+ *
590
+ * @default false
591
+ */
592
+ trimOnly?: boolean;
593
+ /** If `false`, skips trimming value, defaultValue: `true`.
594
+ *
595
+ * @default true
596
+ */
597
+ withTrim?: boolean;
598
+ };
599
+ /** ----------------------------------------------------------
600
+ * * ***Utility: `normalizeSpaces`.***
601
+ * ----------------------------------------------------------
602
+ * **Normalizes whitespace in a string by reducing multiple spaces
603
+ * to a single space, optionally trims, or only trims based on options.**
604
+ * - **Behavior:**
605
+ * - Collapses all consecutive whitespace (spaces, tabs, newlines) into a single space.
606
+ * - Can trim leading/trailing spaces (default behavior), or preserve them with `withTrim: false`.
607
+ * - Can skip normalization entirely and only trim using `trimOnly: true`.
608
+ * - Returns an empty string if input is `null` or `undefined`.
609
+ * @param {string | null | undefined} value - The input string to be processed. If `null` or `undefined`, returns an empty string.
610
+ * @param {NormalizeSpacesOptions} [options] - Configuration options.
611
+ * @param {NormalizeSpacesOptions["trimOnly"]} [options.trimOnly=false] - If `true`, skips normalization and only trims the string.
612
+ * @param {NormalizeSpacesOptions["withTrim"]} [options.withTrim=true] - If `false`, preserves leading/trailing whitespace.
613
+ * @returns {string} The processed string.
614
+ * @example
615
+ * normalizeSpaces(" Hello World\tthis is\n\nok ");
616
+ * // ➔ "Hello World this is ok"
617
+ * normalizeSpaces(" Hello World\tthis is\n\nok ", { trimOnly: true });
618
+ * // ➔ "Hello World this is\n\nok"
619
+ * normalizeSpaces(" Hello World ", { withTrim: false });
620
+ * // ➔ " Hello World "
621
+ * normalizeSpaces(null);
622
+ * // ➔ ""
623
+ */
624
+ declare const normalizeSpaces: (value: string | null | undefined, options?: NormalizeSpacesOptions) => string;
625
+ /** ----------------------------------------------------------
626
+ * * ***Utility: `normalizeString`.***
627
+ * ----------------------------------------------------------
628
+ * **Normalizes a string by ensuring it is a valid string and trimming whitespace.**
629
+ * - **Behavior:**
630
+ * - If the input is `undefined`, `null`, or an `empty string` after trimming,
631
+ * it returns an empty string `("")`.
632
+ * @param {string | undefined | null} input - The input string to be normalize. If `null` or `undefined`, returns an empty string.
633
+ * @returns {string} A trimmed string or an empty string if the input is invalid.
634
+ * @example
635
+ * normalizeString(" Hello World ");
636
+ * // ➔ "Hello World"
637
+ * normalizeString(" Hello World ");
638
+ * // ➔ "Hello World"
639
+ * normalizeString("");
640
+ * // ➔ ""
641
+ * normalizeString(null);
642
+ * // ➔ ""
643
+ * normalizeString(undefined);
644
+ * // ➔ ""
645
+ */
646
+ declare const normalizeString: (input: string | null | undefined) => string;
647
+ type RemoveSpacesOptions = {
648
+ /** If `true`, only trims the string, defaultValue: `false`.
649
+ *
650
+ * @default false
651
+ */
652
+ trimOnly?: boolean;
653
+ };
654
+ /** ----------------------------------------------------------
655
+ * * ***Utility: `removeSpaces`.***
656
+ * ----------------------------------------------------------
657
+ * **Removes all spaces from a string or trims only, based on the options provided.**
658
+ * - **Behavior:**
659
+ * - If `trimOnly` is `true`, the string is simply trimmed.
660
+ * - Otherwise, removes **all spaces**, tabs, newlines, etc.
661
+ * - If the input is `null` or `undefined`, returns an empty string `("")`.
662
+ * @param {string | null | undefined} value - The input string to be processed. If `null` or `undefined`, returns an empty string.
663
+ * @param {RemoveSpacesOptions} [options] - The options object.
664
+ * @param {RemoveSpacesOptions["trimOnly"]} [options.trimOnly=false] - If `true`, only trims the string without removing spaces inside.
665
+ * @returns {string} The processed string.
666
+ * @example
667
+ * removeSpaces(" Hello World ");
668
+ * // ➔ "HelloWorld"
669
+ * removeSpaces(" Hello World ", { trimOnly: true });
670
+ * // ➔ "Hello World"
671
+ * removeSpaces(null);
672
+ * // ➔ ""
673
+ */
674
+ declare const removeSpaces: (value: string | null | undefined, options?: RemoveSpacesOptions) => string;
675
+ /** ----------------------------------------------------------
676
+ * * ***Utility: `stripHtmlTags`.***
677
+ * ----------------------------------------------------------
678
+ * **This function removes valid HTML tags (including nested and self-closing ones)
679
+ * by replacing them with spaces, then collapses multiple whitespaces into a single space.**
680
+ * - **It handles the following cases:**
681
+ * - If the input is not a string (`null`, `undefined`, or any non-string), it is returned as undefined.
682
+ * - If the input is an empty or whitespace-only string, it returns an empty string (`""`).
683
+ * - Otherwise, it returns the cleaned string with tags removed and normalized whitespace.
684
+ * @template T - Input string type (string | null | undefined).
685
+ * @param {string | null | undefined} input - A string potentially containing HTML tags.
686
+ * @returns {string | undefined} Cleaned string if input is string, or original input otherwise.
687
+ * @example
688
+ * stripHtmlTags("<p>Hello</p>");
689
+ * // ➔ "Hello"
690
+ * stripHtmlTags("<div><b>Bold</b> text</div>");
691
+ * // ➔ "Bold text"
692
+ * stripHtmlTags("Line<br/>Break");
693
+ * // ➔ "Line Break"
694
+ * stripHtmlTags("2 < 5 and 5 > 2");
695
+ * // ➔ "2 < 5 and 5 > 2"
696
+ * stripHtmlTags("");
697
+ * // ➔ ""
698
+ * stripHtmlTags(" ");
699
+ * // ➔ ""
700
+ * stripHtmlTags(null);
701
+ * // ➔ undefined
702
+ * stripHtmlTags(undefined);
703
+ * // ➔ undefined
704
+ */
705
+ declare function stripHtmlTags(input: string): string;
706
+ declare function stripHtmlTags<T>(input: T): Extends<string, T> extends true ? string | undefined : undefined;
707
+ /** ----------------------------------------------------------
708
+ * * ***Utility: `getInitialsName`.***
709
+ * ----------------------------------------------------------
710
+ * **Extracts initials from the given name string.**
711
+ * - **Behavior:**
712
+ * - For names with two or more words, returns the first letter of the first and second words.
713
+ * - For a single word with 2+ characters, returns the first two letters.
714
+ * - For a single character, returns that character.
715
+ * - For `empty`, `null`, `undefined` or `whitespace-only input`, returns an empty string (`""`).
716
+ * @param {string | null | undefined} name - The name to extract initials from.
717
+ * @returns {string} The extracted initials (e.g., "JD" for "John Doe").
718
+ * @example
719
+ * getInitialsName("Alice"); // ➔ "AL"
720
+ * getInitialsName("John Doe"); // ➔ "JD"
721
+ * getInitialsName(" Bob Marley "); // ➔ "BM"
722
+ * getInitialsName("John Ronald Donal"); // ➔ "JR"
723
+ * getInitialsName("Lord John Doe Moe"); // ➔ "LJ"
724
+ * getInitialsName("X"); // ➔ "X"
725
+ * getInitialsName(""); // ➔ "" (empty string)
726
+ * getInitialsName(" "); // ➔ "" (empty string)
727
+ * getInitialsName(null); // ➔ "" (null input)
728
+ * getInitialsName(undefined); // ➔ "" (undefined input)
729
+ */
730
+ declare const getInitialsName: (name: string | null | undefined) => string;
731
+ /** ----------------------------------------------------------
732
+ * * ***Utility: `replaceAt`.***
733
+ * ----------------------------------------------------------
734
+ * **Replaces exactly one character at the specified index in the original string
735
+ * with the provided `replaceTo` string.**
736
+ * - **Behavior:**
737
+ * - If `replaceTo` has more than one character,
738
+ * the result will expand accordingly.
739
+ * @param {number} index - The starting index where the replacement should occur.
740
+ * @param {string} originalString - The original string to modify.
741
+ * @param {string} replaceTo - The string to insert at the specified index.
742
+ * @returns {string} The modified string with the replacement applied.
743
+ * @example
744
+ * replaceAt(3, "hello", "X");
745
+ * // ➔ "helXo"
746
+ * replaceAt(1, "world", "AB");
747
+ * // ➔ "wABrld"
748
+ * replaceAt(0, "cat", "br");
749
+ * // ➔ "brat"
750
+ * replaceAt(2, "12345", "-");
751
+ * // ➔ "12-45"
752
+ * replaceAt(4, "ABCDE", "Z");
753
+ * // ➔ "ABCDZ"
754
+ * // ❌ Examples that throw:
755
+ * replaceAt(10, "short", "X");
756
+ * // ➔ ❌ RangeError: First parameter (`index`) is out of range from second parameter `originalString`.
757
+ * replaceAt(-1, "test", "X");
758
+ * // ➔ ❌ RangeError: First parameter (`index`) is out of range from second parameter `originalString`.
759
+ * replaceAt("1", "test", "X");
760
+ * // ➔ ❌ TypeError: First parameter `index` must be of type `number`, second parameter `originalString` and third parameter `replaceTo` must be of type `string`, but received: "['index': `string`,...]."
761
+ * replaceAt(2, null, "X");
762
+ * // ➔ ❌ TypeError: First parameter `index` must be of type `number`, second parameter `originalString` and third parameter `replaceTo` must be of type `string`, but received: "['index': `string`,...]."
763
+ */
764
+ declare const replaceAt: (index: number, originalString: string, replaceTo: string) => string;
765
+ export { normalizeString as a, toPascalCaseSpace as c, toKebabCase as d, toDotCase as f, capitalizeFirst as g, capitalizeWords as h, removeSpaces as i, toPascalCase as l, slugify as m, getInitialsName as n, normalizeSpaces as o, toCamelCase as p, stripHtmlTags as r, toSnakeCase as s, replaceAt as t, toLowerCase as u };