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

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