@rzl-zone/utils-js 3.11.1 → 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 -212
  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 -210
  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-22V4WP3H.js +0 -53
  213. package/dist/chunk-2XSZ2ANI.js +0 -63
  214. package/dist/chunk-3T6VSWYX.js +0 -21
  215. package/dist/chunk-5WIEDF2J.js +0 -1823
  216. package/dist/chunk-6EDFZJZ5.cjs +0 -598
  217. package/dist/chunk-6LXWT2I5.js +0 -32
  218. package/dist/chunk-6YGBRENU.js +0 -209
  219. package/dist/chunk-7FGNVDEV.cjs +0 -38
  220. package/dist/chunk-AXDYWO67.js +0 -119
  221. package/dist/chunk-B6PMNZ4M.cjs +0 -35
  222. package/dist/chunk-BAV5T2E3.cjs +0 -15
  223. package/dist/chunk-BLF7SD66.js +0 -95
  224. package/dist/chunk-BMZZXZJ2.cjs +0 -30
  225. package/dist/chunk-BOYP3ARU.js +0 -264
  226. package/dist/chunk-BPYW5YL7.js +0 -16
  227. package/dist/chunk-C2PV3VWC.cjs +0 -118
  228. package/dist/chunk-CCJ2MSN7.js +0 -16
  229. package/dist/chunk-DAPAK2W3.cjs +0 -123
  230. package/dist/chunk-DLS3G6WQ.cjs +0 -23
  231. package/dist/chunk-DNMCR5JH.js +0 -370
  232. package/dist/chunk-DVMHRLKP.cjs +0 -16
  233. package/dist/chunk-EBYFYZW4.cjs +0 -26
  234. package/dist/chunk-ENMRZ4BE.js +0 -302
  235. package/dist/chunk-FJ4BQFVO.js +0 -587
  236. package/dist/chunk-GIKL4PUF.cjs +0 -106
  237. package/dist/chunk-GOFINGT6.js +0 -35
  238. package/dist/chunk-GXKQ3LHF.js +0 -101
  239. package/dist/chunk-HNBRGN4R.js +0 -24
  240. package/dist/chunk-HYN6FC5A.cjs +0 -249
  241. package/dist/chunk-IZGVBYFN.js +0 -242
  242. package/dist/chunk-JIE447J5.js +0 -676
  243. package/dist/chunk-JXEIJM5M.cjs +0 -237
  244. package/dist/chunk-K47GZDBH.js +0 -115
  245. package/dist/chunk-K5536YHG.cjs +0 -269
  246. package/dist/chunk-KHO2SBNA.cjs +0 -16
  247. package/dist/chunk-KXJ7X325.cjs +0 -308
  248. package/dist/chunk-L5RDAVVH.js +0 -14
  249. package/dist/chunk-LJHPTLWB.js +0 -109
  250. package/dist/chunk-M7ELWZXM.cjs +0 -1825
  251. package/dist/chunk-MSUW5VHZ.js +0 -1590
  252. package/dist/chunk-MUHRPRR7.cjs +0 -65
  253. package/dist/chunk-MV3TSQSH.cjs +0 -397
  254. package/dist/chunk-NLZLXWAU.cjs +0 -678
  255. package/dist/chunk-NVRZPF5M.cjs +0 -18
  256. package/dist/chunk-ONZFBJVW.js +0 -14
  257. package/dist/chunk-PGNL7JXO.cjs +0 -251
  258. package/dist/chunk-Q4GEQS7X.cjs +0 -564
  259. package/dist/chunk-QNKGP5DY.js +0 -14
  260. package/dist/chunk-QYI2VJLS.cjs +0 -211
  261. package/dist/chunk-RBWZII5I.js +0 -59
  262. package/dist/chunk-RMP7VMPB.cjs +0 -33
  263. package/dist/chunk-RZOGBYIS.js +0 -21
  264. package/dist/chunk-SU3UELUB.cjs +0 -36
  265. package/dist/chunk-SYHPSOUU.cjs +0 -1626
  266. package/dist/chunk-SZUNAEMR.js +0 -246
  267. package/dist/chunk-TER22LO4.cjs +0 -64
  268. package/dist/chunk-TJHGRQ4P.js +0 -33
  269. package/dist/chunk-U23I7JPB.cjs +0 -56
  270. package/dist/chunk-U7HHN47R.js +0 -552
  271. package/dist/chunk-UDA26MCU.cjs +0 -16
  272. package/dist/chunk-UIAWUZ4H.js +0 -31
  273. package/dist/chunk-ULQPCIA2.js +0 -16
  274. package/dist/chunk-VJDDGRIK.cjs +0 -16
  275. package/dist/chunk-WETQI6HM.js +0 -232
  276. package/dist/chunk-WLOQQFDS.cjs +0 -18
  277. package/dist/chunk-WVSPXFTY.js +0 -14
  278. package/dist/chunk-WXFTVXBF.cjs +0 -23
  279. package/dist/chunk-XPVTIGU2.cjs +0 -113
  280. package/dist/chunk-XX6RUGTM.cjs +0 -18
  281. package/dist/chunk-YWHHVDT4.js +0 -13
  282. package/dist/chunk-ZPDMWDGZ.cjs +0 -101
  283. package/dist/chunk-ZVWZEGQP.js +0 -28
  284. package/dist/index.d.ts +0 -24
  285. package/dist/isPlainObject-0p3VveWr.d.ts +0 -534
  286. package/dist/rzl-utils.global.js +0 -10
@@ -0,0 +1,2359 @@
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 { i as ArrayFallback, r as IsHasKeysObject, t as IsPlainObjectResult } from "./isPlainObject-doTI11Ib.cjs";
12
+ import { AnObjectNonArray, AnyFunction, AnyString, CharAt, Extends, IsAny, IsArray, IsEmptyString, IsNever, IsPositive, IsStringLiteral, NumberRangeUnion, OrArr, ParseNumber, Prettify, Trim, TypedArray } from "@rzl-zone/ts-types-plus";
13
+ /** ----------------------------------------------------------
14
+ * * ***Predicate: `areArraysEqual`.***
15
+ * ----------------------------------------------------------
16
+ * **Compares two arrays deeply to check if they are equal.**
17
+ * @description Supports deep comparison of arrays containing nested arrays or objects,
18
+ * can also ignore the order of elements at all levels by recursively sorting.
19
+ * @param {unknown[]} array1
20
+ * ***The first array to compare, can contain nested arrays or objects.***
21
+ * @param {unknown[]} array2
22
+ * ***The second array to compare against, should match structure of `array1`.***
23
+ * @param {boolean|undefined} [ignoreOrder=false]
24
+ * ***Whether to ignore the order of elements when comparing.***
25
+ * - If `true`, will sort both arrays recursively before comparing, default is `false`.
26
+ * @returns {boolean}
27
+ * Returns `true` if both arrays are deeply equal, otherwise `false`.
28
+ * @throws **{@link TypeError | `TypeError`}** if `array1` or `array2` are not arrays, or if `ignoreOrder` is not a boolean.
29
+ * @example
30
+ * ```ts
31
+ * areArraysEqual([1, 2, 3], [1, 2, 3]);
32
+ * // ➔ true
33
+ * areArraysEqual([1, 2, 3], [3, 2, 1]);
34
+ * // ➔ false
35
+ * areArraysEqual([1, 2, 3], [3, 2, 1], true);
36
+ * // ➔ true (order ignored)
37
+ * areArraysEqual([{ x: 1 }, { y: 2 }], [{ y: 2 }, { x: 1 }], true);
38
+ * // ➔ true
39
+ * ```
40
+ */
41
+ declare const areArraysEqual: (array1: unknown[], array2: unknown[], ignoreOrder?: boolean) => boolean;
42
+ /** ---------------------------------
43
+ * * ***Predicate: `areObjectsEqual`.***
44
+ * ---------------------------------
45
+ * **Compares two objects for deep equality.**
46
+ * @template T1 The type of the first object.
47
+ * @template T2 The type of the second object.
48
+ * @param {*} object1 - The first object to compare.
49
+ * @param {*} object2 - The second object to compare.
50
+ * @returns {boolean} Return `true` if both objects are deeply equal, otherwise `false`.
51
+ * @example
52
+ * areObjectsEqual({ a: 1, b: 2 }, { a: 1, b: 2 });
53
+ * // ➔ true
54
+ * areObjectsEqual({ a: 1 }, { a: 1, b: undefined });
55
+ * // ➔ false
56
+ * areObjectsEqual([1, 2, 3], [1, 2, 3]);
57
+ * // ➔ true
58
+ */
59
+ declare const areObjectsEqual: (object1: unknown, object2: unknown) => boolean;
60
+ /** ---------------------------------
61
+ * * ***Predicate: `areURLsEqualPath`.***
62
+ * ---------------------------------
63
+ * **Checks if two URLs are the same, ignoring query parameters, this function compares only the protocol, host, and pathname.**
64
+ * @param {URL} urlA - The first URL to compare.
65
+ * @param {URL} urlB - The second URL to compare.
66
+ * @returns {boolean} Returns `true` if both URLs are the same (ignoring search parameters), otherwise `false`.
67
+ * @example
68
+ * // Same domain, same path, different query -> true
69
+ * areURLsEqualPath(
70
+ * new URL("https://example.com/page?a=1"),
71
+ * new URL("https://example.com/page?b=2")
72
+ * );
73
+ * // ➔ true
74
+ *
75
+ * // Same domain, different path -> false
76
+ * areURLsEqualPath(
77
+ * new URL("https://example.com/page1"),
78
+ * new URL("https://example.com/page2")
79
+ * );
80
+ * // ➔ false
81
+ *
82
+ * // Different protocol -> false
83
+ * areURLsEqualPath(
84
+ * new URL("http://example.com/page"),
85
+ * new URL("https://example.com/page")
86
+ * );
87
+ * // ➔ false
88
+ *
89
+ * // Same protocol, same host, same path (ignores query & hash) -> true
90
+ * areURLsEqualPath(
91
+ * new URL("https://example.com/page#section"),
92
+ * new URL("https://example.com/page")
93
+ * );
94
+ * // ➔ true
95
+ */
96
+ declare const areURLsEqualPath: (urlA: URL, urlB: URL) => boolean;
97
+ /** ---------------------------------
98
+ * * ***Predicate: `areURLsIdentical`.***
99
+ * ---------------------------------
100
+ * **Checks if two URLs are exactly the same, including protocol, host, pathname, and query parameters.**
101
+ * @param {URL} urlA - The first URL to compare.
102
+ * @param {URL} urlB - The second URL to compare.
103
+ * @returns {boolean} Returns `true` if both URLs are identical, otherwise `false`.
104
+ * @example
105
+ * // Identical URLs -> true
106
+ * areURLsIdentical(
107
+ * new URL("https://example.com/page?a=1"),
108
+ * new URL("https://example.com/page?a=1")
109
+ * );
110
+ * // ➔ true
111
+ *
112
+ * // Same path, different query parameter -> false
113
+ * areURLsIdentical(
114
+ * new URL("https://example.com/page?a=1"),
115
+ * new URL("https://example.com/page?b=2")
116
+ * );
117
+ * // ➔ false
118
+ *
119
+ * // Same host & query, but different protocol -> false
120
+ * areURLsIdentical(
121
+ * new URL("http://example.com/page?a=1"),
122
+ * new URL("https://example.com/page?a=1")
123
+ * );
124
+ * // ➔ false
125
+ *
126
+ * // Same everything except trailing slash -> false
127
+ * areURLsIdentical(
128
+ * new URL("https://example.com/page"),
129
+ * new URL("https://example.com/page/")
130
+ * );
131
+ * // ➔ false
132
+ */
133
+ declare const areURLsIdentical: (urlA: URL, urlB: URL) => boolean;
134
+ type OptionsTextContainsAll = {
135
+ /** If `true`, matches whole words only, defaultValue is `false`.
136
+ *
137
+ * @default false
138
+ */
139
+ exactMatch?: boolean;
140
+ /** Optional regex flags (default: `"i"` for case-insensitive).
141
+ *
142
+ * @default "i"
143
+ */
144
+ flags?: string;
145
+ };
146
+ /** ----------------------------------------------------------
147
+ * * ***Predicate: `textContainsAll`.***
148
+ * ----------------------------------------------------------
149
+ * **Checks if the given `text` contains all of the specified `searchWords`.**
150
+ * - **Behavior:**
151
+ * - Returns `false` if `text` or `searchWords` is `null`/`undefined`/invalid.
152
+ * - Uses **regular expressions** for flexible pattern matching.
153
+ * - **Escapes special characters** to prevent regex injection attacks.
154
+ * - **Trims input** to avoid false positives with empty spaces.
155
+ * - **Supports exact word matching** (optional).
156
+ * @param {string|null|undefined} text - The string text to search within.
157
+ * @param {string[]|null} [searchWords] - An array of words/phrases to match against the text.
158
+ * @param {OptionsTextContainsAll} [options] - Optional configuration object.
159
+ * @param {OptionsTextContainsAll["exactMatch"]} [options.exactMatch=false] - If `true`, matches whole words only, defaultValue is `false`.
160
+ * @param {OptionsTextContainsAll["flags"]} [options.flags="i"] - Optional regex flags (default: `"i"` for case-insensitive).
161
+ * @returns {boolean} Return `true` if all `searchWords` are found in `text`, otherwise `false`.
162
+ * @example
163
+ * textContainsAll("Hello world, WithAI APP", ["Hello", "world"]);
164
+ * // ➔ true
165
+ * textContainsAll("JavaScript and TypeScript", ["Java", "Script"]);
166
+ * // ➔ true
167
+ * textContainsAll("Machine Learning", ["AI", "Learning"]);
168
+ * // ➔ false
169
+ * textContainsAll("open-source", ["open"], { exactMatch: true });
170
+ * // ➔ false (because options `exactMatch=true`)
171
+ * textContainsAll(null, ["test"]);
172
+ * // ➔ false (invalid text)
173
+ * textContainsAll("Hello", null);
174
+ * // ➔ false (invalid searchWords)
175
+ */
176
+ declare const textContainsAll: <T extends string>(text?: T | null, searchWords?: T[] | string[] | null, options?: OptionsTextContainsAll) => boolean;
177
+ type OptionsTextContainsAny = {
178
+ /** If `true`, matches whole words only, defaultValue is `false`.
179
+ *
180
+ * @default false
181
+ */
182
+ exactMatch?: boolean;
183
+ /** Optional regex flags (default: `"i"` for case-insensitive).
184
+ *
185
+ * @default "i"
186
+ */
187
+ flags?: string;
188
+ };
189
+ /** ----------------------------------------------------------
190
+ * * ***Predicate: `textContainsAny`.***
191
+ * ----------------------------------------------------------
192
+ * **Checks if the given `text` contains at least one of the specified `searchWords`.**
193
+ * - **Behavior:**
194
+ * - Returns `false` if `text` or `searchWords` is `null`/`undefined`/invalid.
195
+ * - Uses **regular expressions** for flexible pattern matching.
196
+ * - **Escapes special characters** to prevent regex injection attacks.
197
+ * - **Trims input** to avoid false positives with empty spaces.
198
+ * - **Supports exact word matching** (optional).
199
+ * @param {string|null|undefined} text - The string text to search within.
200
+ * @param {string[]|null} [searchWords] - An array of words/phrases to match against the text.
201
+ * @param {OptionsTextContainsAny} [options] - Optional configuration object.
202
+ * @param {OptionsTextContainsAny["exactMatch"]} [options.exactMatch=false] - If `true`, matches whole words only, defaultValue is `false`.
203
+ * @param {OptionsTextContainsAny["flags"]} [options.flags="i"] - Optional regex flags (default: `"i"` for case-insensitive).
204
+ * @returns {boolean} Return `true` if at least one `searchWord` is found in `text`, otherwise `false`.
205
+ * @example
206
+ * textContainsAny("Hello world", ["hello", "test"]);
207
+ * // ➔ true
208
+ * textContainsAny("withAI APP", ["chat", "ai"]);
209
+ * // ➔ false
210
+ * textContainsAny("TypeScript is great!", ["script", "java"]);
211
+ * // ➔ true
212
+ * textContainsAny("open-source", ["open"], { exactMatch: true });
213
+ * // ➔ false (because options `exactMatch=true`)
214
+ * textContainsAny(null, ["test"]);
215
+ * // ➔ false (invalid text)
216
+ * textContainsAny("Hello", null);
217
+ * // ➔ false (invalid searchWords)
218
+ */
219
+ declare const textContainsAny: <T extends string>(text?: T | null, searchWords?: T[] | string[] | null, options?: OptionsTextContainsAny) => boolean;
220
+ /** ----------------------------------------------------------
221
+ * * ***Predicate: `doesKeyExist`.***
222
+ * ----------------------------------------------------------
223
+ * **Recursively checks if a given key exists in an object or array.**
224
+ * - **Behavior:**
225
+ * - **Supports deeply nested objects and arrays**, searching recursively.
226
+ * - Uses `Object.prototype.hasOwnProperty.call()` to safely check if the
227
+ * key exists at each level, even if its value is `null` or `undefined`.
228
+ * - Optimized to return `true` immediately when the key is found (short-circuits).
229
+ * - Handles edge cases gracefully:
230
+ * - Returns `false` for `null`, `undefined`, or non-object inputs.
231
+ * - Returns `false` if key is not found anywhere, even in deeply nested
232
+ * structures.
233
+ * - **ℹ️ Note:**
234
+ * - This function only checks for **the existence of the key itself**,
235
+ * not whether its value is non-null or non-undefined.
236
+ * - If you need to check for both existence and meaningful value, write a stricter function.
237
+ * @template T - The type of the input object or array.
238
+ * @param {T | Record<string, unknown> | unknown[]} object - The object or array to search.
239
+ * @param {PropertyKey} key - The key to look for (string, number, or symbol).
240
+ * @returns {boolean} Returns `true` if the key exists anywhere in the object or array (even with `null` / `undefined` value), otherwise `false`.
241
+ * @example
242
+ * doesKeyExist({ name: "John", age: 30 }, "age");
243
+ * // ➔ true
244
+ * doesKeyExist({ user: { profile: { email: "test@example.com" } } }, "email");
245
+ * // ➔ true
246
+ * doesKeyExist([{ id: 1 }, { id: 2 }], "id");
247
+ * // ➔ true
248
+ * doesKeyExist({ a: { b: { c: 10 } } }, "d");
249
+ * // ➔ false
250
+ * doesKeyExist(null, "name");
251
+ * // ➔ false
252
+ * doesKeyExist(undefined, "test");
253
+ * // ➔ false
254
+ *
255
+ * // Key exists even if value is null or undefined:
256
+ * doesKeyExist({ a: null, b: undefined, c: { d: null } }, "a"); // ➔ true
257
+ * doesKeyExist({ a: null, b: undefined, c: { d: null } }, "b"); // ➔ true
258
+ * doesKeyExist({ a: null, b: undefined, c: { d: null } }, "d"); // ➔ true
259
+ *
260
+ * doesKeyExist({ a: 1 }, true);
261
+ * // ➔ ❌ Throws TypeError
262
+ * doesKeyExist({ a: 1 }, ["not", "valid"]);
263
+ * // ➔ ❌ Throws TypeError
264
+ */
265
+ declare const doesKeyExist: (object: Record<string, unknown> | unknown[], key: PropertyKey) => boolean;
266
+ /** ----------------------------------------------------------
267
+ * * ***Predicate: `arrayHasAnyMatch`.***
268
+ * ----------------------------------------------------------
269
+ * **Checks if at least one element from `targetArray` exists in `sourceArray`.**
270
+ * - **Behavior:**
271
+ * - Uses `Set` for **faster lookup** compared to `Array.prototype.includes()`.
272
+ * - Supports **any data type** (`number`, `string`, `boolean`, `object`, `array`, `function`, etc.).
273
+ * - Uses **reference equality** for non-primitive values (object, array, function).
274
+ * - Returns `false` if either array is missing, empty, or not an array.
275
+ * @template T - The expected type of array elements.
276
+ * @param {T[] | null | undefined} sourceArray - The array to search within.
277
+ * @param {T[] | null | undefined} targetArray - The array containing elements to match.
278
+ * @returns {boolean}
279
+ * ***Return:***
280
+ * - `true` if **at least one element from `targetArray` is strictly found
281
+ * in `sourceArray`**.
282
+ * - Comparison uses:
283
+ * - **Value equality** for primitives (`number`, `string`, `boolean`, `null`, `undefined`).
284
+ * - **Reference equality** for `objects`, `arrays`, and `functions`.
285
+ * - `false` if:
286
+ * - No matching elements exist,
287
+ * - Either array is not provided, not an actual array, or is empty.
288
+ * @example
289
+ * arrayHasAnyMatch(["apple", "banana", "cherry"], ["banana", "grape"]);
290
+ * // ➔ true
291
+ * arrayHasAnyMatch(["red", "blue"], ["green", "yellow"]);
292
+ * // ➔ false
293
+ * arrayHasAnyMatch([1, 2, 3], [3, 4, 5]);
294
+ * // ➔ true
295
+ * arrayHasAnyMatch([], ["test"]);
296
+ * // ➔ false
297
+ * arrayHasAnyMatch(["A", "B", "C"], []);
298
+ * // ➔ false
299
+ *
300
+ * const obj = { x: 1 };
301
+ * arrayHasAnyMatch([obj], [obj]);
302
+ * // ➔ true (same reference)
303
+ * arrayHasAnyMatch([{ x: 1 }], [{ x: 1 }]);
304
+ * // ➔ false (different reference)
305
+ *
306
+ * const fn = () => "hello";
307
+ * arrayHasAnyMatch([fn], [fn]);
308
+ * // ➔ true
309
+ * arrayHasAnyMatch([() => "hello"], [() => "hello"]);
310
+ * // ➔ false (different function reference)
311
+ *
312
+ * const arr = [1, 2];
313
+ * arrayHasAnyMatch([arr], [arr]);
314
+ * // ➔ true
315
+ * arrayHasAnyMatch([[1, 2]], [[1, 2]]);
316
+ * // ➔ false (different array object)
317
+ */
318
+ declare const arrayHasAnyMatch: <T>(sourceArray: T[] | null | undefined, targetArray: T[] | null | undefined) => boolean;
319
+ /** Restrict array indices to a fixed numeric range (1–25). */
320
+ type ArrayIndex = NumberRangeUnion<1, 25>;
321
+ /** Remove `undefined` from a type. */
322
+ type NonUndef<T> = T extends undefined ? never : T;
323
+ /** Remove `null` from a type. */
324
+ type NonNull<T> = T extends null ? never : T;
325
+ /** Convert optional boolean for "discard undefined" to actual boolean. */
326
+ type EffectiveDiscardUndefined<O extends boolean | undefined> = O extends boolean ? O : true;
327
+ /** Convert optional boolean for "discard null" to actual boolean. */
328
+ type EffectiveDiscardNull<O extends boolean | undefined> = O extends boolean ? O : false;
329
+ /** Unwrap array type. */
330
+ type UnwrapArray<T> = T extends (infer U)[] ? U : T extends readonly (infer U)[] ? U : T;
331
+ /** Force symbol key to be deep required. */
332
+ type IsOptionalKey<T, K extends keyof T> = Record<never, never> extends Pick<T, K> ? true : false;
333
+ /** * ***Returns numeric keys of an object.***
334
+ *
335
+ * @private ***types for {@link hasOwnProp}.***
336
+ */
337
+ type NumericKeyOfHasOwnProp<Obj> = Extract<keyof Obj, number>;
338
+ /** * ***Generate all nested keys of an object or array in dot/bracket notation.***
339
+ *
340
+ * @private ***types for {@link hasOwnProp}.***
341
+ *
342
+ * Example:
343
+ * ```ts
344
+ * type Keys = NestedKeyOfHasOwnProp<{ users: { name: string }[] }>
345
+ * // Keys = "users" | "users.[number]" | "users.[number].name"
346
+ * ```
347
+ */
348
+ type NestedKeyOfHasOwnProp<T> = T extends readonly (infer U)[] ? `[${number}]` | `[${number}].${NestedKeyOfHasOwnProp<U>}` : T extends object ? { [K in keyof T & (string | number)]: K extends string | number ? NonNullable<T[K]> extends readonly unknown[] ? `${K}` | `${K}.[${ArrayIndex}]` | `${K}.[${ArrayIndex}].${NestedKeyOfHasOwnProp<UnwrapArray<T[K]>>}` : NonNullable<T[K]> extends object ? `${K}` | `${K}.${NestedKeyOfHasOwnProp<NonNullable<T[K]>>}` : `${K}` : never }[keyof T & (string | number)] : never;
349
+ /** Apply discard rules to the last key of a path.
350
+ *
351
+ * Rules:
352
+ * - If discardUndefined=true -> remove `undefined` from value
353
+ * - If discardNull=true -> remove `null` from value
354
+ *
355
+ * Order: first strip undefined (if requested), then strip null (if requested)
356
+ */
357
+ type ApplyLastRulesHasOwnProp<V, DiscardU extends boolean, DiscardN extends boolean> = DiscardU extends true ? DiscardN extends true ? NonNull<NonUndef<V>> : NonUndef<V> : DiscardN extends true ? NonNull<V> : V | Extract<V, undefined>;
358
+ /** Force an array index N to type U. */
359
+ type RefineArrayAtIndex<T extends readonly unknown[], N extends number, U> = T & { [K in N]: U };
360
+ /** Narrow object/array type based on a path string.
361
+ *
362
+ * @template T - object type to narrow
363
+ * @template P - path string like "user.addresses.[2].zip"
364
+ * @template DU - discard undefined
365
+ * @template DN - discard null
366
+ */
367
+ type NarrowByPathHasOwnProp<T, P extends string, DU extends boolean = true, DN extends boolean = false> = P extends `${infer Head}.${infer Rest}` ? Head extends `[${infer N extends number}]` ? T extends readonly (infer U)[] ? RefineArrayAtIndex<T, N, NarrowByPathHasOwnProp<U, Rest, DU, DN>> : T : Head extends keyof T ? Rest extends `[${infer M extends number}]${infer R}` ? M extends R ? { [K in keyof T]-?: NarrowByPathHasOwnProp<EffectiveDiscardUndefined<DU> extends true ? NonUndef<T[K]> : EffectiveDiscardNull<DN> extends true ? NonNull<T[K]> : T[K], Rest, DU, DN> } : EffectiveDiscardUndefined<DU> extends true ? { [K in keyof T]-?: K extends Head ? Exclude<NarrowByPathHasOwnProp<EffectiveDiscardNull<DN> extends true ? Exclude<T[K], null> : EffectiveDiscardUndefined<DU> extends true ? Exclude<T[K], undefined> : T[K], Rest, DU, DN>, undefined> : EffectiveDiscardNull<DN> extends true ? Exclude<T[K], null> : EffectiveDiscardUndefined<DU> extends true ? Exclude<T[K], undefined> : T[K] } : { [K in keyof T]: K extends Head ? NarrowByPathHasOwnProp<EffectiveDiscardNull<DN> extends true ? Exclude<T[K], null> : EffectiveDiscardUndefined<DU> extends true ? Exclude<T[K], undefined> : T[K], Rest, DU, DN> : EffectiveDiscardNull<DN> extends true ? Exclude<T[K], null> : EffectiveDiscardUndefined<DU> extends true ? Exclude<T[K], undefined> : T[K] } : { [K in keyof T]: K extends Head ? NarrowByPathHasOwnProp<NonNullable<T[K]>, Rest, DU, DN> : T[K] } & { [K in Head]-?: NarrowByPathHasOwnProp<NonNullable<T[K]>, Rest, DU, DN> } : T : P extends `[${infer N extends number}]` ? T extends readonly (infer U)[] ? RefineArrayAtIndex<T, N, ApplyLastRulesHasOwnProp<NonNullable<U>, DU, DN>> : T : P extends keyof T ? DU extends true ? { [K in keyof T]: K extends P ? ApplyLastRulesHasOwnProp<T[K], DU, DN> : T[K] } & { [K in P]-?: ApplyLastRulesHasOwnProp<T[P], DU, DN> } : { [K in keyof T]: K extends P ? ApplyLastRulesHasOwnProp<T[K], DU, DN> : T[K] } : T;
368
+ /** * ***Expand an array/string/function into a nested type according
369
+ * to a dot/bracket path.***
370
+ * @private ***types for {@link hasOwnProp}.***
371
+ */
372
+ type SmartDetectStringHasOwnProp<Obj extends string | undefined | null, Key extends string | number> = Obj extends undefined ? undefined : Obj extends null ? null : IsPositive<ParseNumber<Key>> extends true ? Extends<IsStringLiteral<Obj>, true> extends true ? CharAt<Exclude<Obj, null | undefined>, ParseNumber<Key>> : string | undefined | null : IsPositive<ParseNumber<Key>> extends true ? string | undefined | null : AnyString | undefined | null;
373
+ /** @private ***types for {@link hasOwnProp}.*** */
374
+ type SmartDetectArrayFuncHasOwnProp<Obj extends unknown[] | AnyFunction, Key extends PropertyKey> = Prettify<Obj & DotToNestedSpecialSmartDetect<Key> & {
375
+ length: number;
376
+ }, {
377
+ recursive: false;
378
+ }>;
379
+ /** * ***Smartly detect nested path keys of an unknown object or function,
380
+ * falls-back to inferred nested structure when path is not valid.***
381
+ *
382
+ * @private ***types for {@link hasOwnProp}.***
383
+ */
384
+ type SmartDetectUnknownKeyHasOwnProp<Obj extends unknown | AnyFunction, Key extends PropertyKey, DiscardUndefined extends boolean = true, DiscardNull extends boolean = false> = Trim<Key> extends "" ? Obj : Prettify<Obj & (Key extends NestedKeyOfHasOwnProp<Obj> ? GuardedHasOwnProp<Obj, Key, DiscardUndefined, DiscardNull> : DotToNestedSpecialSmartDetect<Key>), {
385
+ recursive: true;
386
+ }>;
387
+ /** Convert dot/bracket path string to nested object type with leaf value.
388
+ * Path not found in object key ➔ return unknown.
389
+ */
390
+ type DotToNestedSpecialSmartDetect<Path extends PropertyKey, Value = unknown> = IsEmptyString<Extract<Path, string>> extends true ? undefined : Path extends `${infer Head}.${infer Rest}` ? Head extends `[${number}]` ? DotToNestedSpecialSmartDetect<Rest, Value>[] : { [Key in Head]: DotToNestedSpecialSmartDetect<Rest, Value> } : Path extends `[${number}]` ? Value[] : { [Key in Path]: Value };
391
+ /** * ***Guarded wrapper for `NarrowByPathHasOwnProp` with `Prettify`.***
392
+ * @private ***types for {@link hasOwnProp}.***
393
+ */
394
+ type GuardedHasOwnProp<Obj, Key extends NestedKeyOfHasOwnProp<Obj>, DiscardUndefined extends boolean | undefined, DiscardNull extends boolean | undefined> = Prettify<Obj & NarrowByPathHasOwnProp<Obj, Key & string, EffectiveDiscardUndefined<DiscardUndefined>, EffectiveDiscardNull<DiscardNull>>, {
395
+ recursive: true;
396
+ }>;
397
+ /** * ***Make a specific symbol key deeply required in an object symbols.***
398
+ * **Used internally to enforce stronger type narrowing.**
399
+ * @private ***types for {@link hasOwnProp}.***
400
+ */
401
+ type DeepRequiredSymbolHasOwnProp<Obj, Sym extends symbol, DU extends boolean = true, DN extends boolean = false> = Prettify<Obj & ({ [K in keyof Obj & Sym as DU extends true ? K : never]-?: DN extends true ? NonNull<NonUndef<Obj[K]>> : NonUndef<Obj[K]> } & { [K in keyof Obj & Sym as DU extends true ? never : K]?: DN extends true ? NonNull<Obj[K]> : Obj[K] }), {
402
+ recursive: true;
403
+ }>;
404
+ /** * ***Apply discard rules to numeric keys in an object type.***
405
+ *
406
+ * - If `discardUndefined = true` ➔ undefined removed, key required
407
+ * - If `discardNull = true` ➔ null removed
408
+ *
409
+ * @private ***types for {@link hasOwnProp}.***
410
+ */
411
+ type NumericKeyHasOwnPropMapped<Obj extends object, K extends NumericKeyOfHasOwnProp<Obj>, DU extends boolean, DN extends boolean> = Prettify<Obj & (IsOptionalKey<Obj, K> extends true ? { [P in K]?: DN extends true ? NonNull<Obj[K]> : Obj[K] } & (DU extends true ? { [P in K]-?: NonUndef<Obj[K]> } : Record<never, never>) : { [P in K]-?: DN extends true ? NonNull<Obj[K]> : Obj[K] } & (DU extends true ? { [P in K]-?: NonUndef<Obj[K]> } : Record<never, never>)), {
412
+ recursive: true;
413
+ }>;
414
+ /** * ***Options to control `hasOwnProp` behavior.***
415
+ * @private ***types options for {@link hasOwnProp}.***
416
+ */
417
+ type HasOwnPropOptions<DiscardUndefined extends boolean = true, DiscardNull extends boolean = false> = {
418
+ /** If `true` ***(default)***, properties with `undefined` values are treated as non-existent.
419
+ *
420
+ * - **Effects:**
421
+ * - **Runtime:** `hasOwnProp(obj, key)` returns `false` if the property exists but its value is `undefined`.
422
+ * - **TypeScript narrowing:** The property's type is narrowed to exclude `undefined`.
423
+ * - **Example:**
424
+ * ```ts
425
+ * const obj = { a: undefined, b: 123 };
426
+ * hasOwnProp(obj, "a"); // ➔ false
427
+ * hasOwnProp(obj, "a", { discardUndefined: false }); // ➔ true
428
+ * ```
429
+ */
430
+ discardUndefined?: DiscardUndefined;
431
+ /** If `true` ***(default: `false`)***, properties with `null` values are treated as non-existent.
432
+ *
433
+ * - **Effects:**
434
+ * - **Runtime:** `hasOwnProp(obj, key)` returns `false` if the property exists but its value is `null`.
435
+ * - **TypeScript narrowing:** The property's type is narrowed to exclude `null`.
436
+ * - **Example:**
437
+ * ```ts
438
+ * const obj = { a: null, b: 123 };
439
+ * hasOwnProp(obj, "a"); // ➔ true (default discardNull = false)
440
+ * hasOwnProp(obj, "a", { discardNull: true }); // ➔ false
441
+ * ```
442
+ */
443
+ discardNull?: DiscardNull;
444
+ };
445
+ /** -------------------------------------------------------
446
+ * * ***Predicate: `hasOwnProp`.***
447
+ * -------------------------------------------------------
448
+ * **A **type-safe** replacement for `Object.prototype.hasOwnProperty` with runtime validation and **TypeScript-aware type narrowing**.**
449
+ * - #### Supported Targets:
450
+ * - **Plain objects** ➔ `{ foo: "bar" }`.
451
+ * - **Arrays** ➔ `[ { id: 1 }, { id: 2 } ]`.
452
+ * - **Strings** ➔ `"hello"` (as array-like objects with `.length`, index, etc.).
453
+ * - **Functions** ➔ callable objects with extra props.
454
+ * - **Symbols** ➔ own property symbols.
455
+ * - #### Key Advantages over `in` or `obj.hasOwnProperty(key)`:
456
+ * - Supports **dot/bracket path notation** (e.g. `"user.address.city"`, `"addresses[0].zip"`).
457
+ * - Handles **symbol** keys safely.
458
+ * - **Narrows** the type of `obj` in TypeScript (stronger type safety).
459
+ * - Configurable handling of **`undefined`** and **`null`**.
460
+ * - #### Runtime Behavior:
461
+ * - ***✅ Returns `true` if:***
462
+ * - Value `obj` is an object/array/string/function **and** the property
463
+ * exists **and**, it passes the `options` checks.
464
+ * - ***❌ Returns `false` if:***
465
+ * - Value `obj` is not a valid type.
466
+ * - The property does not exist.
467
+ * - The value is `undefined` and `discardUndefined: true` (**default**).
468
+ * - The value is `null` and `discardNull: true`.
469
+ * - The `key` (after trimming) is an **empty string** ➔ treated as **invalid**.
470
+ * - #### TypeScript Behavior:
471
+ * - ***Inside an `if (hasOwnProp(...)) {}` block:***
472
+ * - The property is **guaranteed to exist**.
473
+ * - Depending on `options`, the property type is narrowed to exclude
474
+ * `undefined` and/or `null`.
475
+ * - #### ⚠️ Caveats:
476
+ * - ***Empty keys are invalid:***
477
+ * - If the `key` string is empty (`""`) after trimming whitespace or other characters,
478
+ * it will **not** be considered a valid property and always returns `false`.
479
+ * - ***Arrays are limited by TypeScript inference:***
480
+ * - Checking index `[0]` only narrows **that specific index**, not the rest, example:
481
+ * 1. `hasOwnProp(users, "[0].id")` does **not** imply `users[1].id` exists.
482
+ * - 👉 For different indices, use **optional chaining** (`users[1]?.id`).
483
+ * - ***Autocomplete limitation for array indices:***
484
+ * - Autocompletion for `[index]` is only supported up to **25** (`[0]` ➔ `[24]`).
485
+ * - This limit is intentional for **performance and safety:**
486
+ * 1. Generating infinite union types for all possible indices would cause
487
+ * **TypeScript IntelliSense to hang or crash**.
488
+ * - ℹ️ You can still check higher indices manually (e.g. `"[999].id"`),
489
+ * but they will not show up in IntelliSense suggestions.
490
+ * @param {HasOwnPropOptions} [options] - ***Optional configuration object.***
491
+ * @param {HasOwnPropOptions["discardUndefined"]} [options.discardUndefined=true]
492
+ * ***If `true`, properties with `undefined` values are treated as **missing**, default: `true`.***
493
+ * @param {HasOwnPropOptions["discardNull"]} [options.discardNull=false]
494
+ * ***If `true`, properties with `null` values are treated as **missing**, default: `false`.***
495
+ * @param {*} obj ***The `object`, `array`, `string`, `function`, or `other value` to check against.***
496
+ * @param {PropertyKey} key
497
+ * ***The property key to check, can be:***
498
+ * - `string` (supports dot/bracket paths, e.g. `"user.address.city"`, `"[0].id"`).
499
+ * - `number` (array-like index).
500
+ * - `symbol` (own property symbols).
501
+ * @returns {boolean} Return `true` if the property exists (and passes `options`), otherwise `false`.
502
+ * @example
503
+ *
504
+ * - #### ✅ Objects:
505
+ * ```ts
506
+ * const obj: { name?: string | null } = {};
507
+ *
508
+ * if (hasOwnProp(obj, "name")) {
509
+ * // obj is now ➔ { name: string | null }
510
+ * console.log(obj.name); // string | null
511
+ * }
512
+ *
513
+ * if (hasOwnProp(obj, "name", { discardUndefined: true, discardNull: true })) {
514
+ * // obj is now ➔ { name: string }
515
+ * console.log(obj.name.toUpperCase()); // safe
516
+ * }
517
+ * ```
518
+ * - #### ✅ Arrays:
519
+ * ```ts
520
+ * const users = [{ id: 1 }, { id: 2 }];
521
+ *
522
+ * if (hasOwnProp(users, "[1].id")) {
523
+ * // ➔ users[1].id is guaranteed to exist
524
+ * console.log(users[1].id); // number
525
+ * }
526
+ *
527
+ * // ⚠️ Caveat: narrowing only applies to checked index
528
+ * if (hasOwnProp(users, "[0].id")) {
529
+ * console.log(users[0].id); // ✅ safe
530
+ * console.log(users[1].id); // ❌ not guaranteed!
531
+ * }
532
+ *
533
+ * // 👉 Solution: optional chaining
534
+ * console.log(users[1]?.id); // ➔ safe, even without narrowing
535
+ * ```
536
+ *
537
+ * - #### ✅ Symbols:
538
+ * ```ts
539
+ * const secret = Symbol("secret");
540
+ * const obj2 = { [secret]: 42 };
541
+ *
542
+ * if (hasOwnProp(obj2, secret)) {
543
+ * console.log(obj2[secret] + 1); // ➔ 43
544
+ * }
545
+ * ```
546
+ * - #### ✅ Strings:
547
+ * ```ts
548
+ * if (hasOwnProp("hello", "length")) {
549
+ * console.log("hello".length); // ➔ 5
550
+ * }
551
+ *
552
+ * if (hasOwnProp("hello", 1)) {
553
+ * console.log("hello"[1]); // ➔ "e"
554
+ * }
555
+ * ```
556
+ * - #### ✅ Functions:
557
+ * ```ts
558
+ * function fn() {}
559
+ * fn.extra = 123;
560
+ *
561
+ * if (hasOwnProp(fn, "extra")) {
562
+ * console.log(fn.extra); // ➔ 123
563
+ * }
564
+ * ```
565
+ * - #### ❌ Empty key:
566
+ * ```ts
567
+ * const obj = { a: 1 };
568
+ *
569
+ * hasOwnProp(obj, ""); // ➔ false (invalid key)
570
+ * hasOwnProp(obj, " "); // ➔ false (trimmed to empty)
571
+ * ```
572
+ */
573
+ declare function hasOwnProp<Obj>(obj: IsAny<Obj> extends true ? Obj : never, key: PropertyKey, options?: HasOwnPropOptions<boolean, boolean> /** @ts-expect-error we force `any` to `unknown` at result */): obj is unknown;
574
+ declare function hasOwnProp<Obj extends null | undefined>(obj: Obj, key: PropertyKey, options?: HasOwnPropOptions<boolean, boolean>): false;
575
+ declare function hasOwnProp<Obj extends object | AnyFunction, Key extends NestedKeyOfHasOwnProp<Obj>, DiscardUndefined extends boolean = true, DiscardNull extends boolean = false>(obj: Obj | null | undefined, key: Key, options?: HasOwnPropOptions<DiscardUndefined, DiscardNull> /** @ts-expect-error we force to override recursive type result */): obj is GuardedHasOwnProp<Obj, Key, DiscardUndefined, DiscardNull>;
576
+ declare function hasOwnProp<Obj extends object, Num extends NumericKeyOfHasOwnProp<Obj>, DiscardUndefined extends boolean = true, DiscardNull extends boolean = false>(obj: Obj | null | undefined, key: Num, options?: HasOwnPropOptions<DiscardUndefined, DiscardNull> /** @ts-expect-error we force to override recursive type result */): obj is NumericKeyHasOwnPropMapped<Obj, Num, DiscardUndefined, DiscardNull>;
577
+ declare function hasOwnProp<Obj extends object | AnyFunction, Sym extends symbol, DiscardUndefined extends boolean = true, DiscardNull extends boolean = false>(obj: Obj | null | undefined, key: Sym, options?: HasOwnPropOptions<DiscardUndefined, DiscardNull> /** @ts-expect-error we force to override recursive type result */): obj is DeepRequiredSymbolHasOwnProp<Obj, Sym, DiscardUndefined, DiscardNull>;
578
+ declare function hasOwnProp<Obj extends string | null | undefined, Key extends string | number>(obj: Obj | null | undefined, key: Key, options?: HasOwnPropOptions<boolean, boolean> /** @ts-expect-error we force to override recursive type result */): obj is IsStringLiteral<SmartDetectStringHasOwnProp<Obj, Key>> extends true ? AnyString | SmartDetectStringHasOwnProp<Obj, Key> : SmartDetectStringHasOwnProp<Obj, Key>;
579
+ declare function hasOwnProp<Obj extends unknown[] | AnyFunction, Key extends PropertyKey>(obj: Obj, key: Key, options?: HasOwnPropOptions<boolean, boolean>): obj is SmartDetectArrayFuncHasOwnProp<Obj, Key>;
580
+ declare function hasOwnProp<Obj extends unknown | AnyFunction, Key extends PropertyKey, DiscardUndefined extends boolean = true, DiscardNull extends boolean = false>(obj: Obj, key: Key | "length" | (IsPlainObjectResult<Obj> extends never ? never : keyof Obj), options?: HasOwnPropOptions<DiscardUndefined, DiscardNull> /** @ts-expect-error we force to override recursive type result */): obj is SmartDetectUnknownKeyHasOwnProp<Obj, Key, DiscardUndefined, DiscardNull>;
581
+ /** -------------------
582
+ * * ***Type guard: `isArguments`.***
583
+ * -------------------
584
+ * **Checks if `value` is likely an `arguments` object.**
585
+ * @param {*} value The value to check.
586
+ * @returns {boolean} Returns `true` if `value` is an ***[`IArguments`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/arguments)*** object, else `false`.
587
+ * @example
588
+ * isArguments(function() { return arguments; }());
589
+ * // ➔ true
590
+ * isArguments([1, 2, 3]);
591
+ * // ➔ false
592
+ */
593
+ declare const isArguments: (value: unknown) => value is IArguments;
594
+ /** ----------------------------------------------------------
595
+ * * ***Type guard: `isArray`.***
596
+ * ----------------------------------------------------------
597
+ ***Checks if a value is an ***[`Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)***.**
598
+ * - **Behavior:**
599
+ * - Uses ***[`Array.isArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray)*** for reliable and safe type checking.
600
+ * - Supports TypeScript **type narrowing** using `value is T[]`.
601
+ * - Handles edge cases like `null`, `undefined`, and non-array objects.
602
+ * @template T - The expected type of array elements.
603
+ * @param {*} value - The value to check.
604
+ * @returns {boolean} Returns `true` if the value is an `array`, otherwise `false`.
605
+ * @example
606
+ * isArray([1, 2, 3]);
607
+ * // ➔ true
608
+ * isArray([]);
609
+ * // ➔ true
610
+ * isArray("hello");
611
+ * // ➔ false
612
+ * isArray({ key: "value" });
613
+ * // ➔ false
614
+ * isArray(null);
615
+ * // ➔ false
616
+ * isArray(undefined);
617
+ * // ➔ false
618
+ */
619
+ declare function isArray(value: []): value is [];
620
+ declare function isArray<T>(value: T): value is ArrayFallback<T>;
621
+ declare function isArray(value: unknown): value is unknown[];
622
+ /** ----------------------------------------------------
623
+ * * ***Type guard: `isArrayBuffer`.***
624
+ * ----------------------------------------------------
625
+ * **Checks if `value` is classified as an `ArrayBuffer` object.**
626
+ * @param {*} value The value to check.
627
+ * @returns {boolean} Returns `true` if `value` is instance of ***[`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer)***, else `false`.
628
+ * @example
629
+ * isArrayBuffer(new ArrayBuffer(2));
630
+ * // ➔ true
631
+ * isArrayBuffer(new Array(2));
632
+ * // ➔ false
633
+ */
634
+ declare function isArrayBuffer(value: unknown): value is ArrayBuffer;
635
+ /** ----------------------------------------------------
636
+ * * ***Type guard: `isArrayLike`.***
637
+ * ----------------------------------------------------
638
+ * **Checks if `value` is array-like, a value is considered array-like if it's
639
+ * not a function and has a `value.length` that's an integer greater than or
640
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.**
641
+ * @template T - The type of the value being checked.
642
+ * @param {*} value The value to check.
643
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
644
+ * @example
645
+ * isArrayLike([1, 2, 3]);
646
+ * // ➔ true
647
+ * isArrayLike(document.body.children);
648
+ * // ➔ true
649
+ * isArrayLike(noop);
650
+ * // ➔ false
651
+ * isArrayLike('abc');
652
+ * // ➔ false
653
+ */
654
+ declare function isArrayLike<T extends {
655
+ __anyHack: unknown;
656
+ }>(value: T): boolean;
657
+ declare function isArrayLike(value: AnyFunction | null | undefined): value is never;
658
+ declare function isArrayLike(value: unknown): value is {
659
+ length: number;
660
+ };
661
+ /** ----------------------------------------------------
662
+ * * ***Type guard: `isArrayLikeObject`.***
663
+ * ----------------------------------------------------
664
+ * **This method is like ***`isArrayLike` utility function*** except that
665
+ * it also checks if `value` is an object.**
666
+ * @template T - The type of the value being checked.
667
+ * @param {*} value The value to check.
668
+ * @returns {boolean} Returns `true` if `value` is `array-like object`, else `false`.
669
+ * @example
670
+ * isArrayLikeObject([1, 2, 3]);
671
+ * // ➔ true
672
+ * isArrayLikeObject(document.body.children);
673
+ * // ➔ true
674
+ * isArrayLikeObject('abc');
675
+ * // ➔ false
676
+ * isArrayLikeObject(noop);
677
+ * // ➔ false
678
+ */
679
+ declare function isArrayLikeObject<T extends {
680
+ __anyHack: unknown;
681
+ }>(value: T): boolean;
682
+ declare function isArrayLikeObject(value: AnyFunction | string | boolean | number | null | undefined): value is never;
683
+ declare function isArrayLikeObject(value: unknown): value is object & {
684
+ length: number;
685
+ };
686
+ /** ----------------------------------------------------------
687
+ * * ***Type guard: `isBigInt`.***
688
+ * ----------------------------------------------------------
689
+ * **Checks if a value is of type **[`BigInt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt)**.**
690
+ * - **Behavior:**
691
+ * - Uses `typeof value === "bigint"` for strict type checking.
692
+ * - Supports TypeScript type narrowing with `value is bigint`.
693
+ * - Returns `false` for `BigInt` object (object-wrapped), e.g:
694
+ * - `Object(BigInt(123))`.
695
+ * @param {*} value - The value to check.
696
+ * @returns {boolean} Return `true` if value is a primitive bigint.
697
+ * @example
698
+ * isBigInt(123n);
699
+ * // ➔ true
700
+ * isBigInt(BigInt(123));
701
+ * // ➔ true
702
+ * isBigInt("123");
703
+ * // ➔ false
704
+ * isBigInt(Object(BigInt(1)));
705
+ * // ➔ false
706
+ */
707
+ declare const isBigInt: (value: unknown) => value is bigint;
708
+ /** ----------------------------------------------------------
709
+ * * ***Type guard: `isBoolean`.***
710
+ * ----------------------------------------------------------
711
+ * **Checks if a value is of type **[`boolean`](https://developer.mozilla.org/en-US/docs/Glossary/Boolean/JavaScript)**.**
712
+ * @param {*} value - The value to check.
713
+ * @returns {boolean} Returns `true` if the value is a `boolean`, otherwise `false`.
714
+ * @example
715
+ * isBoolean(true); // ➔ true
716
+ * isBoolean(false); // ➔ true
717
+ * isBoolean("true"); // ➔ false
718
+ */
719
+ declare const isBoolean: (value: unknown) => value is boolean;
720
+ /** ----------------------------------------------------
721
+ * * ***Type guard: `isBooleanObject`.***
722
+ * ----------------------------------------------------
723
+ * **Checks if a value is a **`Boolean` object wrapper**
724
+ * (`new Boolean(...)`), not a primitive boolean.**
725
+ * @param {*} value The value to check.
726
+ * @returns {value is Boolean} Returns `true` if `value` is a `Boolean` object.
727
+ * @example
728
+ * isBooleanObject(new Boolean(true));
729
+ * // ➔ true
730
+ * isBooleanObject(true);
731
+ * // ➔ false
732
+ */
733
+ declare function isBooleanObject(value: unknown): value is Boolean;
734
+ /** ----------------------------------------------------
735
+ * * ***Type guard: `isBuffer`.***
736
+ * ----------------------------------------------------------
737
+ * **Checks if a value is a *****{@link Buffer | `Node.js - Buffer`}***** instance.**
738
+ * @param {*} value The value to check.
739
+ * @returns {boolean} Returns `true` if `value` is a `Buffer`, else `false`.
740
+ * @example
741
+ * isBuffer(new Buffer(2));
742
+ * // ➔ true
743
+ * isBuffer(Buffer.alloc(10));
744
+ * // ➔ true
745
+ * isBuffer(Buffer.from('foo'));
746
+ * // ➔ true
747
+ * isBuffer([]);
748
+ * // ➔ false
749
+ * isBuffer('a string');
750
+ * // ➔ false
751
+ * isBuffer(new Uint8Array(1024));
752
+ * // ➔ false
753
+ */
754
+ declare const isBuffer: (value: unknown) => value is Buffer;
755
+ /** -----------------------------------------------------------
756
+ * * ***Predicate: `isCurrencyLike`.***
757
+ * -----------------------------------------------------------
758
+ * **Determines if the given `input` can be interpreted as a currency-like number,
759
+ * using the same **multi-locale parsing logic** as ***`parseCurrencyString`***.**
760
+ * - **Highlights:**
761
+ * - *Supports strings or numbers like:*
762
+ * - `"15.000,10"` ***(European)***.
763
+ * - `"15,000.10"` ***(US)***.
764
+ * - `"15'000.10"` ***(Swiss)***.
765
+ * - `"15 000,10"` ***(French)***.
766
+ * - `"Rp 15.000,10"` or `"$15,000.10"`.
767
+ * - Also accepts simple numbers (`15300.95`).
768
+ * - **ℹ️ Note:**
769
+ * - Uses the same core logic as
770
+ * ***`parseCurrencyString`*** but
771
+ * just checks if a final parsed float is sensible.
772
+ * @param {*} input - The input value to check.
773
+ * @returns {boolean} Return `true` if it can be reasonably parsed into a currency-like number, `false` otherwise.
774
+ * @example
775
+ * isCurrencyLike(15300.95);
776
+ * // ➔ true
777
+ * isCurrencyLike("$15,000.10");
778
+ * // ➔ true
779
+ * isCurrencyLike("(15'000.10)");
780
+ * // ➔ true
781
+ * isCurrencyLike("Rp 15.000,10");
782
+ * // ➔ true
783
+ * isCurrencyLike("");
784
+ * // ➔ false
785
+ * isCurrencyLike("abc");
786
+ * // ➔ false
787
+ */
788
+ declare const isCurrencyLike: (input: unknown) => boolean;
789
+ type isDateOptions = {
790
+ /** * ***Skip the validity check (`!isNaN(date.getTime())`).***
791
+ *
792
+ * When `true`, the function only checks that the value is an
793
+ * instance of `Date` without verifying that it represents a valid
794
+ * date value, default: `false`.
795
+ *
796
+ * @default false
797
+ */
798
+ skipInvalidDate?: boolean;
799
+ };
800
+ /** ----------------------------------------------------------
801
+ * * ***Type guard: `isDate`.***
802
+ * ----------------------------------------------------------
803
+ * **Determines whether the given `value` is a real, valid JavaScript
804
+ * **[`Date`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date)** object.**
805
+ * - **Behavior:**
806
+ * - Returns **true** only if:
807
+ * - `value` is an instance of `Date`.
808
+ * - and, unless `options.skipInvalidDate` is `true`,
809
+ * the underlying time value is valid (`!isNaN(value.getTime())`).
810
+ * - Returns **false** for:
811
+ * - non-Date values (strings, numbers, etc.).
812
+ * - `Date` instances that represent an invalid time value
813
+ * (e.g. `new Date("bad")`), unless skipping is enabled.
814
+ * @param {*} value - The value to check.
815
+ * @param {isDateOptions} [options] - Optional settings.
816
+ * @returns {boolean} Return `true` if value is a valid Date object.
817
+ * @example
818
+ * isDate(new Date());
819
+ * // ➜ true
820
+ * isDate(new Date("invalid"));
821
+ * // ➜ false
822
+ * isDate("2024-01-01");
823
+ * // ➜ false
824
+ *
825
+ * // Skipping validity check:
826
+ * isDate(new Date("invalid"), { skipInvalidDate: true });
827
+ * // ➜ true
828
+ */
829
+ declare const isDate: (value: unknown, options?: isDateOptions) => value is Date;
830
+ /** ----------------------------------------------------------
831
+ * * ***Predicate: `isDeepEqual`.***
832
+ * ----------------------------------------------------------
833
+ * **Performs a deep equality check between two values.**
834
+ * - **Behavior:**
835
+ * - Compares nested `arrays`, `objects`, `Dates`, `RegExp`, `NaN`, `Symbols`,
836
+ * `Set`, and `Map`.
837
+ * - Handles special cases:
838
+ * - `NaN` is considered equal to `NaN`.
839
+ * - `Date` objects are equal if `.getTime()` is equal.
840
+ * - `RegExp` objects are equal if `.toString()` is equal.
841
+ * - `Symbol("x")` and `Symbol("x")` are treated equal if
842
+ * `.toString()` matches.
843
+ * - `Set` and `Map` are deeply compared by content (order-insensitive).
844
+ * - **ℹ️ Note:**
845
+ * - Does not support circular references.
846
+ * @param {*} a - First value to compare.
847
+ * @param {*} b - Second value to compare.
848
+ * @returns {boolean} `true` if both values are deeply equal, otherwise `false`.
849
+ * @example
850
+ * // ✅ Primitives
851
+ * isDeepEqual(1, 1);
852
+ * // ➔ true
853
+ * isDeepEqual(NaN, NaN);
854
+ * // ➔ true
855
+ * isDeepEqual("hello", "world");
856
+ * // ➔ false
857
+ *
858
+ * // ✅ Objects
859
+ * isDeepEqual({ x: 1 }, { x: 1 });
860
+ * // ➔ true
861
+ * isDeepEqual({ x: 1 }, { y: 1 });
862
+ * // ➔ false
863
+ *
864
+ * // ✅ Arrays
865
+ * isDeepEqual([1, 2], [1, 2]);
866
+ * // ➔ true
867
+ * isDeepEqual([1, 2], [2, 1]);
868
+ * // ➔ false
869
+ *
870
+ * // ✅ Dates
871
+ * isDeepEqual(new Date(123), new Date(123));
872
+ * // ➔ true
873
+ *
874
+ * // ✅ Sets
875
+ * isDeepEqual(new Set([1, 2]), new Set([2, 1]));
876
+ * // ➔ true
877
+ *
878
+ * // ✅ Maps
879
+ * isDeepEqual(new Map([["a", 1]]), new Map([["a", 1]]));
880
+ * // ➔ true
881
+ *
882
+ * // ❌ Different types
883
+ * isDeepEqual(1, "1");
884
+ * // ➔ false
885
+ */
886
+ declare const isDeepEqual: (a: unknown, b: unknown) => boolean;
887
+ /** ----------------------------------------------------
888
+ * * ***Type guard: `isElement`.***
889
+ * ----------------------------------------------------------
890
+ * **Checks if `value` is likely a
891
+ * **[`DOM Element`](https://developer.mozilla.org/en-US/docs/Web/API/Element)**.**
892
+ * @template T - The type of the value being checked.
893
+ * @param {*} value The value to check.
894
+ * @returns {boolean} Returns `true` if `value` is extends instance of **[`Element`](https://developer.mozilla.org/en-US/docs/Web/API/Element)**, else `false`.
895
+ * @example
896
+ * isElement(document.body);
897
+ * // ➔ true
898
+ * isElement(document.createElement("div"));
899
+ * // ➔ true
900
+ * isElement('<body>');
901
+ * // ➔ false
902
+ * isElement(document);
903
+ * // ➔ false
904
+ * isElement({ tagName: "DIV" });
905
+ * // ➔ false
906
+ */
907
+ declare function isElement(value: []): value is [];
908
+ declare function isElement<T extends Element>(value: T): value is T;
909
+ declare function isElement(value: unknown): value is Element;
910
+ /**
911
+ * -------------------------------------------------------------------
912
+ * * ***Array-like structure interface.***
913
+ * -------------------------------------------------------------------
914
+ * **Represents objects with indexed elements and a `length` property,
915
+ * similar to arrays, but not necessarily full Array instances.**
916
+ * @template T The type of elements stored in the array-like object.
917
+ * @example
918
+ * ```ts
919
+ * function logArrayLike<T>(items: ArrayLike<T>) {
920
+ * for (let i = 0; i < items.length; i++) {
921
+ * console.log(items[i]);
922
+ * }
923
+ * }
924
+ *
925
+ * const myNodeList: ArrayLike<Element> = document.querySelectorAll("div");
926
+ * logArrayLike(myNodeList);
927
+ * ```
928
+ */
929
+ interface ArrayLike<T> {
930
+ /** * ***Number of elements in the array-like object.*** */
931
+ readonly length: number;
932
+ /** * ***Indexed access to elements.*** */
933
+ readonly [n: number]: T;
934
+ }
935
+ /** -------------------------------------------------------------------
936
+ * * ***Represents an object with no allowed properties.***
937
+ * -------------------------------------------------------------------
938
+ * **Useful for cases where you want to ensure a type has **no keys**.**
939
+ * @template T - The base type to convert into an empty object type.
940
+ * @example
941
+ * ```ts
942
+ * type Test = EmptyObject<{ a: number }>;
943
+ * // ➔ { a?: never }
944
+ * ```
945
+ */
946
+ type EmptyObject<T> = { [K in keyof T]?: never };
947
+ /** -------------------------------------------------------------------
948
+ * * ***Conditional empty object type.***
949
+ * -------------------------------------------------------------------
950
+ * **Produces `EmptyObject<T>` only if it is assignable to `T`.**
951
+ * @template T - The base type to check.
952
+ * @example
953
+ * ```ts
954
+ * type Test = EmptyObjectOf<{ a: number }>;
955
+ * // ➔ { a?: never } | never depending on assignability
956
+ * ```
957
+ */
958
+ type EmptyObjectOf<T> = EmptyObject<T> extends T ? EmptyObject<T> : never;
959
+ /** -------------------------------------------------------------------
960
+ * * ***List type alias.***
961
+ * -------------------------------------------------------------------
962
+ * **Represents any array-like structure.**
963
+ * @template T - The type of elements in the list.
964
+ * @example
965
+ * ```ts
966
+ * const arr: List<number> = [1, 2, 3];
967
+ * const nodeList: List<Element> = document.querySelectorAll("div");
968
+ * ```
969
+ */
970
+ type List<T> = ArrayLike<T>;
971
+ /** ----------------------------------------------------
972
+ * * ***Predicate: `isEmpty`.***
973
+ * ----------------------------------------------------------
974
+ * **Checks if `value` is an empty object, collection, map, or set.**
975
+ * - **Behavior:**
976
+ * - **Objects** are empty if they have no own enumerable string keyed properties.
977
+ * - **Array-like values** (arrays, strings, `arguments`, typed arrays, buffers)
978
+ * are empty if their `length` is `0`.
979
+ * - **Maps** and **Sets** are empty if their `size` is `0`.
980
+ * - **Booleans**, **numbers** (including `NaN`), **symbols**, and `null`/
981
+ * `undefined` are treated as empty.
982
+ * - **Functions** are considered empty if they have no own enumerable keys.
983
+ * - **ℹ️ Note:**
984
+ * - For more `Strict`, you can use
985
+ * ***`isEmptyValue` utility function*** instead.
986
+ * @template T - The type of the value being checked.
987
+ * @param {*} value The value to check.
988
+ * @returns {boolean} Returns `true` if `value` is empty, else `false`.
989
+ * @example
990
+ * isEmpty(null);
991
+ * // ➔ true
992
+ * isEmpty(true);
993
+ * // ➔ true
994
+ * isEmpty(false);
995
+ * // ➔ true
996
+ * isEmpty(1);
997
+ * // ➔ true
998
+ * isEmpty(0);
999
+ * // ➔ true
1000
+ * isEmpty(Symbol("x"));
1001
+ * // ➔ true
1002
+ * isEmpty(() => {});
1003
+ * // ➔ true
1004
+ * isEmpty("");
1005
+ * // ➔ true
1006
+ * isEmpty(" ");
1007
+ * // ➔ false
1008
+ * isEmpty([1, 2, 3]);
1009
+ * // ➔ false
1010
+ * isEmpty({ 'a': 1 });
1011
+ * // ➔ false
1012
+ */
1013
+ declare function isEmpty<T extends {
1014
+ __trapAny: any;
1015
+ }>(value?: T): boolean;
1016
+ declare function isEmpty(value: string): value is "";
1017
+ declare function isEmpty(value: Map<any, any> | Set<any> | List<any> | null | undefined): boolean;
1018
+ declare function isEmpty(value: object): boolean;
1019
+ declare function isEmpty<T extends object>(value: T | null | undefined): value is EmptyObjectOf<T> | null | undefined;
1020
+ declare function isEmpty(value: any): boolean;
1021
+ /** ----------------------------------------------------------
1022
+ * * ***Predicate: `isEmptyArray`.***
1023
+ * ----------------------------------------------------------
1024
+ * **Checks whether a given value is an empty array.**
1025
+ * - **Behavior:**
1026
+ * - Non-array inputs are considered ***`empty`*** ***(defensive strategy)***.
1027
+ * @param {*} [value] - The value to check.
1028
+ * @returns {boolean} Returns `true` if it's ***not an array*** or ***an empty-array***.
1029
+ * @example
1030
+ * isEmptyArray([]); // ➔ true
1031
+ * isEmptyArray([1, 2, 3]); // ➔ false
1032
+ * isEmptyArray("not an array"); // ➔ true
1033
+ * isEmptyArray(null); // ➔ true
1034
+ * isEmptyArray(undefined); // ➔ true
1035
+ *
1036
+ * if (isEmptyArray(data.items)) {
1037
+ * console.log("No items to display.");
1038
+ * }
1039
+ */
1040
+ declare const isEmptyArray: (value: unknown) => boolean;
1041
+ /** ----------------------------------------------------------
1042
+ * * ***Predicate: `isEmptyDeep`.***
1043
+ * ----------------------------------------------------------
1044
+ * **Recursively checks whether a value is **deeply empty**.**
1045
+ * - **Returns `true` for:**
1046
+ * - Empty objects: `{}`
1047
+ * - Empty arrays: `[]`
1048
+ * - Nested empty structures: `{ a: [], b: {} }`
1049
+ * - Falsy values (except numbers): `null`, `undefined`, `false`, `""`, `NaN`
1050
+ * - **Returns `false` for:**
1051
+ * - Non-zero numbers
1052
+ * - Objects or arrays containing non-empty values
1053
+ * - Non-empty strings, `true`, functions, symbols, etc.
1054
+ * @param {*} value - The value to deeply check.
1055
+ * @returns {boolean} `true` if the value is deeply empty, otherwise `false`.
1056
+ * @example
1057
+ * isEmptyDeep({});
1058
+ * // ➔ true
1059
+ * isEmptyDeep([]);
1060
+ * // ➔ true
1061
+ * isEmptyDeep({ a: {} });
1062
+ * // ➔ true
1063
+ * isEmptyDeep([[], {}]);
1064
+ * // ➔ true
1065
+ * isEmptyDeep({ a: [1] });
1066
+ * // ➔ false
1067
+ * isEmptyDeep([0]);
1068
+ * // ➔ false
1069
+ * isEmptyDeep("test");
1070
+ * // ➔ false
1071
+ * isEmptyDeep("");
1072
+ * // ➔ true
1073
+ * isEmptyDeep(0);
1074
+ * // ➔ false
1075
+ * isEmptyDeep(NaN);
1076
+ * // ➔ true
1077
+ */
1078
+ declare const isEmptyDeep: (value: unknown) => boolean;
1079
+ type IsEmptyObjectOptions = {
1080
+ /** Whether to check for symbol properties in addition to string keys, defaultValue: `false`.
1081
+ *
1082
+ * @default false
1083
+ */
1084
+ checkSymbols?: boolean;
1085
+ };
1086
+ /** ----------------------------------------------------------
1087
+ * * ***Predicate: `isEmptyObject`.***
1088
+ * ----------------------------------------------------------
1089
+ * **Checks if a value is a plain object with **no own enumerable string-key properties**,
1090
+ * and optionally **no own enumerable symbol-key properties** when `checkSymbols` is `true`.**
1091
+ * - **Behavior:**
1092
+ * - If the value is **not an object** (e.g. `null`, array, primitive), it is considered empty.
1093
+ * - If `options.checkSymbols` is `true`, **symbol properties** are also checked.
1094
+ * @param {*} value - The value to check.
1095
+ * @param {IsEmptyObjectOptions} [options] - Optional settings.
1096
+ * @param {IsEmptyObjectOptions["checkSymbols"]} [options.checkSymbols=false] - Whether to also check symbol properties.
1097
+ * @returns {boolean} Return `true` if the value is considered empty or not an object, false otherwise.
1098
+ * @example
1099
+ * isEmptyObject({});
1100
+ * // ➔ true
1101
+ * isEmptyObject({}, { checkSymbols: true });
1102
+ * // ➔ true
1103
+ * isEmptyObject({ a: 1 });
1104
+ * // ➔ false
1105
+ * isEmptyObject({ [Symbol('s')]: 1 });
1106
+ * // ➔ true
1107
+ * isEmptyObject({ [Symbol('s')]: 1 }, { checkSymbols: true });
1108
+ * // ➔ false
1109
+ * isEmptyObject(null);
1110
+ * // ➔ true (not object)
1111
+ * isEmptyObject([]);
1112
+ * // ➔ true (not plain object)
1113
+ * isEmptyObject(123);
1114
+ * // ➔ true (not object)
1115
+ */
1116
+ declare function isEmptyObject(value: unknown, options?: IsEmptyObjectOptions): boolean;
1117
+ type IsEmptyStringOptions = {
1118
+ /** Whether to trim the string before checking, defaultValue: `true`.
1119
+ *
1120
+ * @default true */
1121
+ trim?: boolean;
1122
+ };
1123
+ /** ----------------------------------------------------------
1124
+ * * ***Predicate: `isEmptyString`.***
1125
+ * ----------------------------------------------------------
1126
+ * **Checks whether a given value is an **empty-string**.**
1127
+ * - **Behavior:**
1128
+ * - Considers `""` and whitespace-only strings as
1129
+ * empty (if `trim` is enabled, which is the default).
1130
+ * - Non-string inputs are also considered empty.
1131
+ * @param {*} value - The value to check.
1132
+ * @param {IsEmptyStringOptions} [options] - Optional settings.
1133
+ * @param {IsEmptyStringOptions["trim"]} [options.trim=true] - Whether to trim the string before checking, defaultValue: `true`.
1134
+ * @returns {boolean} Returns `true` if the value is string not a string or value string is considered empty.
1135
+ * @example
1136
+ * isEmptyString("");
1137
+ * // ➔ true
1138
+ * isEmptyString(" ");
1139
+ * // ➔ true (default trims)
1140
+ * isEmptyString(" ", { trim: false });
1141
+ * // ➔ false
1142
+ * isEmptyString("hello");
1143
+ * // ➔ false
1144
+ * isEmptyString(undefined);
1145
+ * // ➔ true
1146
+ * isEmptyString(null);
1147
+ * // ➔ true
1148
+ * isEmptyString(123 as any);
1149
+ * // ➔ true
1150
+ *
1151
+ * // Used in validation
1152
+ * if (isEmptyString(form.name)) {
1153
+ * throw new Error("Name cannot be empty.");
1154
+ * }
1155
+ */
1156
+ declare const isEmptyString: (value: unknown, options?: IsEmptyStringOptions) => boolean;
1157
+ type IsEmptyValueOptions = {
1158
+ /** **Whether to check symbol properties when checking empty objects.**
1159
+ * - **DefaultValue:** `false`.
1160
+ *
1161
+ * @default false
1162
+ */
1163
+ checkSymbols?: boolean;
1164
+ };
1165
+ /** ----------------------------------------------------------
1166
+ * * ***Predicate: `isEmptyValue`.***
1167
+ * ----------------------------------------------------------
1168
+ * **Determines if a value is **`empty`**.**
1169
+ * - **Covering:**
1170
+ * - Empty objects: `{}`
1171
+ * - Empty arrays: `[]`
1172
+ * - Empty strings: `""` or whitespace-only (trimmed)
1173
+ * - `null`, `undefined`, `false`, or `NaN`
1174
+ * - **Returns **`false`** for:**
1175
+ * - Non-empty objects/arrays
1176
+ * - Non-empty strings
1177
+ * - Numbers (except `NaN`)
1178
+ * - `Functions`, `true`, `symbols`, `etc`.
1179
+ * @param {*} value - The value to evaluate.
1180
+ * @param {IsEmptyValueOptions} [options] - Optional settings.
1181
+ * @returns {boolean} Return `true` if the value is considered empty, otherwise `false`.
1182
+ * @example
1183
+ * isEmptyValue({});
1184
+ * // ➔ true
1185
+ * isEmptyValue([]);
1186
+ * // ➔ true
1187
+ * isEmptyValue({ key: "value" });
1188
+ * // ➔ false
1189
+ * isEmptyValue({ [Symbol("foo")]: 123 });
1190
+ * // ➔ true (default `checkSymbols` is `false`)
1191
+ * isEmptyValue({ [Symbol("foo")]: 123 }, { checkSymbols: false });
1192
+ * // ➔ true (default `checkSymbols` is `false`)
1193
+ * isEmptyValue({ [Symbol("foo")]: 123 }, { checkSymbols: true });
1194
+ * // ➔ false
1195
+ * isEmptyValue([1, 2, 3]);
1196
+ * // ➔ false
1197
+ * isEmptyValue(NaN);
1198
+ * // ➔ true
1199
+ * isEmptyValue(true);
1200
+ * // ➔ false
1201
+ * isEmptyValue(false);
1202
+ * // ➔ true
1203
+ * isEmptyValue(null);
1204
+ * // ➔ true
1205
+ * isEmptyValue(undefined);
1206
+ * // ➔ true
1207
+ * isEmptyValue("");
1208
+ * // ➔ true
1209
+ * isEmptyValue(" ");
1210
+ * // ➔ true
1211
+ * isEmptyValue(0);
1212
+ * // ➔ false
1213
+ * isEmptyValue(-1);
1214
+ * // ➔ false
1215
+ * isEmptyValue(2);
1216
+ * // ➔ false
1217
+ * isEmptyValue(() => {});
1218
+ * // ➔ false
1219
+ */
1220
+ declare const isEmptyValue: (value: unknown, options?: IsEmptyValueOptions) => boolean;
1221
+ /** ----------------------------------------------------
1222
+ * * ***Predicate: `isEqual`.***
1223
+ * ----------------------------------------------------------
1224
+ * **Performs a deep comparison between two values to determine if they are equivalent.**
1225
+ * @description
1226
+ * Checks whether two values are **deeply equal**, not just reference-equal (`===`).
1227
+ * - **✅ This method compares:**
1228
+ * - Arrays and TypedArrays
1229
+ * - ArrayBuffers
1230
+ * - Plain objects (`Object`) ➔ own enumerable properties only
1231
+ * - Booleans, Numbers, Strings, Symbols
1232
+ * - Dates
1233
+ * - Errors
1234
+ * - Maps
1235
+ * - Sets
1236
+ * - Regular expressions
1237
+ * - ❌ `Functions` and `DOM nodes` are ***not supported***.
1238
+ * @param {*} value The value to compare.
1239
+ * @param {*} other The other value to compare.
1240
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
1241
+ * @example
1242
+ * const obj1 = { user: "fred" };
1243
+ * const obj2 = { user: "fred" };
1244
+ *
1245
+ * isEqual(obj1, obj2);
1246
+ * // ➔ true
1247
+ * obj1 === obj2;
1248
+ * // ➔ false (different references)
1249
+ * isEqual([1, 2, 3], [1, 2, 3]);
1250
+ * // ➔ true
1251
+ * isEqual(new Date("2020-01-01"), new Date("2020-01-01"));
1252
+ * // ➔ true
1253
+ * isEqual(new Set([1, 2]), new Set([2, 1]));
1254
+ * // ➔ true
1255
+ * isEqual(/abc/i, new RegExp("abc", "i"));
1256
+ * // ➔ true
1257
+ * isEqual({ a: 1 }, { a: 1, b: undefined });
1258
+ * // ➔ false
1259
+ */
1260
+ declare function isEqual(value: unknown, other: unknown): boolean;
1261
+ /** -------------------------------------------------------------------
1262
+ * * ***Customizer function for `isEqualWith`.***
1263
+ * -------------------------------------------------------------------
1264
+ * **Allows customizing how two values are compared for deep equality.**
1265
+ * @param value
1266
+ * - The current value being compared.
1267
+ * @param other
1268
+ * - The corresponding value from the other object.
1269
+ * @param indexOrKey
1270
+ * - The property key (for objects) or index (for arrays) of the current value.
1271
+ * @param parent
1272
+ * - The parent object or array containing `value`.
1273
+ * @param otherParent
1274
+ * - The parent object or array containing `other`.
1275
+ * @param stack
1276
+ * - WeakMap or tracking structure for already visited objects to handle circular references.
1277
+ * @returns
1278
+ * - `true` → Treat the values as equal.
1279
+ * - `false` → Treat the values as unequal.
1280
+ * - `undefined` → Fallback to default deep equality comparison.
1281
+ * @example
1282
+ * ```ts
1283
+ * const customizer: CustomizerIsEqualWith = (value, other, key) => {
1284
+ * if (typeof value === "string" && typeof other === "string") {
1285
+ * return value.toLowerCase() === other.toLowerCase();
1286
+ * }
1287
+ * return undefined;
1288
+ * };
1289
+ *
1290
+ * baseDeepEqual({ name: "Alice" }, { name: "alice" }, customizer);
1291
+ * // returns true
1292
+ * ```
1293
+ */
1294
+ type CustomizerIsEqualWith = (/** * ***The current value being compared.*** */
1295
+
1296
+ value: unknown, /** * ***The corresponding value from the other object.*** */
1297
+
1298
+ other: unknown, /** * ***Property key (for objects) or index (for arrays) of the current value.*** */
1299
+
1300
+ indexOrKey: PropertyKey, /** * ***Parent object or array containing `value`.*** */
1301
+
1302
+ parent: unknown, /** * ***Parent object or array containing `other`.*** */
1303
+
1304
+ otherParent: unknown, /** * ***WeakMap or tracking structure for visited objects to handle circular references.*** */
1305
+
1306
+ stack: unknown) => boolean | undefined;
1307
+ /** ----------------------------------------------------
1308
+ * * ***Predicate: `isEqualWith`.***
1309
+ * ----------------------------------------------------
1310
+ * **Performs a deep comparison between two values with support for a
1311
+ * customizer function.**
1312
+ * @description
1313
+ * This method is like ***`isEqual` utility function*** except that it
1314
+ * accepts a `customizer` which is invoked to compare values.
1315
+ * - **Behavior:**
1316
+ * - If `customizer` returns `undefined`, the comparison is handled by
1317
+ * the default deep equality algorithm.
1318
+ * - The `customizer` is invoked with up to six arguments:
1319
+ * - `(value, other, indexOrKey, parent, otherParent, stack)`,
1320
+ * see **{@link CustomizerIsEqualWith | `CustomizerIsEqualWith`}**.
1321
+ * - Supports comparing `arrays`, `objects`, `maps`, `sets`, `dates`,
1322
+ * `regexes`, `typed arrays`, `etc`.
1323
+ * - Functions and DOM nodes are **not** supported.
1324
+ * @param {*} value The value to compare.
1325
+ * @param {*} other The other value to compare.
1326
+ * @param {CustomizerIsEqualWith} [customizer] The function to customize comparisons.
1327
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
1328
+ * @example
1329
+ * function isGreeting(value: unknown) {
1330
+ * return typeof value === "string" && /^h(?:i|ello)$/.test(value);
1331
+ * }
1332
+ *
1333
+ * function customizer(objValue: unknown, othValue: unknown) {
1334
+ * if (isGreeting(objValue) && isGreeting(othValue)) {
1335
+ * return true;
1336
+ * }
1337
+ * }
1338
+ *
1339
+ * const array = ["hello", "goodbye"];
1340
+ * const other = ["hi", "goodbye"];
1341
+ *
1342
+ * isEqualWith(array, other, customizer);
1343
+ * // ➔ true
1344
+ */
1345
+ declare function isEqualWith(value: unknown, other: unknown, customizer?: CustomizerIsEqualWith): boolean;
1346
+ /** ----------------------------------------------------------
1347
+ * * ***Type guard: `isError`.***
1348
+ * ----------------------------------------------------------
1349
+ * **Checks whether the given value is an ****[`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error)** object**.**
1350
+ * - **Behavior:**
1351
+ * - Ensures that the provided value is a valid JavaScript error instance.
1352
+ * - Useful in TypeScript for narrowing types during error handling.
1353
+ * @param {*} error - The value to check.
1354
+ * @returns {boolean} Returns `true` if `value` is instance of **[`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error)**, else `false`.
1355
+ * @example
1356
+ * isError(new Error("Something went wrong"));
1357
+ * // ➔ true
1358
+ * isError("Error message");
1359
+ * // ➔ false
1360
+ * isError(null);
1361
+ * // ➔ false
1362
+ */
1363
+ declare const isError: (error: unknown) => error is Error;
1364
+ /** ----------------------------------------------------------
1365
+ * * ***Type guard: `isFinite`.***
1366
+ * -----------------------------------------------------------
1367
+ * **Checks if a value is a finite primitive number.**
1368
+ * @description
1369
+ * This function verifies that `value` is a **primitive number** and is **finite**
1370
+ * (i.e., not `NaN`, `Infinity`, or `-Infinity`).
1371
+ * - **Behavior:**
1372
+ * - Behaves like
1373
+ * [`Number.isFinite()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isFinite).
1374
+ * - But also works as a **TypeScript type guard**.
1375
+ * @param {*} value - The value to check.
1376
+ * @returns {boolean} Returns `true` if `value` is a finite primitive number, else `false`.
1377
+ * @example
1378
+ * import * as RzlUtilsJs from "@rzl-zone/utils-js/predicates";
1379
+ *
1380
+ * // Strict finite number check (only primitive numbers)
1381
+ * RzlUtilsJs.isFinite(3);
1382
+ * // ➔ true
1383
+ * RzlUtilsJs.isFinite(Number.MIN_VALUE);
1384
+ * // ➔ true
1385
+ * RzlUtilsJs.isFinite("3");
1386
+ * // ➔ false (string is not a number)
1387
+ * RzlUtilsJs.isFinite(NaN);
1388
+ * // ➔ false
1389
+ * RzlUtilsJs.isFinite(Infinity);
1390
+ * // ➔ false
1391
+ * RzlUtilsJs.isFinite(new Number(3));
1392
+ * // ➔ false (Number object is not primitive)
1393
+ *
1394
+ * // Comparison with global isFinite()
1395
+ * isFinite("3");
1396
+ * // ➔ true (global coerces string to number)
1397
+ * isFinite(new Number(3));
1398
+ * // ➔ true (object coerced to primitive number)
1399
+ */
1400
+ declare function isFinite(value: unknown): value is number;
1401
+ /** ----------------------------------------------------------
1402
+ * * ***Type guard: `isFunction`.***
1403
+ * -----------------------------------------------------------
1404
+ * **Checks if a value is a function.**
1405
+ * - **Behavior:**
1406
+ * - Uses `typeof value === "function"` for strict type checking.
1407
+ * - Safe alternative to `Function` type (doesn't trigger ESLint warning).
1408
+ * - Supports TypeScript type narrowing with `value is (...args: any[]) => any`.
1409
+ * @param {*} value - The value to check.
1410
+ * @returns {boolean} Return `true` if the value is a function.
1411
+ * @example
1412
+ * isFunction(() => {});
1413
+ * // ➔ true
1414
+ * isFunction(async () => {});
1415
+ * // ➔ true
1416
+ * isFunction(null);
1417
+ * // ➔ false
1418
+ * isFunction({});
1419
+ * // ➔ false
1420
+ */
1421
+ declare const isFunction: (value: unknown) => value is AnyFunction;
1422
+ /** ----------------------------------------------------
1423
+ * * ***Type guard: `isInfinityNumber`.***
1424
+ * ----------------------------------------------------
1425
+ * **Checks if a value is positive or negative
1426
+ * [`Infinity`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Infinity).**
1427
+ * - **ℹ️ Note:**
1428
+ * - This is stricter than the global `isFinite`,
1429
+ * because it only returns `true` for `Infinity` or `-Infinity`,
1430
+ * not other non-finite values.
1431
+ * @param {*} value The value to check.
1432
+ * @returns {boolean} Returns `true` if `value` is `Infinity` or `-Infinity`, else `false`.
1433
+ * @example
1434
+ * import * as RzlUtilsJs from "@rzl-zone/utils-js/predicates";
1435
+ *
1436
+ * RzlUtilsJs.isInfinityNumber(Infinity);
1437
+ * // ➔ true
1438
+ * RzlUtilsJs.isInfinityNumber(-Infinity);
1439
+ * // ➔ true
1440
+ * RzlUtilsJs.isInfinityNumber(new Number(Infinity));
1441
+ * // ➔ true
1442
+ * RzlUtilsJs.isInfinityNumber(NaN);
1443
+ * // ➔ false
1444
+ * RzlUtilsJs.isInfinityNumber(123);
1445
+ * // ➔ false
1446
+ */
1447
+ declare function isInfinityNumber(value: unknown): boolean;
1448
+ /** ---------------------------------------------------------
1449
+ * * ***Type guard: `isInteger`.***
1450
+ * ----------------------------------------------------------
1451
+ * **Checks if a value is an integer number.**
1452
+ * - **ℹ️ Note:**
1453
+ * - This method is based on
1454
+ * [`Number.isInteger`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger).
1455
+ * @param {*} value The value to check.
1456
+ * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
1457
+ * @example
1458
+ * isInteger(3);
1459
+ * // ➔ true
1460
+ * isInteger(Number.MIN_VALUE);
1461
+ * // ➔ false
1462
+ * isInteger(NaN);
1463
+ * // ➔ false
1464
+ * isInteger(Infinity);
1465
+ * // ➔ false
1466
+ * isInteger(-Infinity);
1467
+ * // ➔ false
1468
+ * isInteger('3');
1469
+ * // ➔ false
1470
+ */
1471
+ declare function isInteger(value: unknown): value is number;
1472
+ /** ----------------------------------------
1473
+ * * ***Predicate: `isLength`.***
1474
+ * ----------------------------------------------------------
1475
+ * **Checks whether the given value is a **valid array-like length**.**
1476
+ * - **Behavior:**
1477
+ * - ✅ Ensures the value is a **non-negative integer**.
1478
+ * - ✅ Ensures the value is **not greater than `Number.MAX_SAFE_INTEGER`**.
1479
+ * - ❌ Excludes non-numeric values, `Infinity`, and fractional numbers.
1480
+ * - **ℹ️ Note:**
1481
+ * - This method is loosely based-on
1482
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
1483
+ * - A valid length must be a non-negative integer and **not greater
1484
+ * than `Number.MAX_SAFE_INTEGER`**.
1485
+ * @param {*} value The value to check.
1486
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
1487
+ * @example
1488
+ * isLength(3);
1489
+ * // ➔ true
1490
+ * isLength(Number.MAX_SAFE_INTEGER);
1491
+ * // ➔ true
1492
+ * isLength(Number.MAX_SAFE_INTEGER + 1);
1493
+ * // ➔ false
1494
+ * isLength("3");
1495
+ * // ➔ false
1496
+ * isLength(-1);
1497
+ * // ➔ false
1498
+ * isLength(3.14);
1499
+ * // ➔ false
1500
+ * isLength(Infinity);
1501
+ * // ➔ false
1502
+ * isLength(-Infinity);
1503
+ * // ➔ false
1504
+ * isLength(Number.MIN_VALUE);
1505
+ * // ➔ false
1506
+ */
1507
+ declare function isLength(value: unknown): boolean;
1508
+ /** --------------------------------------------------
1509
+ * * ***Type guard: `isMap`.***
1510
+ * ----------------------------------------------------------
1511
+ * **Checks whether the given value is a **[`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) object**.**
1512
+ * - **Behavior:**
1513
+ * - Ensures that the provided value is an instance of **[`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map)**.
1514
+ * - Useful in TypeScript for narrowing types when working with collections.
1515
+ * @param {*} value The value to check.
1516
+ * @returns {boolean} Returns `true` if `value` is instance of **[`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map)**, else `false`.
1517
+ * @example
1518
+ * isMap(new Map());
1519
+ * // ➔ true
1520
+ * isMap(new WeakMap());
1521
+ * // ➔ false
1522
+ * isMap({});
1523
+ * // ➔ false
1524
+ */
1525
+ declare function isMap<K = unknown, V = unknown>(value: Map<K, V>): value is Map<K, V>;
1526
+ declare function isMap(value: unknown): value is Map<unknown, unknown>;
1527
+ /** ----------------------------------------------------
1528
+ * * ***Predicate: `isMatch`.***
1529
+ * ----------------------------------------------------
1530
+ * **Performs a partial deep comparison between `object` and `source`.**
1531
+ * @description
1532
+ * Determines whether `object` contains equivalent property values from `source`.
1533
+ * - **Behavior:**
1534
+ * - ✅ Returns `true` if **all properties** in `source` exist in `object` and are deeply equal.
1535
+ * - ❌ Does **not** require `object` and `source` to be the same shape—`object` may have extra properties.
1536
+ * - ⚠️ Arrays are treated as objects: only matching indexed keys are compared.
1537
+ * - **Remarks:**
1538
+ * - This is functionally equivalent to a partially applied `matches(source)` predicate.
1539
+ * - Special cases:
1540
+ * - An empty array (`[]`) in `source` matches any array in `object`.
1541
+ * - An empty object (`{}`) in `source` matches any object in `object`.
1542
+ * @param {object} object - The object to inspect.
1543
+ * @param {object} source - The object containing property values to match.
1544
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.
1545
+ * @example
1546
+ * const object = { a: 1, b: 2 };
1547
+ *
1548
+ * isMatch(object, { b: 2 });
1549
+ * // ➔ true
1550
+ * isMatch(object, { b: 1 });
1551
+ * // ➔ false
1552
+ * isMatch([1, 2, 3], [1, 2]);
1553
+ * // ➔ true (treats arrays as objects with index keys)
1554
+ */
1555
+ declare function isMatch(object: object, source: object): boolean;
1556
+ /** -------------------------------------------------------------------
1557
+ * * ***Customizer function for `isMatchWith`.***
1558
+ * -------------------------------------------------------------------
1559
+ * **Allows customizing how two values are compared for partial/object match.**
1560
+ * @param value
1561
+ * - The current value from the object being tested.
1562
+ * @param other
1563
+ * - The corresponding value from the source object.
1564
+ * @param indexOrKey
1565
+ * - The property key (for objects) or index (for arrays) of the current value.
1566
+ * @param object
1567
+ * - The parent object containing `value`.
1568
+ * @param source
1569
+ * - The parent source object containing `other`.
1570
+ * @returns
1571
+ * - `true` → Treat the values as matching.
1572
+ * - `false` → Treat the values as not matching.
1573
+ * - `undefined` → Fallback to default match comparison.
1574
+ * @example
1575
+ * ```ts
1576
+ * const customizer: CustomizerIsMatchWith = (value, other) => {
1577
+ * if (typeof value === "string" && typeof other === "string") {
1578
+ * return value.toLowerCase() === other.toLowerCase();
1579
+ * }
1580
+ * return undefined;
1581
+ * };
1582
+ *
1583
+ * baseIsMatch({ name: "Alice" }, { name: "alice" }, customizer);
1584
+ * // returns true
1585
+ * ```
1586
+ */
1587
+ type CustomizerIsMatchWith = (/** * ***Current value from the object being tested.*** */
1588
+
1589
+ value: unknown, /** * ***Corresponding value from the source object.*** */
1590
+
1591
+ other: unknown, /** * ***Property key (objects) or index (arrays) of the current value.*** */
1592
+
1593
+ indexOrKey: PropertyKey, /** * ***Parent object containing `value`.*** */
1594
+
1595
+ object: object, /** * ***Parent source object containing `other`.*** */
1596
+
1597
+ source: object) => boolean | undefined;
1598
+ /** ----------------------------------------------------
1599
+ * * ***Predicate: `isMatchWith`.***
1600
+ * ----------------------------------------------------
1601
+ * **Performs a partial deep comparison between `object` and `source`, like `isMatch`, but with a `customizer` function to control comparisons.**
1602
+ * @description
1603
+ * If `customizer` returns a value other than `undefined`, that value is used
1604
+ * as the result of the comparison for the current property. Otherwise,
1605
+ * the comparison falls back to the default deep equality logic.
1606
+ * - **Behavior:**
1607
+ * - The `customizer` function is invoked with up to **five** arguments:
1608
+ * - `(objValue, srcValue, keyOrIndex, object, source)`,
1609
+ * see **{@link CustomizerIsMatchWith | `CustomizerIsMatchWith`}**.
1610
+ * - Returning `true` from `customizer` will short-circuit further comparison
1611
+ * for that key.
1612
+ * - Returning `false` will cause `isMatchWith` to return `false` immediately.
1613
+ * - Returning `undefined` allows default comparison to proceed.
1614
+ * @param {object} value - The object to inspect.
1615
+ * @param {object} other - The object of property values to match.
1616
+ * @param {CustomizerIsMatchWith} [customizer] - The function to customize comparisons.
1617
+ * @returns Returns `true` if `object` is a match, else `false`.
1618
+ * @example
1619
+ * function isGreeting(value: unknown) {
1620
+ * return typeof value === 'string' && /^h(?:i|ello)$/.test(value);
1621
+ * }
1622
+ *
1623
+ * function customizer(objValue: unknown, srcValue: unknown) {
1624
+ * if (isGreeting(objValue) && isGreeting(srcValue)) {
1625
+ * return true;
1626
+ * }
1627
+ * }
1628
+ *
1629
+ * const object = { greeting: 'hello' };
1630
+ * const source = { greeting: 'hi' };
1631
+ *
1632
+ * isMatchWith(object, source, customizer);
1633
+ * // ➔ true
1634
+ */
1635
+ declare function isMatchWith(value: object, other: object, customizer?: CustomizerIsMatchWith): boolean;
1636
+ /** ----------------------------------------------------
1637
+ * * ***Type guard: `isNaN`.***
1638
+ * ----------------------------------------------------
1639
+ * **Checks if a value is [`NaN`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN).**
1640
+ * - **ℹ️ Note:**
1641
+ * - This method is based on
1642
+ * [`Number.isNaN`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN)
1643
+ * and is **not** the same as the global
1644
+ * [`isNaN`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/isNaN),
1645
+ * which returns `true` for `undefined` and other non-number values.
1646
+ * @param {*} value The value to check.
1647
+ * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
1648
+ * @example
1649
+ * import * as RzlUtilsJs from "@rzl-zone/utils-js/predicates";
1650
+ *
1651
+ * RzlUtilsJs.isNaN(NaN);
1652
+ * // ➔ true
1653
+ * RzlUtilsJs.isNaN(new Number(NaN));
1654
+ * // ➔ true
1655
+ * RzlUtilsJs.isNaN(undefined);
1656
+ * // ➔ false
1657
+ *
1658
+ * // This global isNaN:
1659
+ * isNaN(undefined);
1660
+ * // ➔ true
1661
+ */
1662
+ declare function isNaN(value: unknown): boolean;
1663
+ /** ----------------------------------------------------
1664
+ * * ***Type guard: `isNative`.***
1665
+ * ----------------------------------------------------------
1666
+ * **Checks if a value is a **pristine native function**.**
1667
+ * - **ℹ️ Note:**
1668
+ * - This method may not reliably detect native functions when using packages
1669
+ * like `core-js`, as they override native behavior.
1670
+ * - Attempts to detect native functions in such environments may fail or
1671
+ * throw errors.
1672
+ * - This also affects packages like
1673
+ * **[`babel-polyfill`](https://www.npmjs.com/package/babel-polyfill).**
1674
+ * @param {*} value The value to check.
1675
+ * @returns {boolean} Returns `true` if `value` is a native function, else `false`.
1676
+ * @example
1677
+ * isNative(Array.prototype.push);
1678
+ * // ➔ true
1679
+ *
1680
+ * import * as RzlUtilsJs from "@rzl-zone/utils-js/predicates";
1681
+ * isNative(RzlUtilsJs);
1682
+ * // ➔ false
1683
+ */
1684
+ declare function isNative(value: unknown): value is AnyFunction;
1685
+ /** ----------------------------------------------------
1686
+ * * ***Type guard: `isNil`.***
1687
+ * ----------------------------------------------------------
1688
+ * **Checks if a value is **[`null`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/null)** or **[`undefined`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined)**.**
1689
+ * - **Behavior:**
1690
+ * - Narrows type to `null` or `undefined` when true.
1691
+ * @param {*} value - The value to check.
1692
+ * @returns {boolean} Returns `true` if the value is `null` or `undefined`, otherwise `false`.
1693
+ * @example
1694
+ * isNil(null);
1695
+ * // ➔ true
1696
+ * isNil(undefined);
1697
+ * // ➔ true
1698
+ * isNil(void 0);
1699
+ * // ➔ true
1700
+ * isNil(NaN);
1701
+ * // ➔ false
1702
+ */
1703
+ declare function isNil(value: unknown): value is null | undefined;
1704
+ /** ----------------------------------------------------------
1705
+ * * ***Type guard: `isNonEmptyArray`.***
1706
+ * ----------------------------------------------------------
1707
+ * **Checks if a value is a **non-empty array**.**
1708
+ * - **Behavior:**
1709
+ * - Ensures the value is an actual array using **[`Array.isArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray)**.
1710
+ * - Ensures the array contains at least one item.
1711
+ * - Narrows type to `T[]` (non-empty array) when true.
1712
+ * @template T - The type of the value being checked.
1713
+ * @param {*} value - The value to check.
1714
+ * @returns {boolean} Return `true` if value is a non-empty array.
1715
+ * @example
1716
+ * isNonEmptyArray([1, 2, 3]); // ➔ true
1717
+ * isNonEmptyArray([]); // ➔ false
1718
+ * isNonEmptyArray(null); // ➔ false
1719
+ * isNonEmptyArray("test"); // ➔ false
1720
+ */
1721
+ declare function isNonEmptyArray(value: []): value is [];
1722
+ declare function isNonEmptyArray<T>(value: T): value is ArrayFallback<T>;
1723
+ declare function isNonEmptyArray(value: unknown): value is unknown[];
1724
+ type IsNonEmptyStringOptions = {
1725
+ /** Whether to trim the string before checking, defaultValue: `true`.
1726
+ *
1727
+ * @default true */
1728
+ trim?: boolean;
1729
+ };
1730
+ /** ----------------------------------------------------------
1731
+ * * ***Type guard: `isNonEmptyString`.***
1732
+ * ----------------------------------------------------------
1733
+ * **Checks if a value is a **non-empty string**.**
1734
+ * @description
1735
+ * Determines whether the given `value` is a string containing at least one non-whitespace character, with optional trimming behavior.
1736
+ * - **Behavior:**
1737
+ * - Ensures the value is a string using ***`isString` utility function***.
1738
+ * - Optionally trims whitespace before checking (`trim` defaults to `true`).
1739
+ * - Narrows type to `string` when true.
1740
+ * @param {*} value - The value to test.
1741
+ * @param {IsNonEmptyStringOptions} [options] - Optional settings.
1742
+ * @param {boolean} options.trim - If `true`, trims the string before checking, defaults: `true`.
1743
+ * @returns {boolean} Return `true` if `value` is a non-empty string, otherwise `false`.
1744
+ * @example
1745
+ * isNonEmptyString("hello");
1746
+ * // ➔ true
1747
+ * isNonEmptyString(" ", { trim: true });
1748
+ * // ➔ false
1749
+ * isNonEmptyString(" ", { trim: false });
1750
+ * // ➔ true
1751
+ * isNonEmptyString("");
1752
+ * // ➔ false
1753
+ * isNonEmptyString(123);
1754
+ * // ➔ false
1755
+ * isNonEmptyString(undefined);
1756
+ * // ➔ false
1757
+ * isNonEmptyString(null);
1758
+ * // ➔ false
1759
+ * isNonEmptyString({});
1760
+ * // ➔ false
1761
+ * isNonEmptyString([]);
1762
+ * // ➔ false
1763
+ */
1764
+ declare const isNonEmptyString: (value: unknown, options?: IsNonEmptyStringOptions) => value is string;
1765
+ type IsNonEmptyValueOptions = {
1766
+ /** Whether to check symbol properties when checking empty objects, default: `false`.
1767
+ *
1768
+ * @default false
1769
+ */
1770
+ checkSymbols?: boolean;
1771
+ };
1772
+ /** ----------------------------------------------------------
1773
+ * * ***Predicated: `isNonEmptyValue`.***
1774
+ * ----------------------------------------------------------
1775
+ * **Determines if a value is a **non-empty** object (`{}` with props), **non-empty** array (`[]` with items) or generally truthy.**
1776
+ * - **Behavior:**
1777
+ * - Returns `true` for:
1778
+ * - Objects **with properties**
1779
+ * - Arrays **with items**
1780
+ * - Non-empty, non-whitespace strings
1781
+ * - Numbers (except `NaN`, includes `0`)
1782
+ * - Functions
1783
+ * - `true`
1784
+ * - Returns `false` for:
1785
+ * - Empty objects (`{}`)
1786
+ * - Empty arrays (`[]`)
1787
+ * - `null` or `undefined`
1788
+ * - Empty strings (`""`) or whitespace-only strings (`" "`)
1789
+ * - `false`
1790
+ * - `NaN`
1791
+ * - Safely handles `null`, `undefined`, and non-object types without throwing.
1792
+ * @param {*} value - The value to evaluate.
1793
+ * @param {IsNonEmptyValueOptions} [options] - Optional settings.
1794
+ * @returns {boolean} Return `true` if the value is considered non-empty/truthy, otherwise `false`.
1795
+ * @example
1796
+ * isNonEmptyValue({});
1797
+ * // ➔ false
1798
+ * isNonEmptyValue([]);
1799
+ * // ➔ false
1800
+ * isNonEmptyValue({ key: "value" });
1801
+ * // ➔ true
1802
+ * isNonEmptyValue({ [Symbol("foo")]: 123 });
1803
+ * // ➔ false (default `checkSymbols` is `false`)
1804
+ * isNonEmptyValue({ [Symbol("foo")]: 123 }, { checkSymbols: false });
1805
+ * // ➔ false (default `checkSymbols` is `false`)
1806
+ * isNonEmptyValue({ [Symbol("foo")]: 123 }, { checkSymbols: true });
1807
+ * // ➔ true
1808
+ * isNonEmptyValue([1, 2, 3]);
1809
+ * // ➔ true
1810
+ * isNonEmptyValue(NaN);
1811
+ * // ➔ false
1812
+ * isNonEmptyValue(true);
1813
+ * // ➔ true
1814
+ * isNonEmptyValue(false);
1815
+ * // ➔ false
1816
+ * isNonEmptyValue(null);
1817
+ * // ➔ false
1818
+ * isNonEmptyValue(undefined);
1819
+ * // ➔ false
1820
+ * isNonEmptyValue("");
1821
+ * // ➔ false
1822
+ * isNonEmptyValue(" ");
1823
+ * // ➔ false
1824
+ * isNonEmptyValue(0);
1825
+ * // ➔ true
1826
+ * isNonEmptyValue(-1);
1827
+ * // ➔ true
1828
+ * isNonEmptyValue(2);
1829
+ * // ➔ true
1830
+ * isNonEmptyValue(() => {});
1831
+ * // ➔ true
1832
+ */
1833
+ declare const isNonEmptyValue: (value: unknown, options?: IsNonEmptyValueOptions) => boolean;
1834
+ /** ---------------------------------------------------------
1835
+ * * ***Type guard: `isNull`.***
1836
+ * ----------------------------------------------------------
1837
+ * **Checks if a value is **[`null`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/null)**.**
1838
+ * - **Behavior:**
1839
+ * - Narrows type to `null` when true.
1840
+ * - Strictly compares the value against `null`.
1841
+ * @param {*} val - The value to check.
1842
+ * @returns {boolean} Returns `true` if the value is `null`, otherwise `false`.
1843
+ * @example
1844
+ * isNull(null); // ➔ true
1845
+ * isNull(0); // ➔ false
1846
+ * isNull(undefined); // ➔ false
1847
+ */
1848
+ declare const isNull: (val: unknown) => val is null;
1849
+ /** ----------------------------------------------------
1850
+ * * ***Type guard: `isNumberObject`.***
1851
+ * ----------------------------------------------------
1852
+ * **Checks if a value is a **`Number` object wrapper**
1853
+ * (`new Number(...)`), not a primitive number.**
1854
+ * @param {*} value The value to check.
1855
+ * @returns {boolean} Returns `true` if `value` is a `Number` object.
1856
+ * @example
1857
+ * isNumberObject(new Number(42));
1858
+ * // ➔ true
1859
+ * isNumberObject(42);
1860
+ * // ➔ false
1861
+ */
1862
+ declare function isNumberObject(value: unknown): value is Number;
1863
+ type IsObject<T> = unknown extends T ? T & Record<PropertyKey, unknown> : T extends object ? T extends AnObjectNonArray ? T : IsHasKeysObject<T> extends false ? T & Record<PropertyKey, unknown> : IsArray<T> extends true ? Exclude<T, unknown[]> : T : never;
1864
+ /** ---------------------------------------------------------
1865
+ * * ***Type guard: `isObject`.***
1866
+ * ----------------------------------------------------------
1867
+ * **Checks if a value is an **object** (excluding `null` and `arrays`).**
1868
+ * - **✅ Returns `true` for any non-null object (arrays excluded), including:**
1869
+ * - Plain-objects (`{}`, `Object.create(null)`)
1870
+ * - Custom class instances
1871
+ * - Built-ins: `Date`, `RegExp`, `Error`, `URL`, `URLSearchParams`
1872
+ * - Collections: `Map`, `Set`, `WeakMap`, `WeakSet`
1873
+ * - Binary/typed data: `ArrayBuffer`, `DataView`, typed arrays (`Uint8Array`, `Int32Array`, etc.)
1874
+ * - DOM/Node objects: `HTMLElement`, `DocumentFragment`, etc.
1875
+ * - Proxies (wrapping any object type)
1876
+ * - **❌ Returns `false` for:**
1877
+ * - `null`
1878
+ * - Arrays (`[]`, `new Array()`)
1879
+ * - Functions (regular functions, arrow functions, class constructors)
1880
+ * - Primitives: `string`, `number`, `boolean`, `symbol`, `bigint`
1881
+ * - Boxed primitives: `new String()`, `new Number()`, `new Boolean()`
1882
+ * - `undefined` (including `NaN`, which is a primitive number)
1883
+ * - **ℹ️ Note:**
1884
+ * - If you specifically need to check for ***plain-objects*** only, use ***`isPlainObject` utility function*** instead.
1885
+ * - If you specifically need to check for ***object***, ***plain-objects***, and include ***array***, use ***`isObjectOrArray` utility function*** instead.
1886
+ * @template T - The type of the value being checked.
1887
+ * @param {*} value - The value to check.
1888
+ * @returns {boolean} Returns `true` if the value is a ***plain-objects***, otherwise `false`.
1889
+ * @example
1890
+ * isObject({}); // ➔ true
1891
+ * isObject(Object.create(null)); // ➔ true
1892
+ * isObject(new Date()); // ➔ true
1893
+ * isObject(new Map()); // ➔ true
1894
+ * isObject(new Uint8Array()); // ➔ true
1895
+ * isObject(new String("x")); // ➔ true
1896
+ * isObject([]); // ➔ false
1897
+ * isObject(null); // ➔ false
1898
+ * isObject(undefined); // ➔ false
1899
+ * isObject(123); // ➔ false
1900
+ * isObject(() => {}); // ➔ false
1901
+ */
1902
+ declare function isObject<T extends object>(value: T): value is IsObject<T>;
1903
+ declare function isObject(value: unknown): value is Record<PropertyKey, unknown>;
1904
+ /** ----------------------------------------------------------
1905
+ * * ***Type guard: `isObjectLoose`.***
1906
+ * ----------------------------------------------------------
1907
+ * **Checks if a value is the
1908
+ * [ECMAScript language type ***Object***](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types).**
1909
+ * - **✅ Returns `true` for:**
1910
+ * - Plain objects (`{}`)
1911
+ * - Arrays (`[]`)
1912
+ * - Functions
1913
+ * - Regexes (`/abc/`)
1914
+ * - Boxed primitives:
1915
+ * - `new Number(0)`
1916
+ * - `new String("")`
1917
+ * - `new Boolean(false)`
1918
+ * - **❌ Returns `false` for:**
1919
+ * - `null`
1920
+ * - `undefined`
1921
+ * - Primitives:
1922
+ * - `string`
1923
+ * - `number`
1924
+ * - `boolean`
1925
+ * - `symbol`
1926
+ * - `bigint`
1927
+ * - **ℹ️ Note:**
1928
+ * - **For More Strict Object Use ***`isObject`*** or ***`isPlainObject` utility function*** instead.**
1929
+ * @template T - The type of the value being checked.
1930
+ * @param {*} value The value to check.
1931
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
1932
+ * @example
1933
+ * isObjectLoose({});
1934
+ * // ➔ true
1935
+ * isObjectLoose([1, 2, 3]);
1936
+ * // ➔ true
1937
+ * isObjectLoose(()=> {});
1938
+ * // ➔ true
1939
+ * isObjectLoose(null);
1940
+ * // ➔ false
1941
+ * isObjectLoose(undefined);
1942
+ * // ➔ false
1943
+ */
1944
+ declare function isObjectLoose<T = object>(value: unknown): value is T;
1945
+ type IsObjectOrArray<T> = OrArr<[IsNever<T>, Extends<T, Record<PropertyKey, unknown>>, Extends<unknown, T>]> extends true ? T & Record<PropertyKey, unknown> & unknown[] : T extends object ? T extends unknown[] ? T : T extends AnObjectNonArray ? T : IsHasKeysObject<T> extends false ? T & Record<PropertyKey, unknown> : T : Extract<T, Record<PropertyKey, unknown> & unknown[]>;
1946
+ /** ---------------------------------------------------------
1947
+ * * ***Type guard: `isObjectOrArray`.***
1948
+ * ----------------------------------------------------------
1949
+ * **Checks if a value is an **object** or an **array**.**
1950
+ * - **✅ Returns `true` for:**
1951
+ * - Plain objects (`{}`, `Object.create(null)`)
1952
+ * - Custom objects
1953
+ * - Arrays (`[]`, `[1,2,3]`)
1954
+ * - **❌ Returns `false` for:**
1955
+ * - `null`
1956
+ * - `undefined`
1957
+ * - Primitives:
1958
+ * - `string`
1959
+ * - `number`
1960
+ * - `boolean`
1961
+ * - `symbol`
1962
+ * - `bigint`
1963
+ * - Functions
1964
+ * @template T - The type of the value being checked.
1965
+ * @param {*} value - The value to check.
1966
+ * @returns {boolean} Returns `true` if the value is an `object` or `array`.
1967
+ * @example
1968
+ * isObjectOrArray([1,2,3]); // ➔ true
1969
+ * isObjectOrArray({ name: "Alice" }); // ➔ true
1970
+ * isObjectOrArray(null); // ➔ false
1971
+ * isObjectOrArray(undefined); // ➔ false
1972
+ * isObjectOrArray("hello"); // ➔ false
1973
+ */
1974
+ declare function isObjectOrArray(value: []): value is [];
1975
+ declare function isObjectOrArray<T>(value: T): value is IsObjectOrArray<T>;
1976
+ /** ----------------------------------------------------------
1977
+ * * ***Type guard: `PropertyKey`.***
1978
+ * ----------------------------------------------------------
1979
+ * **Checks if a value is a valid `PropertyKey`.**
1980
+ * - **In JavaScript/TypeScript, a **`PropertyKey`** is any of:**
1981
+ * - **`string`**
1982
+ * - **`number`**
1983
+ * - **`symbol`**
1984
+ * - **This function ensures the given `value` is one of these types.**
1985
+ * - Narrows type to {@link PropertyKey | ***`PropertyKey`***} when true.
1986
+ * - Useful for working with dynamic object keys.
1987
+ * - Strictly rejects `null`, `undefined`, `boolean`, `object`, `function`, etc.
1988
+ * @param {*} value - The value to check.
1989
+ * @returns {boolean} Return `true` if `value` is a valid property key, otherwise `false`.
1990
+ * @example
1991
+ * isPropertyKey("foo");
1992
+ * // ➔ true
1993
+ * isPropertyKey(123);
1994
+ * // ➔ true
1995
+ * isPropertyKey(Symbol("id"));
1996
+ * // ➔ true
1997
+ * isPropertyKey({});
1998
+ * // ➔ false
1999
+ * isPropertyKey(null);
2000
+ * // ➔ false
2001
+ */
2002
+ declare function isPropertyKey(value: unknown): value is PropertyKey;
2003
+ /** ----------------------------------------------------------
2004
+ * * ***Type guard: `isRegExp`.***
2005
+ * ----------------------------------------------------------
2006
+ * **Checks if a value is a [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) instance.**
2007
+ * @param {*} value - The value to check.
2008
+ * @returns {boolean} Return `true` if value is an instance of **`RegExp`**.
2009
+ * @example
2010
+ * isRegExp(/abc/); // ➔ true
2011
+ * isRegExp(new RegExp("abc")); // ➔ true
2012
+ * isRegExp("abc"); // ➔ false
2013
+ */
2014
+ declare const isRegExp: (value: unknown) => value is RegExp;
2015
+ /** --------------------------------------------------
2016
+ * * ***Type guard: `isSafeInteger`.***
2017
+ * --------------------------------------------------
2018
+ * **Checks if `value` is a **[`Safe-Integer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger)**.**
2019
+ * - **Behavior:**
2020
+ * - Narrows type to `number` when true.
2021
+ * - **An integer is considered *safe* if:**
2022
+ * - It is an `IEEE-754` **double precision number**.
2023
+ * - It can be exactly represented without rounding errors.
2024
+ * - It lies within the range **-(2^53 - 1) to 2^53 - 1**.
2025
+ * - **Note:**
2026
+ * - This method is based on **{@link Number.isSafeInteger | `Number.isSafeInteger`}**.
2027
+ * @param {*} value - The value to check.
2028
+ * @returns {boolean} Return `true` if `value` is a safe integer, otherwise `false`.
2029
+ * @example
2030
+ * isSafeInteger(3);
2031
+ * // ➔ true
2032
+ * isSafeInteger(Number.MIN_VALUE);
2033
+ * // ➔ false
2034
+ * isSafeInteger(Infinity);
2035
+ * // ➔ false
2036
+ * isSafeInteger('3');
2037
+ * // ➔ false
2038
+ */
2039
+ declare function isSafeInteger(value: unknown): value is number;
2040
+ /** ---------------------------------------------------------
2041
+ * * ***Environment Predicate: `isServer`.***
2042
+ * ---------------------------------------------------------
2043
+ * **Detects whether the current code is executing in a
2044
+ * **non-browser JavaScript runtime** (server-side) rather
2045
+ * than in a web browser.**
2046
+ * @description
2047
+ * It simply checks for the absence of key browser globals like
2048
+ * [**`window`**](https://developer.mozilla.org/docs/Web/API/Window/window) and
2049
+ * [**`document`**](https://developer.mozilla.org/docs/Web/API/Window/document).
2050
+ * - *If those globals aren’t present, we treat the runtime as a server environment.*
2051
+ * @returns {boolean}
2052
+ * * ***true** – Code is executing on the `server`.*
2053
+ * * ***false** – Code is executing in a `browser`.*
2054
+ * @example
2055
+ * if (isServer()) {
2056
+ * console.log("Running on a server-side runtime");
2057
+ * } else {
2058
+ * console.log("Running in a browser");
2059
+ * }
2060
+ */
2061
+ declare const isServer: () => boolean;
2062
+ /** ---------------------------------------------------------
2063
+ * * ***Type guard: `isSet`.***
2064
+ * ----------------------------------------------------------
2065
+ * **Checks if a value is a **[`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/Set)** object.**
2066
+ * - **Behavior:**
2067
+ * - Narrows type to `Set<T>` when true.
2068
+ * - Excludes `WeakSet`, arrays, plain objects, and other non-Set values.
2069
+ * @template T - The type of the value being checked.
2070
+ * @param {*} value - The value to check.
2071
+ * @returns {boolean} Returns `true` if the value is a `Set`, otherwise `false`.
2072
+ * @example
2073
+ * isSet(new Set);
2074
+ * // ➔ true
2075
+ * isSet(new WeakSet);
2076
+ * // ➔ false
2077
+ */
2078
+ declare function isSet<T = unknown>(value: Set<T>): value is Set<T>;
2079
+ declare function isSet(value: unknown): value is Set<unknown>;
2080
+ /** ---------------------------------------------------------
2081
+ * * ***Type guard: `isString`.***
2082
+ * ----------------------------------------------------------
2083
+ * **Checks if a value is of type
2084
+ * **[`string`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)**.**
2085
+ * - **Behavior:**
2086
+ * - Narrows type to `string` when true.
2087
+ * - Uses the `typeof` operator for strict checking.
2088
+ * @param {*} value - The value to check.
2089
+ * @returns {boolean} Returns `true` if the value is a string, otherwise `false`.
2090
+ * @example
2091
+ * isString("hello"); // ➔ true
2092
+ * isString(123); // ➔ false
2093
+ *
2094
+ * // Usage in type narrowing
2095
+ * const value: unknown = getValue();
2096
+ * if (isString(value)) {
2097
+ * // TypeScript now knows `value` is a string
2098
+ * console.log(value.toUpperCase());
2099
+ * }
2100
+ */
2101
+ declare const isString: (value: unknown) => value is string;
2102
+ /** ----------------------------------------------------
2103
+ * * ***Type guard: `isStringObject`.***
2104
+ * ----------------------------------------------------
2105
+ * **Checks if a value is a **`String` object wrapper**
2106
+ * (`new String(...)`), not a primitive string.**
2107
+ * @param {*} value The value to check.
2108
+ * @returns {boolean} Returns `true` if `value` is a `String` object.
2109
+ * @example
2110
+ * isStringObject(new String("hello"));
2111
+ * // ➔ true
2112
+ * isStringObject("hello");
2113
+ * // ➔ false
2114
+ */
2115
+ declare function isStringObject(value: unknown): value is String;
2116
+ /** ----------------------------------------------------------
2117
+ * * ***Type guard: `isSymbol`.***
2118
+ * ----------------------------------------------------------
2119
+ * **Checks if a value is of type
2120
+ * **[`symbol`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/Symbol)**.**
2121
+ * - **Behavior:**
2122
+ * - Narrows type to `symbol` when true.
2123
+ * - Uses the `typeof` operator for strict checking.
2124
+ * @param {*} value - The value to check.
2125
+ * @returns {boolean} Returns `true` if the value is a symbol, otherwise `false`.
2126
+ * @example
2127
+ * isSymbol(Symbol("id")); // ➔ true
2128
+ * isSymbol("not a symbol"); // ➔ false
2129
+ * isSymbol(123); // ➔ false
2130
+ * isSymbol(undefined); // ➔ false
2131
+ */
2132
+ declare const isSymbol: (value: unknown) => value is symbol;
2133
+ /** --------------------------------------------------
2134
+ * * ***Type guard: `isTypedArray`.***
2135
+ * ----------------------------------------------------------
2136
+ * **Checks if `value` is classified as a
2137
+ * **[`TypedArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray)**.**
2138
+ * - **Behavior:**
2139
+ * - Validates that `value` is a non-null object.
2140
+ * - Uses `Object.prototype.toString` tag matching against known typed array tags.
2141
+ * - Narrows type to **{@link TypedArray | `TypedArray`}** when true.
2142
+ * @param {*} value - The value to check.
2143
+ * @returns {boolean} Returns `true` if the value is a typed array, otherwise `false`.
2144
+ * @example
2145
+ * isTypedArray(new Uint8Array); // ➔ true
2146
+ * isTypedArray(new Uint8Array()); // ➔ true
2147
+ * isTypedArray(new Float32Array()); // ➔ true
2148
+ * isTypedArray(new Uint8ClampedArray()); // ➔ true
2149
+ * isTypedArray([]); // ➔ false
2150
+ * isTypedArray(Buffer.from("hi")); // ➔ false
2151
+ */
2152
+ declare function isTypedArray(value: unknown): value is TypedArray;
2153
+ /** ---------------------------------------------------------
2154
+ * * ***Type guard: `isURL`.***
2155
+ * ----------------------------------------------------------
2156
+ * **Checks if a value is an instance of the
2157
+ * **[`URL`](https://developer.mozilla.org/docs/Web/API/URL)** class.**
2158
+ * - **Behavior:**
2159
+ * - Narrows type to `URL` when true.
2160
+ * - Excludes `strings`, `plain-objects`, and `other non-URL values`.
2161
+ * @param {*} value - The value to check.
2162
+ * @returns {boolean} Returns `true` if the value is an instance of `URL`, otherwise `false`.
2163
+ * @example
2164
+ * isURL(new URL("https://example.com"));
2165
+ * // ➔ true
2166
+ * isURL("https://example.com");
2167
+ * // ➔ false
2168
+ */
2169
+ declare const isURL: (value: unknown) => value is URL;
2170
+ /** ---------------------------------------------------------
2171
+ * * ***Type guard: `isUndefined`.***
2172
+ * ----------------------------------------------------------
2173
+ * **Checks if a value is
2174
+ * **[`undefined`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined)**.**
2175
+ * - **Behavior:**
2176
+ * - Narrows type to `undefined` when true.
2177
+ * - Excludes `null`, `objects`, `arrays`, `strings`, `numbers`, and
2178
+ * `all other values`.
2179
+ * @param {*} value - The value to check.
2180
+ * @returns {boolean} Returns `true` if the value is `undefined`, otherwise `false`.
2181
+ * @example
2182
+ * isUndefined(undefined); // ➔ true
2183
+ * isUndefined([]); // ➔ false
2184
+ * isUndefined(123); // ➔ false
2185
+ * isUndefined(null); // ➔ false
2186
+ * isUndefined("abc"); // ➔ false
2187
+ */
2188
+ declare const isUndefined: (value: unknown) => value is undefined;
2189
+ /** ---------------------------------------------------------
2190
+ * * ***Options for `isValidDomain` predicate.***
2191
+ * ---------------------------------------------------------
2192
+ * **Customize the behavior of domain validation.**
2193
+ */
2194
+ type IsValidDomainOptions = {
2195
+ /** * ***Enable conversion of Unicode domains (IDN) to ASCII (punycode).***
2196
+ *
2197
+ * - Example: `"пример.рф"` ➔ `"xn--e1afmkfd.xn--p1ai"`
2198
+ * - Allows validating Unicode domains correctly.
2199
+ * - Default: `false`
2200
+ *
2201
+ * @defaultValue `false`.
2202
+ */
2203
+ allowUnicode?: boolean;
2204
+ /** * ***If `true`, validates **only top-level domains (TLDs)** that are not part of any SLD/second-level domain.***
2205
+ *
2206
+ * - Accepts country-code TLDs like `"ai"` or `"ai."` ✅
2207
+ * - Rejects common TLDs that are part of SLDs like `"com"` ❌
2208
+ * - Only the final label is checked; subdomains are ignored.
2209
+ * - Default: `false`
2210
+ *
2211
+ * @defaultValue `false`.
2212
+ */
2213
+ topLevel?: boolean;
2214
+ /** * ***Allow or disallow subdomains.***
2215
+ *
2216
+ * - Example: `"sub.example.com"` ✅ if `subdomain` is `true`, ❌ if `false`
2217
+ * - Wildcards and SLDs are considered when evaluating subdomains.
2218
+ * - Default: `true`
2219
+ *
2220
+ * @defaultValue `true`.
2221
+ */
2222
+ subdomain?: boolean;
2223
+ /** * ***Allow a wildcard `*` in the left-most label.***
2224
+ *
2225
+ * - Example: `"*.example.com"` ✅ if `wildcard` is `true`, ❌ if `false`
2226
+ * - Wildcards are only valid in the first label and require at least one additional label.
2227
+ * - Default: `false`
2228
+ *
2229
+ * @defaultValue `false`.
2230
+ */
2231
+ wildcard?: boolean;
2232
+ /** * ***Allow a port after the domain.***
2233
+ *
2234
+ * - Example: `"localhost:3000"` or `"example.com:8080"` ✅ if `allowPort` is `true`
2235
+ * - Validates that the port is a number between `1` and `65535`.
2236
+ * - Does not affect domain validation rules otherwise.
2237
+ * - Default: `false`
2238
+ *
2239
+ * @defaultValue `false`.
2240
+ */
2241
+ allowPort?: boolean;
2242
+ /** * ***Allow special domains like `localhost`.***
2243
+ *
2244
+ * - Example: `"localhost"` ✅ if `allowLocalhost` is `true`
2245
+ * - Works with or without a port if `allowPort` is enabled.
2246
+ * - Default: `false`
2247
+ *
2248
+ * @defaultValue `false`.
2249
+ */
2250
+ allowLocalhost?: boolean;
2251
+ /** * ***Allow URLs with protocol (`http`/`https`) and automatically extract the hostname.***
2252
+ *
2253
+ * - Example: `"https://example.com/foo/bar"` ➔ `"example.com"`
2254
+ * - The function will validate only the hostname part and ignore the path, query, and fragment.
2255
+ * - Default: `false`
2256
+ *
2257
+ * @defaultValue `false`.
2258
+ */
2259
+ allowProtocol?: boolean;
2260
+ };
2261
+ /** ---------------------------------------------------------
2262
+ * * ***Predicate: `isValidDomain`.***
2263
+ * ---------------------------------------------------------
2264
+ * **Validates whether a given string is a properly formatted domain name.**
2265
+ *
2266
+ * - **Supports options for:**
2267
+ * - `allowUnicode` ➔ allows internationalized domain names (IDN) with Unicode characters.
2268
+ * - `topLevel` ➔ validates **only top-level domains (TLDs)**; ignores subdomains and SLDs.
2269
+ * - `subdomain` ➔ allows or disallows subdomains.
2270
+ * - `wildcard` ➔ allows wildcard (`*`) in the left-most label.
2271
+ * - `allowPort` ➔ allows a port number after the domain (e.g., `example.com:8080`).
2272
+ * - `allowLocalhost` ➔ allows the special domain `"localhost"`.
2273
+ * - `allowProtocol` ➔ allows a URL with protocol (`http`/`https`) and extracts the hostname.
2274
+ *
2275
+ * - **Behavior:**
2276
+ * - ✅ Converts Unicode to ASCII (punycode) if `allowUnicode` is `true`.
2277
+ * - ✅ Checks label lengths (≤63 chars), valid characters, and punycode consistency.
2278
+ * - ✅ Validates port if `allowPort` is `true` (must be 1–65535).
2279
+ * - ✅ Accepts `"localhost"` if `allowLocalhost` is `true`.
2280
+ * - ✅ Extracts hostname from URLs if `allowProtocol` is `true`.
2281
+ * - ❌ Rejects invalid domains, labels starting/ending with `-`, double dots, malformed TLDs, or invalid port numbers.
2282
+ * - ✅ Handles both standard domains (example.com), URLs with protocols (https://example.com/foo), and IDNs (пример.рф).
2283
+ *
2284
+ * @param {*} value - The value to validate; only strings are valid domains.
2285
+ * @param {IsValidDomainOptions} [options] - Optional configuration for domain validation.
2286
+ * @param {boolean} [options.allowUnicode=false] - Enable punycode conversion for Unicode domains.
2287
+ * @param {boolean} [options.topLevel=false] - Validate only TLDs (e.g., `ai`, `uk.`); ignores SLDs like `com`.
2288
+ * @param {boolean} [options.subdomain=true] - Allow subdomains; set `false` to reject any subdomain.
2289
+ * @param {boolean} [options.wildcard=false] - Allow wildcard `*` in the left-most label (e.g., `*.example.com`).
2290
+ * @param {boolean} [options.allowPort=false] - Allow port number after domain (e.g., `:3000`); must be 1–65535.
2291
+ * @param {boolean} [options.allowLocalhost=false] - Allow special domain `"localhost"`.
2292
+ * @param {boolean} [options.allowProtocol=false] - Allow URLs with protocol (`http`/`https`) and extract hostname only.
2293
+ * @returns {boolean} Returns `true` if the value is a valid domain according to the rules and options; otherwise `false`.
2294
+ *
2295
+ * @example
2296
+ * isValidDomain("google.com");
2297
+ * // ➔ true
2298
+ * isValidDomain("пример.рф", { allowUnicode: true });
2299
+ * // ➔ true
2300
+ * isValidDomain("sub.example.com", { subdomain: false });
2301
+ * // ➔ false
2302
+ * isValidDomain("*.example.com", { wildcard: true });
2303
+ * // ➔ true
2304
+ * isValidDomain("com", { topLevel: true });
2305
+ * // ➔ false (common TLD rejected because it's part of SLD)
2306
+ * isValidDomain("ai.", { topLevel: true });
2307
+ * // ➔ true (country-code TLD accepted)
2308
+ * isValidDomain("localhost", { allowLocalhost: true });
2309
+ * // ➔ true
2310
+ * isValidDomain("localhost:3000", { allowLocalhost: true, allowPort: true });
2311
+ * // ➔ true
2312
+ * isValidDomain("example.com:8080", { allowPort: true });
2313
+ * // ➔ true
2314
+ * isValidDomain("https://example.com/foo/bar", { allowProtocol: true });
2315
+ * // ➔ true (protocol stripped and hostname validated)
2316
+ * isValidDomain("invalid_domain.com");
2317
+ * // ➔ false
2318
+ */
2319
+ declare function isValidDomain(value: unknown, options?: IsValidDomainOptions): boolean;
2320
+ /** ---------------------------------------------------------
2321
+ * * ***Predicate: `isValidURL`.***
2322
+ * ---------------------------------------------------------
2323
+ * **Validates whether a given string is a properly formatted URL.**
2324
+ * - **Ensures that the input is:**
2325
+ * - A non-empty string.
2326
+ * - A valid **[`URL`](https://developer.mozilla.org/docs/Web/API/URL)** with `http://` or `https://` scheme.
2327
+ * - **Behavior:**
2328
+ * - ✅ Includes decoding for percent-encoded URLs (e.g., `https%3A%2F%2F...`).
2329
+ * - ❌ Rejects invalid strings, unsupported schemes, and malformed domains.
2330
+ * @param {*} url - The value to validate.
2331
+ * @returns {boolean} Return `true` if the value is a **valid URL string**, otherwise `false`.
2332
+ * @example
2333
+ * isValidURL("https://example.com");
2334
+ * // ➔ true
2335
+ * isValidURL("ftp://example.com");
2336
+ * // ➔ false
2337
+ * isValidURL("not-a-url");
2338
+ * // ➔ false
2339
+ */
2340
+ declare const isValidURL: (url: unknown) => boolean;
2341
+ /** --------------------------------------------------
2342
+ * * ***Type guard: `isWeakMap`.***
2343
+ * ----------------------------------------------------------
2344
+ * **Checks if a value is a **[`WeakMap`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap/WeakMap)** object.**
2345
+ * - **Behavior:**
2346
+ * - Narrows type to `WeakMap<K, V>` when true.
2347
+ * - Excludes `Map`, `arrays`, `plain-objects,` and `other non-WeakMap values`.
2348
+ * @template K - Keys must be objects.
2349
+ * @template V - Type of values stored in the WeakMap.
2350
+ * @param {*} value - The value to check.
2351
+ * @returns {boolean} Returns `true` if the value is a `WeakMap`, otherwise `false`.
2352
+ * @example
2353
+ * isWeakMap(new WeakMap);
2354
+ * // ➔ true
2355
+ * isWeakMap(new Map);
2356
+ * // ➔ false
2357
+ */
2358
+ declare function isWeakMap<K extends object = object, V = unknown>(value: unknown): value is WeakMap<K, V>;
2359
+ export { isArrayBuffer as $, isInteger as A, isEmptyDeep as B, isNil as C, isMatch as D, isMatchWith as E, isEqualWith as F, isDate as G, isEmpty as H, isEqual as I, isBooleanObject as J, isCurrencyLike as K, isEmptyValue as L, isFunction as M, isFinite as N, isMap as O, isError as P, isArrayLike as Q, isEmptyString as R, isNonEmptyArray as S, isNaN as T, isElement as U, isEmptyArray as V, isDeepEqual as W, isBigInt as X, isBoolean as Y, isArrayLikeObject as Z, isObject as _, isURL as a, textContainsAny as at, isNonEmptyValue as b, isStringObject as c, areURLsEqualPath as ct, isServer as d, isArray as et, isSafeInteger as f, isObjectLoose as g, isObjectOrArray as h, isUndefined as i, doesKeyExist as it, isInfinityNumber as j, isLength as k, isString as l, areObjectsEqual as lt, isPropertyKey as m, isValidURL as n, hasOwnProp as nt, isTypedArray as o, textContainsAll as ot, isRegExp as p, isBuffer as q, isValidDomain as r, arrayHasAnyMatch as rt, isSymbol as s, areURLsIdentical as st, isWeakMap as t, isArguments as tt, isSet as u, areArraysEqual as ut, isNumberObject as v, isNative as w, isNonEmptyString as x, isNull as y, isEmptyObject as z };