es-toolkit 1.13.1-dev.332 → 1.13.1-dev.333

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 (735) hide show
  1. package/dist/_chunk/index-CwRt_M.js +47 -0
  2. package/dist/_chunk/index-CwRt_M.js.map +1 -0
  3. package/dist/_chunk/isPlainObject-bK22pA.js +24 -0
  4. package/dist/_chunk/isPlainObject-bK22pA.js.map +1 -0
  5. package/dist/_chunk/randomInt-CF7bZK.js +20 -0
  6. package/dist/_chunk/randomInt-CF7bZK.js.map +1 -0
  7. package/dist/_chunk/union-CdQeDK.js +13 -0
  8. package/dist/_chunk/union-CdQeDK.js.map +1 -0
  9. package/dist/array/chunk.mjs +16 -8
  10. package/dist/array/chunk.mjs.map +1 -1
  11. package/dist/array/compact.mjs +12 -8
  12. package/dist/array/compact.mjs.map +1 -1
  13. package/dist/array/countBy.mjs +11 -8
  14. package/dist/array/countBy.mjs.map +1 -1
  15. package/dist/array/difference.mjs +7 -8
  16. package/dist/array/difference.mjs.map +1 -1
  17. package/dist/array/differenceBy.mjs +9 -8
  18. package/dist/array/differenceBy.mjs.map +1 -1
  19. package/dist/array/differenceWith.mjs +10 -8
  20. package/dist/array/differenceWith.mjs.map +1 -1
  21. package/dist/array/drop.mjs +7 -8
  22. package/dist/array/drop.mjs.map +1 -1
  23. package/dist/array/dropRight.mjs +10 -8
  24. package/dist/array/dropRight.mjs.map +1 -1
  25. package/dist/array/dropRightWhile.mjs +11 -8
  26. package/dist/array/dropRightWhile.mjs.map +1 -1
  27. package/dist/array/dropWhile.mjs +10 -8
  28. package/dist/array/dropWhile.mjs.map +1 -1
  29. package/dist/array/fill.mjs +12 -8
  30. package/dist/array/fill.mjs.map +1 -1
  31. package/dist/array/flatMap.mjs +8 -9
  32. package/dist/array/flatMap.mjs.map +1 -1
  33. package/dist/array/flatten.mjs +19 -8
  34. package/dist/array/flatten.mjs.map +1 -1
  35. package/dist/array/flattenDeep.mjs +8 -9
  36. package/dist/array/flattenDeep.mjs.map +1 -1
  37. package/dist/array/forEachRight.mjs +9 -8
  38. package/dist/array/forEachRight.mjs.map +1 -1
  39. package/dist/array/groupBy.mjs +14 -8
  40. package/dist/array/groupBy.mjs.map +1 -1
  41. package/dist/array/head.mjs +6 -8
  42. package/dist/array/head.mjs.map +1 -1
  43. package/dist/array/index.js +353 -498
  44. package/dist/array/index.js.map +1 -1
  45. package/dist/array/index.mjs +52 -211
  46. package/dist/array/index.mjs.map +1 -1
  47. package/dist/array/initial.mjs +9 -8
  48. package/dist/array/initial.mjs.map +1 -1
  49. package/dist/array/intersection.mjs +9 -8
  50. package/dist/array/intersection.mjs.map +1 -1
  51. package/dist/array/intersectionBy.mjs +7 -8
  52. package/dist/array/intersectionBy.mjs.map +1 -1
  53. package/dist/array/intersectionWith.mjs +10 -8
  54. package/dist/array/intersectionWith.mjs.map +1 -1
  55. package/dist/array/keyBy.mjs +11 -8
  56. package/dist/array/keyBy.mjs.map +1 -1
  57. package/dist/array/last.mjs +6 -8
  58. package/dist/array/last.mjs.map +1 -1
  59. package/dist/array/maxBy.mjs +15 -8
  60. package/dist/array/maxBy.mjs.map +1 -1
  61. package/dist/array/minBy.mjs +15 -8
  62. package/dist/array/minBy.mjs.map +1 -1
  63. package/dist/array/orderBy.mjs +26 -8
  64. package/dist/array/orderBy.mjs.map +1 -1
  65. package/dist/array/partition.mjs +16 -8
  66. package/dist/array/partition.mjs.map +1 -1
  67. package/dist/array/sample.mjs +7 -8
  68. package/dist/array/sample.mjs.map +1 -1
  69. package/dist/array/sampleSize.mjs +21 -10
  70. package/dist/array/sampleSize.mjs.map +1 -1
  71. package/dist/array/shuffle.mjs +11 -8
  72. package/dist/array/shuffle.mjs.map +1 -1
  73. package/dist/array/tail.mjs +14 -8
  74. package/dist/array/tail.mjs.map +1 -1
  75. package/dist/array/take.mjs +6 -8
  76. package/dist/array/take.mjs.map +1 -1
  77. package/dist/array/takeRight.mjs +9 -8
  78. package/dist/array/takeRight.mjs.map +1 -1
  79. package/dist/array/takeRightWhile.mjs +11 -8
  80. package/dist/array/takeRightWhile.mjs.map +1 -1
  81. package/dist/array/takeWhile.mjs +13 -8
  82. package/dist/array/takeWhile.mjs.map +1 -1
  83. package/dist/array/toFilled.mjs +13 -8
  84. package/dist/array/toFilled.mjs.map +1 -1
  85. package/dist/array/union.mjs +8 -9
  86. package/dist/array/union.mjs.map +1 -1
  87. package/dist/array/unionBy.mjs +13 -8
  88. package/dist/array/unionBy.mjs.map +1 -1
  89. package/dist/array/unionWith.mjs +8 -9
  90. package/dist/array/unionWith.mjs.map +1 -1
  91. package/dist/array/uniq.mjs +6 -8
  92. package/dist/array/uniq.mjs.map +1 -1
  93. package/dist/array/uniqBy.mjs +13 -8
  94. package/dist/array/uniqBy.mjs.map +1 -1
  95. package/dist/array/uniqWith.mjs +13 -8
  96. package/dist/array/uniqWith.mjs.map +1 -1
  97. package/dist/array/unzip.mjs +19 -8
  98. package/dist/array/unzip.mjs.map +1 -1
  99. package/dist/array/unzipWith.mjs +15 -8
  100. package/dist/array/unzipWith.mjs.map +1 -1
  101. package/dist/array/without.mjs +7 -8
  102. package/dist/array/without.mjs.map +1 -1
  103. package/dist/array/xor.mjs +10 -12
  104. package/dist/array/xor.mjs.map +1 -1
  105. package/dist/array/xorBy.mjs +12 -11
  106. package/dist/array/xorBy.mjs.map +1 -1
  107. package/dist/array/xorWith.mjs +12 -12
  108. package/dist/array/xorWith.mjs.map +1 -1
  109. package/dist/array/zip.mjs +15 -8
  110. package/dist/array/zip.mjs.map +1 -1
  111. package/dist/array/zipObject.mjs +10 -8
  112. package/dist/array/zipObject.mjs.map +1 -1
  113. package/dist/array/zipWith.mjs +14 -8
  114. package/dist/array/zipWith.mjs.map +1 -1
  115. package/dist/compat/_internal/isDeepKey.mjs +16 -0
  116. package/dist/compat/_internal/isDeepKey.mjs.map +1 -0
  117. package/dist/compat/_internal/isIndex.mjs +17 -0
  118. package/dist/compat/_internal/isIndex.mjs.map +1 -0
  119. package/dist/compat/_internal/toPath.mjs +41 -0
  120. package/dist/compat/_internal/toPath.mjs.map +1 -0
  121. package/dist/compat/array/chunk.d.mts +26 -0
  122. package/dist/compat/array/chunk.d.ts +26 -0
  123. package/dist/compat/array/chunk.mjs +12 -0
  124. package/dist/compat/array/chunk.mjs.map +1 -0
  125. package/dist/compat/array/concat.d.mts +30 -0
  126. package/dist/compat/array/concat.d.ts +30 -0
  127. package/dist/compat/array/concat.mjs +8 -0
  128. package/dist/compat/array/concat.mjs.map +1 -0
  129. package/dist/compat/array/difference.d.mts +3 -0
  130. package/dist/compat/array/difference.d.ts +3 -0
  131. package/dist/compat/array/difference.mjs +11 -0
  132. package/dist/compat/array/difference.mjs.map +1 -0
  133. package/dist/compat/array/fill.d.mts +33 -0
  134. package/dist/compat/array/fill.d.ts +33 -0
  135. package/dist/compat/array/fill.mjs +16 -0
  136. package/dist/compat/array/fill.mjs.map +1 -0
  137. package/dist/compat/array/zipObjectDeep.d.mts +37 -0
  138. package/dist/compat/array/zipObjectDeep.d.ts +37 -0
  139. package/dist/compat/array/zipObjectDeep.mjs +17 -0
  140. package/dist/compat/array/zipObjectDeep.mjs.map +1 -0
  141. package/dist/compat/index.d.mts +14 -546
  142. package/dist/compat/index.d.ts +14 -546
  143. package/dist/compat/index.js +287 -1498
  144. package/dist/compat/index.js.map +1 -1
  145. package/dist/compat/index.mjs +106 -415
  146. package/dist/compat/index.mjs.map +1 -1
  147. package/dist/compat/math/max.d.mts +19 -0
  148. package/dist/compat/math/max.d.ts +19 -0
  149. package/dist/compat/math/max.mjs +14 -0
  150. package/dist/compat/math/max.mjs.map +1 -0
  151. package/dist/compat/math/min.d.mts +19 -0
  152. package/dist/compat/math/min.d.ts +19 -0
  153. package/dist/compat/math/min.mjs +14 -0
  154. package/dist/compat/math/min.mjs.map +1 -0
  155. package/dist/compat/object/get.d.mts +247 -0
  156. package/dist/compat/object/get.d.ts +247 -0
  157. package/dist/compat/object/get.mjs +34 -0
  158. package/dist/compat/object/get.mjs.map +1 -0
  159. package/dist/compat/object/get.types.d.mts +9 -0
  160. package/dist/compat/object/get.types.d.ts +9 -0
  161. package/dist/compat/object/set.d.mts +30 -0
  162. package/dist/compat/object/set.d.ts +30 -0
  163. package/dist/compat/object/set.mjs +25 -0
  164. package/dist/compat/object/set.mjs.map +1 -0
  165. package/dist/compat/predicate/isArray.d.mts +24 -0
  166. package/dist/compat/predicate/isArray.d.ts +24 -0
  167. package/dist/compat/predicate/isArray.mjs +6 -0
  168. package/dist/compat/predicate/isArray.mjs.map +1 -0
  169. package/dist/compat/predicate/isPlainObject.d.mts +25 -0
  170. package/dist/compat/predicate/isPlainObject.d.ts +25 -0
  171. package/dist/compat/predicate/isPlainObject.mjs +30 -0
  172. package/dist/compat/predicate/isPlainObject.mjs.map +1 -0
  173. package/dist/compat/predicate/isTypedArray.d.mts +19 -0
  174. package/dist/compat/predicate/isTypedArray.d.ts +19 -0
  175. package/dist/compat/predicate/isTypedArray.mjs +8 -0
  176. package/dist/compat/predicate/isTypedArray.mjs.map +1 -0
  177. package/dist/compat/string/endsWith.d.mts +20 -0
  178. package/dist/compat/string/endsWith.d.ts +20 -0
  179. package/dist/compat/string/endsWith.mjs +6 -0
  180. package/dist/compat/string/endsWith.mjs.map +1 -0
  181. package/dist/compat/string/startsWith.d.mts +20 -0
  182. package/dist/compat/string/startsWith.d.ts +20 -0
  183. package/dist/compat/string/startsWith.mjs +6 -0
  184. package/dist/compat/string/startsWith.mjs.map +1 -0
  185. package/dist/error/AbortError.mjs +9 -8
  186. package/dist/error/AbortError.mjs.map +1 -1
  187. package/dist/error/TimeoutError.mjs +9 -8
  188. package/dist/error/TimeoutError.mjs.map +1 -1
  189. package/dist/function/after.mjs +14 -7
  190. package/dist/function/after.mjs.map +1 -1
  191. package/dist/function/debounce.mjs +29 -8
  192. package/dist/function/debounce.mjs.map +1 -1
  193. package/dist/function/index.js +66 -102
  194. package/dist/function/index.js.map +1 -1
  195. package/dist/function/index.mjs +7 -29
  196. package/dist/function/index.mjs.map +1 -1
  197. package/dist/function/negate.mjs +6 -8
  198. package/dist/function/negate.mjs.map +1 -1
  199. package/dist/function/noop.mjs +4 -8
  200. package/dist/function/noop.mjs.map +1 -1
  201. package/dist/function/once.mjs +16 -8
  202. package/dist/function/once.mjs.map +1 -1
  203. package/dist/function/throttle.mjs +14 -8
  204. package/dist/function/throttle.mjs.map +1 -1
  205. package/dist/index.js +114 -1307
  206. package/dist/index.js.map +1 -1
  207. package/dist/index.mjs +97 -399
  208. package/dist/index.mjs.map +1 -1
  209. package/dist/math/clamp.mjs +9 -8
  210. package/dist/math/clamp.mjs.map +1 -1
  211. package/dist/math/inRange.mjs +13 -8
  212. package/dist/math/inRange.mjs.map +1 -1
  213. package/dist/math/index.js +59 -115
  214. package/dist/math/index.js.map +1 -1
  215. package/dist/math/index.mjs +11 -45
  216. package/dist/math/index.mjs.map +1 -1
  217. package/dist/math/mean.mjs +8 -9
  218. package/dist/math/mean.mjs.map +1 -1
  219. package/dist/math/meanBy.mjs +9 -10
  220. package/dist/math/meanBy.mjs.map +1 -1
  221. package/dist/math/random.mjs +13 -8
  222. package/dist/math/random.mjs.map +1 -1
  223. package/dist/math/randomInt.mjs +8 -9
  224. package/dist/math/randomInt.mjs.map +1 -1
  225. package/dist/math/range.mjs +21 -8
  226. package/dist/math/range.mjs.map +1 -1
  227. package/dist/math/round.mjs +10 -8
  228. package/dist/math/round.mjs.map +1 -1
  229. package/dist/math/sum.mjs +10 -8
  230. package/dist/math/sum.mjs.map +1 -1
  231. package/dist/math/sumBy.mjs +9 -9
  232. package/dist/math/sumBy.mjs.map +1 -1
  233. package/dist/object/clone.mjs +40 -8
  234. package/dist/object/clone.mjs.map +1 -1
  235. package/dist/object/cloneDeep.mjs +100 -8
  236. package/dist/object/cloneDeep.mjs.map +1 -1
  237. package/dist/object/flattenObject.mjs +29 -9
  238. package/dist/object/flattenObject.mjs.map +1 -1
  239. package/dist/object/index.js +184 -232
  240. package/dist/object/index.js.map +1 -1
  241. package/dist/object/index.mjs +9 -38
  242. package/dist/object/index.mjs.map +1 -1
  243. package/dist/object/invert.mjs +13 -8
  244. package/dist/object/invert.mjs.map +1 -1
  245. package/dist/object/omit.mjs +10 -8
  246. package/dist/object/omit.mjs.map +1 -1
  247. package/dist/object/omitBy.mjs +13 -8
  248. package/dist/object/omitBy.mjs.map +1 -1
  249. package/dist/object/pick.mjs +10 -8
  250. package/dist/object/pick.mjs.map +1 -1
  251. package/dist/object/pickBy.mjs +13 -8
  252. package/dist/object/pickBy.mjs.map +1 -1
  253. package/dist/predicate/index.js +65 -126
  254. package/dist/predicate/index.js.map +1 -1
  255. package/dist/predicate/index.mjs +12 -51
  256. package/dist/predicate/index.mjs.map +1 -1
  257. package/dist/predicate/isArrayLike.mjs +9 -9
  258. package/dist/predicate/isArrayLike.mjs.map +1 -1
  259. package/dist/predicate/isEqual.mjs +36 -10
  260. package/dist/predicate/isEqual.mjs.map +1 -1
  261. package/dist/predicate/isFunction.mjs +6 -8
  262. package/dist/predicate/isFunction.mjs.map +1 -1
  263. package/dist/predicate/isLength.mjs +6 -8
  264. package/dist/predicate/isLength.mjs.map +1 -1
  265. package/dist/predicate/isNil.mjs +6 -8
  266. package/dist/predicate/isNil.mjs.map +1 -1
  267. package/dist/predicate/isNotNil.mjs +6 -8
  268. package/dist/predicate/isNotNil.mjs.map +1 -1
  269. package/dist/predicate/isNull.mjs +6 -8
  270. package/dist/predicate/isNull.mjs.map +1 -1
  271. package/dist/predicate/isPlainObject.mjs +22 -8
  272. package/dist/predicate/isPlainObject.mjs.map +1 -1
  273. package/dist/predicate/isPrimitive.mjs +6 -8
  274. package/dist/predicate/isPrimitive.mjs.map +1 -1
  275. package/dist/predicate/isTypedArray.mjs +16 -8
  276. package/dist/predicate/isTypedArray.mjs.map +1 -1
  277. package/dist/predicate/isUndefined.mjs +6 -8
  278. package/dist/predicate/isUndefined.mjs.map +1 -1
  279. package/dist/promise/delay.mjs +21 -9
  280. package/dist/promise/delay.mjs.map +1 -1
  281. package/dist/promise/index.js +6 -72
  282. package/dist/promise/index.js.map +1 -1
  283. package/dist/promise/index.mjs +3 -16
  284. package/dist/promise/index.mjs.map +1 -1
  285. package/dist/promise/timeout.mjs +10 -11
  286. package/dist/promise/timeout.mjs.map +1 -1
  287. package/dist/promise/withTimeout.mjs +8 -12
  288. package/dist/promise/withTimeout.mjs.map +1 -1
  289. package/dist/string/_internal/getWords.mjs +7 -0
  290. package/dist/string/_internal/getWords.mjs.map +1 -0
  291. package/dist/string/camelCase.mjs +14 -10
  292. package/dist/string/camelCase.mjs.map +1 -1
  293. package/dist/string/capitalize.mjs +5 -7
  294. package/dist/string/capitalize.mjs.map +1 -1
  295. package/dist/string/index.js +42 -77
  296. package/dist/string/index.js.map +1 -1
  297. package/dist/string/index.mjs +7 -30
  298. package/dist/string/index.mjs.map +1 -1
  299. package/dist/string/kebabCase.mjs +8 -8
  300. package/dist/string/kebabCase.mjs.map +1 -1
  301. package/dist/string/lowerCase.mjs +8 -8
  302. package/dist/string/lowerCase.mjs.map +1 -1
  303. package/dist/string/snakeCase.mjs +8 -8
  304. package/dist/string/snakeCase.mjs.map +1 -1
  305. package/dist/string/startCase.mjs +21 -9
  306. package/dist/string/startCase.mjs.map +1 -1
  307. package/package.json +8 -2
  308. package/umd/browser.global.js +2 -2
  309. package/umd/browser.global.js.map +1 -0
  310. package/dist/array/chunk.js +0 -43
  311. package/dist/array/chunk.js.map +0 -1
  312. package/dist/array/compact.js +0 -39
  313. package/dist/array/compact.js.map +0 -1
  314. package/dist/array/countBy.js +0 -38
  315. package/dist/array/countBy.js.map +0 -1
  316. package/dist/array/difference.js +0 -34
  317. package/dist/array/difference.js.map +0 -1
  318. package/dist/array/differenceBy.js +0 -36
  319. package/dist/array/differenceBy.js.map +0 -1
  320. package/dist/array/differenceWith.js +0 -37
  321. package/dist/array/differenceWith.js.map +0 -1
  322. package/dist/array/drop.js +0 -34
  323. package/dist/array/drop.js.map +0 -1
  324. package/dist/array/dropRight.js +0 -37
  325. package/dist/array/dropRight.js.map +0 -1
  326. package/dist/array/dropRightWhile.js +0 -38
  327. package/dist/array/dropRightWhile.js.map +0 -1
  328. package/dist/array/dropWhile.js +0 -37
  329. package/dist/array/dropWhile.js.map +0 -1
  330. package/dist/array/fill.js +0 -39
  331. package/dist/array/fill.js.map +0 -1
  332. package/dist/array/flatMap.js +0 -52
  333. package/dist/array/flatMap.js.map +0 -1
  334. package/dist/array/flatten.js +0 -45
  335. package/dist/array/flatten.js.map +0 -1
  336. package/dist/array/flattenDeep.js +0 -52
  337. package/dist/array/flattenDeep.js.map +0 -1
  338. package/dist/array/forEachRight.js +0 -36
  339. package/dist/array/forEachRight.js.map +0 -1
  340. package/dist/array/groupBy.js +0 -41
  341. package/dist/array/groupBy.js.map +0 -1
  342. package/dist/array/head.js +0 -33
  343. package/dist/array/head.js.map +0 -1
  344. package/dist/array/initial.js +0 -36
  345. package/dist/array/initial.js.map +0 -1
  346. package/dist/array/intersection.js +0 -36
  347. package/dist/array/intersection.js.map +0 -1
  348. package/dist/array/intersectionBy.js +0 -34
  349. package/dist/array/intersectionBy.js.map +0 -1
  350. package/dist/array/intersectionWith.js +0 -37
  351. package/dist/array/intersectionWith.js.map +0 -1
  352. package/dist/array/keyBy.js +0 -38
  353. package/dist/array/keyBy.js.map +0 -1
  354. package/dist/array/last.js +0 -33
  355. package/dist/array/last.js.map +0 -1
  356. package/dist/array/maxBy.js +0 -42
  357. package/dist/array/maxBy.js.map +0 -1
  358. package/dist/array/minBy.js +0 -42
  359. package/dist/array/minBy.js.map +0 -1
  360. package/dist/array/orderBy.js +0 -53
  361. package/dist/array/orderBy.js.map +0 -1
  362. package/dist/array/partition.js +0 -42
  363. package/dist/array/partition.js.map +0 -1
  364. package/dist/array/sample.js +0 -34
  365. package/dist/array/sample.js.map +0 -1
  366. package/dist/array/sampleSize.js +0 -65
  367. package/dist/array/sampleSize.js.map +0 -1
  368. package/dist/array/shuffle.js +0 -38
  369. package/dist/array/shuffle.js.map +0 -1
  370. package/dist/array/tail.js +0 -41
  371. package/dist/array/tail.js.map +0 -1
  372. package/dist/array/take.js +0 -33
  373. package/dist/array/take.js.map +0 -1
  374. package/dist/array/takeRight.js +0 -36
  375. package/dist/array/takeRight.js.map +0 -1
  376. package/dist/array/takeRightWhile.js +0 -38
  377. package/dist/array/takeRightWhile.js.map +0 -1
  378. package/dist/array/takeWhile.js +0 -40
  379. package/dist/array/takeWhile.js.map +0 -1
  380. package/dist/array/toFilled.js +0 -40
  381. package/dist/array/toFilled.js.map +0 -1
  382. package/dist/array/union.js +0 -40
  383. package/dist/array/union.js.map +0 -1
  384. package/dist/array/unionBy.js +0 -40
  385. package/dist/array/unionBy.js.map +0 -1
  386. package/dist/array/unionWith.js +0 -47
  387. package/dist/array/unionWith.js.map +0 -1
  388. package/dist/array/uniq.js +0 -33
  389. package/dist/array/uniq.js.map +0 -1
  390. package/dist/array/uniqBy.js +0 -40
  391. package/dist/array/uniqBy.js.map +0 -1
  392. package/dist/array/uniqWith.js +0 -40
  393. package/dist/array/uniqWith.js.map +0 -1
  394. package/dist/array/unzip.js +0 -46
  395. package/dist/array/unzip.js.map +0 -1
  396. package/dist/array/unzipWith.js +0 -42
  397. package/dist/array/unzipWith.js.map +0 -1
  398. package/dist/array/without.js +0 -34
  399. package/dist/array/without.js.map +0 -1
  400. package/dist/array/xor.js +0 -59
  401. package/dist/array/xor.js.map +0 -1
  402. package/dist/array/xorBy.js +0 -63
  403. package/dist/array/xorBy.js.map +0 -1
  404. package/dist/array/xorWith.js +0 -72
  405. package/dist/array/xorWith.js.map +0 -1
  406. package/dist/array/zip.js +0 -42
  407. package/dist/array/zip.js.map +0 -1
  408. package/dist/array/zipObject.js +0 -37
  409. package/dist/array/zipObject.js.map +0 -1
  410. package/dist/array/zipWith.js +0 -41
  411. package/dist/array/zipWith.js.map +0 -1
  412. package/dist/browser.d.mts +0 -2
  413. package/dist/browser.d.ts +0 -2
  414. package/dist/browser.js +0 -1440
  415. package/dist/browser.js.map +0 -1
  416. package/dist/browser.mjs +0 -115
  417. package/dist/browser.mjs.map +0 -1
  418. package/dist/chunk-237HGSZS.mjs +0 -16
  419. package/dist/chunk-237HGSZS.mjs.map +0 -1
  420. package/dist/chunk-27QMXBLJ.mjs +0 -9
  421. package/dist/chunk-27QMXBLJ.mjs.map +0 -1
  422. package/dist/chunk-2IXFGSUA.mjs +0 -16
  423. package/dist/chunk-2IXFGSUA.mjs.map +0 -1
  424. package/dist/chunk-2KNLZB7V.mjs +0 -10
  425. package/dist/chunk-2KNLZB7V.mjs.map +0 -1
  426. package/dist/chunk-2SLTL4KL.mjs +0 -13
  427. package/dist/chunk-2SLTL4KL.mjs.map +0 -1
  428. package/dist/chunk-2ZCITDMK.mjs +0 -13
  429. package/dist/chunk-2ZCITDMK.mjs.map +0 -1
  430. package/dist/chunk-33MSBDC6.mjs +0 -21
  431. package/dist/chunk-33MSBDC6.mjs.map +0 -1
  432. package/dist/chunk-3EZAFZG3.mjs +0 -10
  433. package/dist/chunk-3EZAFZG3.mjs.map +0 -1
  434. package/dist/chunk-3SBT6WDU.mjs +0 -25
  435. package/dist/chunk-3SBT6WDU.mjs.map +0 -1
  436. package/dist/chunk-4DFAGGIM.mjs +0 -26
  437. package/dist/chunk-4DFAGGIM.mjs.map +0 -1
  438. package/dist/chunk-4OIZM4HS.mjs +0 -1
  439. package/dist/chunk-4OIZM4HS.mjs.map +0 -1
  440. package/dist/chunk-4ZES5T6V.mjs +0 -21
  441. package/dist/chunk-4ZES5T6V.mjs.map +0 -1
  442. package/dist/chunk-5ASRKEB4.mjs +0 -13
  443. package/dist/chunk-5ASRKEB4.mjs.map +0 -1
  444. package/dist/chunk-5F26PFZL.mjs +0 -32
  445. package/dist/chunk-5F26PFZL.mjs.map +0 -1
  446. package/dist/chunk-5L4VWRFX.mjs +0 -14
  447. package/dist/chunk-5L4VWRFX.mjs.map +0 -1
  448. package/dist/chunk-5PMKOZ2F.mjs +0 -13
  449. package/dist/chunk-5PMKOZ2F.mjs.map +0 -1
  450. package/dist/chunk-6CLH5YZ2.mjs +0 -16
  451. package/dist/chunk-6CLH5YZ2.mjs.map +0 -1
  452. package/dist/chunk-6NVQAHXP.mjs +0 -13
  453. package/dist/chunk-6NVQAHXP.mjs.map +0 -1
  454. package/dist/chunk-74CREQXW.mjs +0 -9
  455. package/dist/chunk-74CREQXW.mjs.map +0 -1
  456. package/dist/chunk-7B7W36UP.mjs +0 -29
  457. package/dist/chunk-7B7W36UP.mjs.map +0 -1
  458. package/dist/chunk-7GXKT3VW.mjs +0 -41
  459. package/dist/chunk-7GXKT3VW.mjs.map +0 -1
  460. package/dist/chunk-AIRSKN47.mjs +0 -9
  461. package/dist/chunk-AIRSKN47.mjs.map +0 -1
  462. package/dist/chunk-AJKZMN2V.mjs +0 -14
  463. package/dist/chunk-AJKZMN2V.mjs.map +0 -1
  464. package/dist/chunk-B4COTK4K.mjs +0 -16
  465. package/dist/chunk-B4COTK4K.mjs.map +0 -1
  466. package/dist/chunk-BCTYOXT7.mjs +0 -16
  467. package/dist/chunk-BCTYOXT7.mjs.map +0 -1
  468. package/dist/chunk-BGWHVWY4.mjs +0 -13
  469. package/dist/chunk-BGWHVWY4.mjs.map +0 -1
  470. package/dist/chunk-BH6HLGBA.mjs +0 -16
  471. package/dist/chunk-BH6HLGBA.mjs.map +0 -1
  472. package/dist/chunk-BMRTZMRE.mjs +0 -9
  473. package/dist/chunk-BMRTZMRE.mjs.map +0 -1
  474. package/dist/chunk-BOOQBJN2.mjs +0 -9
  475. package/dist/chunk-BOOQBJN2.mjs.map +0 -1
  476. package/dist/chunk-CMBC4MXG.mjs +0 -19
  477. package/dist/chunk-CMBC4MXG.mjs.map +0 -1
  478. package/dist/chunk-DDH7K4QM.mjs +0 -1
  479. package/dist/chunk-DDH7K4QM.mjs.map +0 -1
  480. package/dist/chunk-DLS7UJKJ.mjs +0 -17
  481. package/dist/chunk-DLS7UJKJ.mjs.map +0 -1
  482. package/dist/chunk-DN3NOZ3H.mjs +0 -18
  483. package/dist/chunk-DN3NOZ3H.mjs.map +0 -1
  484. package/dist/chunk-DPH2KE6O.mjs +0 -24
  485. package/dist/chunk-DPH2KE6O.mjs.map +0 -1
  486. package/dist/chunk-DTTKJ3VC.mjs +0 -9
  487. package/dist/chunk-DTTKJ3VC.mjs.map +0 -1
  488. package/dist/chunk-DVK2N4KC.mjs +0 -9
  489. package/dist/chunk-DVK2N4KC.mjs.map +0 -1
  490. package/dist/chunk-DXB7EZUQ.mjs +0 -12
  491. package/dist/chunk-DXB7EZUQ.mjs.map +0 -1
  492. package/dist/chunk-E6C5EZQA.mjs +0 -19
  493. package/dist/chunk-E6C5EZQA.mjs.map +0 -1
  494. package/dist/chunk-E6E4RZLN.mjs +0 -17
  495. package/dist/chunk-E6E4RZLN.mjs.map +0 -1
  496. package/dist/chunk-EHSKB6DF.mjs +0 -26
  497. package/dist/chunk-EHSKB6DF.mjs.map +0 -1
  498. package/dist/chunk-ET33L3MQ.mjs +0 -14
  499. package/dist/chunk-ET33L3MQ.mjs.map +0 -1
  500. package/dist/chunk-EZYYB34V.mjs +0 -17
  501. package/dist/chunk-EZYYB34V.mjs.map +0 -1
  502. package/dist/chunk-F47GLYUU.mjs +0 -1
  503. package/dist/chunk-F47GLYUU.mjs.map +0 -1
  504. package/dist/chunk-FUS75PJ7.mjs +0 -1
  505. package/dist/chunk-FUS75PJ7.mjs.map +0 -1
  506. package/dist/chunk-FVVSE2F2.mjs +0 -12
  507. package/dist/chunk-FVVSE2F2.mjs.map +0 -1
  508. package/dist/chunk-FZZNWXDM.mjs +0 -9
  509. package/dist/chunk-FZZNWXDM.mjs.map +0 -1
  510. package/dist/chunk-G7UQ5PUR.mjs +0 -14
  511. package/dist/chunk-G7UQ5PUR.mjs.map +0 -1
  512. package/dist/chunk-GIWAOOFY.mjs +0 -13
  513. package/dist/chunk-GIWAOOFY.mjs.map +0 -1
  514. package/dist/chunk-GTFDDKZ2.mjs +0 -15
  515. package/dist/chunk-GTFDDKZ2.mjs.map +0 -1
  516. package/dist/chunk-GZGXXIF7.mjs +0 -650
  517. package/dist/chunk-GZGXXIF7.mjs.map +0 -1
  518. package/dist/chunk-HPFDYUGP.mjs +0 -13
  519. package/dist/chunk-HPFDYUGP.mjs.map +0 -1
  520. package/dist/chunk-IEA53J7P.mjs +0 -12
  521. package/dist/chunk-IEA53J7P.mjs.map +0 -1
  522. package/dist/chunk-IFNXROZR.mjs +0 -18
  523. package/dist/chunk-IFNXROZR.mjs.map +0 -1
  524. package/dist/chunk-IJD7FE2Z.mjs +0 -18
  525. package/dist/chunk-IJD7FE2Z.mjs.map +0 -1
  526. package/dist/chunk-IWXZI3QT.mjs +0 -14
  527. package/dist/chunk-IWXZI3QT.mjs.map +0 -1
  528. package/dist/chunk-J5LGTIGS.mjs +0 -10
  529. package/dist/chunk-J5LGTIGS.mjs.map +0 -1
  530. package/dist/chunk-JCRY7ZYS.mjs +0 -22
  531. package/dist/chunk-JCRY7ZYS.mjs.map +0 -1
  532. package/dist/chunk-JPUKH67K.mjs +0 -10
  533. package/dist/chunk-JPUKH67K.mjs.map +0 -1
  534. package/dist/chunk-K5WL54BY.mjs +0 -93
  535. package/dist/chunk-K5WL54BY.mjs.map +0 -1
  536. package/dist/chunk-KIOYQRMQ.mjs +0 -12
  537. package/dist/chunk-KIOYQRMQ.mjs.map +0 -1
  538. package/dist/chunk-L7FQX5MN.mjs +0 -19
  539. package/dist/chunk-L7FQX5MN.mjs.map +0 -1
  540. package/dist/chunk-LJ2C6MVP.mjs +0 -13
  541. package/dist/chunk-LJ2C6MVP.mjs.map +0 -1
  542. package/dist/chunk-LKXCOLNY.mjs +0 -8
  543. package/dist/chunk-LKXCOLNY.mjs.map +0 -1
  544. package/dist/chunk-LPZZIY5Z.mjs +0 -13
  545. package/dist/chunk-LPZZIY5Z.mjs.map +0 -1
  546. package/dist/chunk-LVWX5B43.mjs +0 -12
  547. package/dist/chunk-LVWX5B43.mjs.map +0 -1
  548. package/dist/chunk-M7SBBYV2.mjs +0 -14
  549. package/dist/chunk-M7SBBYV2.mjs.map +0 -1
  550. package/dist/chunk-ME352XO7.mjs +0 -9
  551. package/dist/chunk-ME352XO7.mjs.map +0 -1
  552. package/dist/chunk-MIGAC7F4.mjs +0 -25
  553. package/dist/chunk-MIGAC7F4.mjs.map +0 -1
  554. package/dist/chunk-MJ7LNBI6.mjs +0 -17
  555. package/dist/chunk-MJ7LNBI6.mjs.map +0 -1
  556. package/dist/chunk-ML727RRJ.mjs +0 -13
  557. package/dist/chunk-ML727RRJ.mjs.map +0 -1
  558. package/dist/chunk-MLCL773E.mjs +0 -12
  559. package/dist/chunk-MLCL773E.mjs.map +0 -1
  560. package/dist/chunk-MY4G7R3I.mjs +0 -14
  561. package/dist/chunk-MY4G7R3I.mjs.map +0 -1
  562. package/dist/chunk-N3QYJX4T.mjs +0 -12
  563. package/dist/chunk-N3QYJX4T.mjs.map +0 -1
  564. package/dist/chunk-NFS7RWWE.mjs +0 -16
  565. package/dist/chunk-NFS7RWWE.mjs.map +0 -1
  566. package/dist/chunk-NKLIE2OI.mjs +0 -1
  567. package/dist/chunk-NKLIE2OI.mjs.map +0 -1
  568. package/dist/chunk-NTLX2MPV.mjs +0 -14
  569. package/dist/chunk-NTLX2MPV.mjs.map +0 -1
  570. package/dist/chunk-O6UXZR3U.mjs +0 -10
  571. package/dist/chunk-O6UXZR3U.mjs.map +0 -1
  572. package/dist/chunk-OG2RLT5U.mjs +0 -10
  573. package/dist/chunk-OG2RLT5U.mjs.map +0 -1
  574. package/dist/chunk-OGZMEWPR.mjs +0 -18
  575. package/dist/chunk-OGZMEWPR.mjs.map +0 -1
  576. package/dist/chunk-OLORW442.mjs +0 -18
  577. package/dist/chunk-OLORW442.mjs.map +0 -1
  578. package/dist/chunk-OLX53VEF.mjs +0 -16
  579. package/dist/chunk-OLX53VEF.mjs.map +0 -1
  580. package/dist/chunk-OOKNBU4V.mjs +0 -18
  581. package/dist/chunk-OOKNBU4V.mjs.map +0 -1
  582. package/dist/chunk-OXZCMC5I.mjs +0 -13
  583. package/dist/chunk-OXZCMC5I.mjs.map +0 -1
  584. package/dist/chunk-PJPGJ2O6.mjs +0 -15
  585. package/dist/chunk-PJPGJ2O6.mjs.map +0 -1
  586. package/dist/chunk-PYEYV7BY.mjs +0 -10
  587. package/dist/chunk-PYEYV7BY.mjs.map +0 -1
  588. package/dist/chunk-Q47NGNXT.mjs +0 -21
  589. package/dist/chunk-Q47NGNXT.mjs.map +0 -1
  590. package/dist/chunk-QOJGMVVR.mjs +0 -17
  591. package/dist/chunk-QOJGMVVR.mjs.map +0 -1
  592. package/dist/chunk-QRSJBBFY.mjs +0 -21
  593. package/dist/chunk-QRSJBBFY.mjs.map +0 -1
  594. package/dist/chunk-R6GLTTAB.mjs +0 -9
  595. package/dist/chunk-R6GLTTAB.mjs.map +0 -1
  596. package/dist/chunk-R6QA7PLZ.mjs +0 -13
  597. package/dist/chunk-R6QA7PLZ.mjs.map +0 -1
  598. package/dist/chunk-RTFTLCF3.mjs +0 -14
  599. package/dist/chunk-RTFTLCF3.mjs.map +0 -1
  600. package/dist/chunk-SXFMQQ6F.mjs +0 -9
  601. package/dist/chunk-SXFMQQ6F.mjs.map +0 -1
  602. package/dist/chunk-SYWMYQYJ.mjs +0 -16
  603. package/dist/chunk-SYWMYQYJ.mjs.map +0 -1
  604. package/dist/chunk-U56ZOM7L.mjs +0 -9
  605. package/dist/chunk-U56ZOM7L.mjs.map +0 -1
  606. package/dist/chunk-UY76KTPE.mjs +0 -13
  607. package/dist/chunk-UY76KTPE.mjs.map +0 -1
  608. package/dist/chunk-VH2PV426.mjs +0 -9
  609. package/dist/chunk-VH2PV426.mjs.map +0 -1
  610. package/dist/chunk-VRUTBJYS.mjs +0 -43
  611. package/dist/chunk-VRUTBJYS.mjs.map +0 -1
  612. package/dist/chunk-WMM7TZLG.mjs +0 -9
  613. package/dist/chunk-WMM7TZLG.mjs.map +0 -1
  614. package/dist/chunk-XGQWTHW6.mjs +0 -34
  615. package/dist/chunk-XGQWTHW6.mjs.map +0 -1
  616. package/dist/chunk-XHSIT5DL.mjs +0 -16
  617. package/dist/chunk-XHSIT5DL.mjs.map +0 -1
  618. package/dist/chunk-XI7KRD2C.mjs +0 -13
  619. package/dist/chunk-XI7KRD2C.mjs.map +0 -1
  620. package/dist/chunk-XPSOKBRZ.mjs +0 -12
  621. package/dist/chunk-XPSOKBRZ.mjs.map +0 -1
  622. package/dist/chunk-XT74R35S.mjs +0 -1
  623. package/dist/chunk-XT74R35S.mjs.map +0 -1
  624. package/dist/chunk-YOPFSFTD.mjs +0 -13
  625. package/dist/chunk-YOPFSFTD.mjs.map +0 -1
  626. package/dist/chunk-YXAOYIRV.mjs +0 -1
  627. package/dist/chunk-YXAOYIRV.mjs.map +0 -1
  628. package/dist/chunk-YXD3AQAK.mjs +0 -1
  629. package/dist/chunk-YXD3AQAK.mjs.map +0 -1
  630. package/dist/chunk-Z7HWEOQX.mjs +0 -14
  631. package/dist/chunk-Z7HWEOQX.mjs.map +0 -1
  632. package/dist/chunk-ZA2XI3OV.mjs +0 -1
  633. package/dist/chunk-ZA2XI3OV.mjs.map +0 -1
  634. package/dist/chunk-ZPNX2QDE.mjs +0 -13
  635. package/dist/chunk-ZPNX2QDE.mjs.map +0 -1
  636. package/dist/error/AbortError.js +0 -36
  637. package/dist/error/AbortError.js.map +0 -1
  638. package/dist/error/TimeoutError.js +0 -36
  639. package/dist/error/TimeoutError.js.map +0 -1
  640. package/dist/error/index.d.mts +0 -2
  641. package/dist/error/index.d.ts +0 -2
  642. package/dist/error/index.js +0 -48
  643. package/dist/error/index.js.map +0 -1
  644. package/dist/error/index.mjs +0 -13
  645. package/dist/error/index.mjs.map +0 -1
  646. package/dist/function/after.js +0 -42
  647. package/dist/function/after.js.map +0 -1
  648. package/dist/function/debounce.js +0 -56
  649. package/dist/function/debounce.js.map +0 -1
  650. package/dist/function/negate.js +0 -33
  651. package/dist/function/negate.js.map +0 -1
  652. package/dist/function/noop.js +0 -32
  653. package/dist/function/noop.js.map +0 -1
  654. package/dist/function/once.js +0 -43
  655. package/dist/function/once.js.map +0 -1
  656. package/dist/function/throttle.js +0 -41
  657. package/dist/function/throttle.js.map +0 -1
  658. package/dist/math/clamp.js +0 -36
  659. package/dist/math/clamp.js.map +0 -1
  660. package/dist/math/inRange.js +0 -40
  661. package/dist/math/inRange.js.map +0 -1
  662. package/dist/math/mean.js +0 -44
  663. package/dist/math/mean.js.map +0 -1
  664. package/dist/math/meanBy.js +0 -50
  665. package/dist/math/meanBy.js.map +0 -1
  666. package/dist/math/random.js +0 -40
  667. package/dist/math/random.js.map +0 -1
  668. package/dist/math/randomInt.js +0 -47
  669. package/dist/math/randomInt.js.map +0 -1
  670. package/dist/math/range.js +0 -48
  671. package/dist/math/range.js.map +0 -1
  672. package/dist/math/round.js +0 -37
  673. package/dist/math/round.js.map +0 -1
  674. package/dist/math/sum.js +0 -37
  675. package/dist/math/sum.js.map +0 -1
  676. package/dist/math/sumBy.js +0 -45
  677. package/dist/math/sumBy.js.map +0 -1
  678. package/dist/object/clone.js +0 -67
  679. package/dist/object/clone.js.map +0 -1
  680. package/dist/object/cloneDeep.js +0 -117
  681. package/dist/object/cloneDeep.js.map +0 -1
  682. package/dist/object/flattenObject.js +0 -77
  683. package/dist/object/flattenObject.js.map +0 -1
  684. package/dist/object/invert.js +0 -40
  685. package/dist/object/invert.js.map +0 -1
  686. package/dist/object/omit.js +0 -37
  687. package/dist/object/omit.js.map +0 -1
  688. package/dist/object/omitBy.js +0 -40
  689. package/dist/object/omitBy.js.map +0 -1
  690. package/dist/object/pick.js +0 -37
  691. package/dist/object/pick.js.map +0 -1
  692. package/dist/object/pickBy.js +0 -40
  693. package/dist/object/pickBy.js.map +0 -1
  694. package/dist/predicate/isArrayLike.js +0 -40
  695. package/dist/predicate/isArrayLike.js.map +0 -1
  696. package/dist/predicate/isEqual.js +0 -73
  697. package/dist/predicate/isEqual.js.map +0 -1
  698. package/dist/predicate/isFunction.js +0 -33
  699. package/dist/predicate/isFunction.js.map +0 -1
  700. package/dist/predicate/isLength.js +0 -33
  701. package/dist/predicate/isLength.js.map +0 -1
  702. package/dist/predicate/isNil.js +0 -33
  703. package/dist/predicate/isNil.js.map +0 -1
  704. package/dist/predicate/isNotNil.js +0 -33
  705. package/dist/predicate/isNotNil.js.map +0 -1
  706. package/dist/predicate/isNull.js +0 -33
  707. package/dist/predicate/isNull.js.map +0 -1
  708. package/dist/predicate/isPlainObject.js +0 -49
  709. package/dist/predicate/isPlainObject.js.map +0 -1
  710. package/dist/predicate/isPrimitive.js +0 -33
  711. package/dist/predicate/isPrimitive.js.map +0 -1
  712. package/dist/predicate/isTypedArray.js +0 -33
  713. package/dist/predicate/isTypedArray.js.map +0 -1
  714. package/dist/predicate/isUndefined.js +0 -33
  715. package/dist/predicate/isUndefined.js.map +0 -1
  716. package/dist/promise/delay.js +0 -56
  717. package/dist/promise/delay.js.map +0 -1
  718. package/dist/promise/timeout.d.mts +0 -10
  719. package/dist/promise/timeout.d.ts +0 -10
  720. package/dist/promise/timeout.js +0 -70
  721. package/dist/promise/timeout.js.map +0 -1
  722. package/dist/promise/withTimeout.js +0 -75
  723. package/dist/promise/withTimeout.js.map +0 -1
  724. package/dist/string/camelCase.js +0 -51
  725. package/dist/string/camelCase.js.map +0 -1
  726. package/dist/string/capitalize.js +0 -33
  727. package/dist/string/capitalize.js.map +0 -1
  728. package/dist/string/kebabCase.js +0 -42
  729. package/dist/string/kebabCase.js.map +0 -1
  730. package/dist/string/lowerCase.js +0 -42
  731. package/dist/string/lowerCase.js.map +0 -1
  732. package/dist/string/snakeCase.js +0 -42
  733. package/dist/string/snakeCase.js.map +0 -1
  734. package/dist/string/startCase.js +0 -53
  735. package/dist/string/startCase.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/array/flattenDeep.ts"],"sourcesContent":["import { flatten } from './flatten.ts';\n\n/**\n * Utility type for recursively unpacking nested array types to extract the type of the innermost element\n *\n * @example\n * ExtractNestedArrayType<(number | (number | number[])[])[]>\n * // number\n *\n * ExtractNestedArrayType<(boolean | (string | number[])[])[]>\n * // string | number | boolean\n */\ntype ExtractNestedArrayType<T> = T extends ReadonlyArray<infer U> ? ExtractNestedArrayType<U> : T;\n\n/**\n * Flattens all depths of a nested array.\n *\n * @template T - The type of elements within the array.\n * @param {T[]} arr - The array to flatten.\n * @returns {Array<ExtractNestedArrayType<T>>} A new array that has been flattened.\n *\n * @example\n * const arr = flattenDeep([1, [2, [3]], [4, [5, 6]]]);\n * // Returns: [1, 2, 3, 4, 5, 6]\n */\nexport function flattenDeep<T>(arr: readonly T[]): Array<ExtractNestedArrayType<T>> {\n return flatten(arr, Infinity) as Array<ExtractNestedArrayType<T>>;\n}\n"],"mappings":";;;;;AAyBO,SAAS,YAAe,KAAqD;AAClF,SAAO,QAAQ,KAAK,QAAQ;AAC9B;","names":[]}
@@ -1,12 +0,0 @@
1
- // src/math/clamp.ts
2
- function clamp(value, bound1, bound2) {
3
- if (bound2 == null) {
4
- return Math.min(value, bound1);
5
- }
6
- return Math.min(Math.max(value, bound1), bound2);
7
- }
8
-
9
- export {
10
- clamp
11
- };
12
- //# sourceMappingURL=chunk-MLCL773E.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/math/clamp.ts"],"sourcesContent":["/**\n * Clamps a number within the inclusive lower and upper bounds.\n *\n * This function takes a number and two bounds, and returns the number clamped within the specified bounds.\n * If only one bound is provided, it returns the minimum of the value and the bound.\n *\n * @param {number} value - The number to clamp.\n * @param {number} minimum - The minimum bound to clamp the number.\n * @param {number} maximum - The maximum bound to clamp the number.\n * @returns {number} The clamped number within the specified bounds.\n *\n * @example\n * const result1 = clamp(10, 5); // result1 will be 5, as 10 is clamped to the bound 5\n * const result2 = clamp(10, 5, 15); // result2 will be 10, as it is within the bounds 5 and 15\n * const result3 = clamp(2, 5, 15); // result3 will be 5, as 2 is clamped to the lower bound 5\n * const result4 = clamp(20, 5, 15); // result4 will be 15, as 20 is clamped to the upper bound 15\n */\nexport function clamp(value: number, maximum: number): number;\nexport function clamp(value: number, minimum: number, maximum: number): number;\nexport function clamp(value: number, bound1: number, bound2?: number): number {\n if (bound2 == null) {\n return Math.min(value, bound1);\n }\n\n return Math.min(Math.max(value, bound1), bound2);\n}\n"],"mappings":";AAmBO,SAAS,MAAM,OAAe,QAAgB,QAAyB;AAC5E,MAAI,UAAU,MAAM;AAClB,WAAO,KAAK,IAAI,OAAO,MAAM;AAAA,EAC/B;AAEA,SAAO,KAAK,IAAI,KAAK,IAAI,OAAO,MAAM,GAAG,MAAM;AACjD;","names":[]}
@@ -1,14 +0,0 @@
1
- import {
2
- mean
3
- } from "./chunk-5ASRKEB4.mjs";
4
-
5
- // src/math/meanBy.ts
6
- function meanBy(items, getValue) {
7
- const nums = items.map((x) => getValue(x));
8
- return mean(nums);
9
- }
10
-
11
- export {
12
- meanBy
13
- };
14
- //# sourceMappingURL=chunk-MY4G7R3I.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/math/meanBy.ts"],"sourcesContent":["import { mean } from './mean.ts';\n\n/**\n * Calculates the average of an array of numbers when applying\n * the `getValue` function to each element.\n *\n * If the array is empty, this function returns `NaN`.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} items An array to calculate the average.\n * @param {(element: T) => number} getValue A function that selects a numeric value from each element.\n * @returns {number} The average of all the numbers as determined by the `getValue` function.\n *\n * @example\n * meanBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // Returns: 2\n * meanBy([], x => x.a); // Returns: NaN\n */\nexport function meanBy<T>(items: readonly T[], getValue: (element: T) => number): number {\n const nums = items.map(x => getValue(x));\n\n return mean(nums);\n}\n"],"mappings":";;;;;AAiBO,SAAS,OAAU,OAAqB,UAA0C;AACvF,QAAM,OAAO,MAAM,IAAI,OAAK,SAAS,CAAC,CAAC;AAEvC,SAAO,KAAK,IAAI;AAClB;","names":[]}
@@ -1,12 +0,0 @@
1
- // src/array/takeRight.ts
2
- function takeRight(arr, count = 1) {
3
- if (count <= 0) {
4
- return [];
5
- }
6
- return arr.slice(-count);
7
- }
8
-
9
- export {
10
- takeRight
11
- };
12
- //# sourceMappingURL=chunk-N3QYJX4T.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/array/takeRight.ts"],"sourcesContent":["/**\n * Returns a new array containing the last `count` elements from the input array `arr`.\n * If `count` is greater than the length of `arr`, the entire array is returned.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The array to take elements from.\n * @param {number} [count=1] - The number of elements to take.\n * @returns {T[]} A new array containing the last `count` elements from `arr`.\n *\n * @example\n * // Returns [4, 5]\n * takeRight([1, 2, 3, 4, 5], 2);\n *\n * @example\n * // Returns ['b', 'c']\n * takeRight(['a', 'b', 'c'], 2);\n *\n * @example\n * // Returns [1, 2, 3]\n * takeRight([1, 2, 3], 5);\n */\nexport function takeRight<T>(arr: readonly T[], count = 1): T[] {\n if (count <= 0) {\n return [];\n }\n\n return arr.slice(-count);\n}\n"],"mappings":";AAqBO,SAAS,UAAa,KAAmB,QAAQ,GAAQ;AAC9D,MAAI,SAAS,GAAG;AACd,WAAO,CAAC;AAAA,EACV;AAEA,SAAO,IAAI,MAAM,CAAC,KAAK;AACzB;","names":[]}
@@ -1,16 +0,0 @@
1
- // src/array/unionBy.ts
2
- function unionBy(arr1, arr2, mapper) {
3
- const map = /* @__PURE__ */ new Map();
4
- for (const item of [...arr1, ...arr2]) {
5
- const key = mapper(item);
6
- if (!map.has(key)) {
7
- map.set(key, item);
8
- }
9
- }
10
- return Array.from(map.values());
11
- }
12
-
13
- export {
14
- unionBy
15
- };
16
- //# sourceMappingURL=chunk-NFS7RWWE.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/array/unionBy.ts"],"sourcesContent":["/**\n * Creates an array of unique values, in order, from all given arrays using a provided mapping function to determine equality.\n *\n * @template T - The type of elements in the array.\n * @template U - The type of mapped elements.\n * @param {T[]} arr1 - The first array.\n * @param {T[]} arr2 - The second array.\n * @param {(item: T) => U} mapper - The function to map array elements to comparison values.\n * @returns {T[]} A new array containing the union of unique elements from `arr1` and `arr2`, based on the values returned by the mapping function.\n *\n * @example\n * // Custom mapping function for numbers (modulo comparison)\n * const moduloMapper = (x) => x % 3;\n * unionBy([1, 2, 3], [4, 5, 6], moduloMapper);\n * // Returns [1, 2, 3]\n *\n * @example\n * // Custom mapping function for objects with an 'id' property\n * const idMapper = (obj) => obj.id;\n * unionBy([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], idMapper);\n * // Returns [{ id: 1 }, { id: 2 }, { id: 3 }]\n */\nexport function unionBy<T, U>(arr1: readonly T[], arr2: readonly T[], mapper: (item: T) => U): T[] {\n const map = new Map<U, T>();\n\n for (const item of [...arr1, ...arr2]) {\n const key = mapper(item);\n\n if (!map.has(key)) {\n map.set(key, item);\n }\n }\n\n return Array.from(map.values());\n}\n"],"mappings":";AAsBO,SAAS,QAAc,MAAoB,MAAoB,QAA6B;AACjG,QAAM,MAAM,oBAAI,IAAU;AAE1B,aAAW,QAAQ,CAAC,GAAG,MAAM,GAAG,IAAI,GAAG;AACrC,UAAM,MAAM,OAAO,IAAI;AAEvB,QAAI,CAAC,IAAI,IAAI,GAAG,GAAG;AACjB,UAAI,IAAI,KAAK,IAAI;AAAA,IACnB;AAAA,EACF;AAEA,SAAO,MAAM,KAAK,IAAI,OAAO,CAAC;AAChC;","names":[]}
@@ -1 +0,0 @@
1
- //# sourceMappingURL=chunk-NKLIE2OI.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,14 +0,0 @@
1
- // src/array/takeRightWhile.ts
2
- function takeRightWhile(arr, shouldContinueTaking) {
3
- for (let i = arr.length - 1; i >= 0; i--) {
4
- if (!shouldContinueTaking(arr[i])) {
5
- return arr.slice(i + 1);
6
- }
7
- }
8
- return arr.slice();
9
- }
10
-
11
- export {
12
- takeRightWhile
13
- };
14
- //# sourceMappingURL=chunk-NTLX2MPV.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/array/takeRightWhile.ts"],"sourcesContent":["/**\n * Takes elements from the end of the array while the predicate function returns `true`.\n *\n * @template T - Type of elements in the input array.\n *\n * @param {T[]} arr - The array to take elements from.\n * @param {function(T): boolean} shouldContinueTaking - The function invoked per element.\n * @returns {T[]} A new array containing the elements taken from the end while the predicate returns `true`.\n *\n * @example\n * // Returns [3, 2, 1]\n * takeRightWhile([5, 4, 3, 2, 1], n => n < 4);\n *\n * @example\n * // Returns []\n * takeRightWhile([1, 2, 3], n => n > 3);\n */\nexport function takeRightWhile<T>(arr: readonly T[], shouldContinueTaking: (item: T) => boolean): T[] {\n for (let i = arr.length - 1; i >= 0; i--) {\n if (!shouldContinueTaking(arr[i])) {\n return arr.slice(i + 1);\n }\n }\n\n return arr.slice();\n}\n"],"mappings":";AAiBO,SAAS,eAAkB,KAAmB,sBAAiD;AACpG,WAAS,IAAI,IAAI,SAAS,GAAG,KAAK,GAAG,KAAK;AACxC,QAAI,CAAC,qBAAqB,IAAI,CAAC,CAAC,GAAG;AACjC,aAAO,IAAI,MAAM,IAAI,CAAC;AAAA,IACxB;AAAA,EACF;AAEA,SAAO,IAAI,MAAM;AACnB;","names":[]}
@@ -1,10 +0,0 @@
1
- // src/array/intersectionBy.ts
2
- function intersectionBy(firstArr, secondArr, mapper) {
3
- const mappedSecondSet = new Set(secondArr.map(mapper));
4
- return firstArr.filter((item) => mappedSecondSet.has(mapper(item)));
5
- }
6
-
7
- export {
8
- intersectionBy
9
- };
10
- //# sourceMappingURL=chunk-O6UXZR3U.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/array/intersectionBy.ts"],"sourcesContent":["/**\n * Returns the intersection of two arrays based on a mapping function.\n *\n * This function takes two arrays and a mapping function. It returns a new array containing\n * the elements from the first array that, when mapped using the provided function, have matching\n * mapped elements in the second array. It effectively filters out any elements from the first array\n * that do not have corresponding mapped values in the second array.\n *\n * @template T - The type of elements in the array.\n * @template U - The type of mapped elements.\n * @param {T[]} firstArr - The first array to compare.\n * @param {T[]} secondArr - The second array to compare.\n * @param {(item: T) => U} mapper - A function to map the elements of both arrays for comparison.\n * @returns {T[]} A new array containing the elements from the first array that have corresponding mapped values in the second array.\n *\n * @example\n * const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }];\n * const array2 = [{ id: 2 }, { id: 4 }];\n * const mapper = item => item.id;\n * const result = intersectionBy(array1, array2, mapper);\n * // result will be [{ id: 2 }] since only this element has a matching id in both arrays.\n */\nexport function intersectionBy<T, U>(firstArr: readonly T[], secondArr: readonly T[], mapper: (item: T) => U): T[] {\n const mappedSecondSet = new Set(secondArr.map(mapper));\n return firstArr.filter(item => mappedSecondSet.has(mapper(item)));\n}\n"],"mappings":";AAsBO,SAAS,eAAqB,UAAwB,WAAyB,QAA6B;AACjH,QAAM,kBAAkB,IAAI,IAAI,UAAU,IAAI,MAAM,CAAC;AACrD,SAAO,SAAS,OAAO,UAAQ,gBAAgB,IAAI,OAAO,IAAI,CAAC,CAAC;AAClE;","names":[]}
@@ -1,10 +0,0 @@
1
- // src/string/_internal/getWords.ts
2
- var CASE_SPLIT_PATTERN = /[A-Z]?[a-z]+|[0-9]+|[A-Z]+(?![a-z])/g;
3
- function getWords(str) {
4
- return Array.from(str.match(CASE_SPLIT_PATTERN) ?? []);
5
- }
6
-
7
- export {
8
- getWords
9
- };
10
- //# sourceMappingURL=chunk-OG2RLT5U.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/string/_internal/getWords.ts"],"sourcesContent":["/**\n * Regular expression pattern to split strings into words for various case conversions\n *\n * This pattern matchs sequences of characters in a string, considering the following case:\n * - Sequences of two or more uppercase letters followed by an uppercase letter and lowercase letters or digits (for acronyms)\n * - Sequences of one uppercase letter optionally followed by lowercase letters and digits\n * - Single uppercase letters\n * - Sequences of digis\n *\n * The resulting match can be used to convert camelCase, snake_case, kebab-case, and other mixed formats into\n * a consistent format like snake case.\n *\n * @example\n * const matches = 'camelCaseHTTPRequest'.match(CASE_SPLIT_PATTERN);\n * // matchs: ['camel', 'Case', 'HTTP', 'Request']\n */\nconst CASE_SPLIT_PATTERN = /[A-Z]?[a-z]+|[0-9]+|[A-Z]+(?![a-z])/g;\n\nexport function getWords(str: string): string[] {\n return Array.from(str.match(CASE_SPLIT_PATTERN) ?? []);\n}\n"],"mappings":";AAgBA,IAAM,qBAAqB;AAEpB,SAAS,SAAS,KAAuB;AAC9C,SAAO,MAAM,KAAK,IAAI,MAAM,kBAAkB,KAAK,CAAC,CAAC;AACvD;","names":[]}
@@ -1,18 +0,0 @@
1
- // src/function/after.ts
2
- var after = (n, func) => {
3
- if (!Number.isInteger(n) || n < 0) {
4
- throw new Error(`n must be a non-negative integer.`);
5
- }
6
- let counter = 0;
7
- return (...args) => {
8
- if (++counter >= n) {
9
- return func(...args);
10
- }
11
- return void 0;
12
- };
13
- };
14
-
15
- export {
16
- after
17
- };
18
- //# sourceMappingURL=chunk-OGZMEWPR.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/function/after.ts"],"sourcesContent":["/**\n * Creates a function that only executes starting from the `n`-th call.\n * The provided function will be invoked starting from the `n`-th call.\n *\n * This is particularly useful for scenarios involving events or asynchronous operations\n * where an action should occur only after a certain number of invocations.\n *\n * @template F - The type of the function to be invoked.\n * @param {number} n - The number of calls required for `func` to execute.\n * @param {F} func - The function to be invoked.\n * @returns {F} - A new function that:\n * - Tracks the number of calls.\n * - Invokes `func` starting from the `n`-th call.\n * - Returns `undefined` if fewer than `n` calls have been made.\n * @throws {Error} - Throws an error if `n` is negative.\n * @example\n *\n * const afterFn = after(3, () => {\n * console.log(\"called\")\n * });\n *\n * // Will not log anything.\n * afterFn()\n * // Will not log anything.\n * afterFn()\n * // Will log 'called'.\n * afterFn()\n */\n\nexport const after = <F extends (...args: any[]) => any>(n: number, func: F): F => {\n if (!Number.isInteger(n) || n < 0) {\n throw new Error(`n must be a non-negative integer.`);\n }\n\n let counter = 0;\n return ((...args: Parameters<F>) => {\n if (++counter >= n) {\n return func(...args);\n }\n return undefined;\n }) as F;\n};\n"],"mappings":";AA6BO,IAAM,QAAQ,CAAoC,GAAW,SAAe;AACjF,MAAI,CAAC,OAAO,UAAU,CAAC,KAAK,IAAI,GAAG;AACjC,UAAM,IAAI,MAAM,mCAAmC;AAAA,EACrD;AAEA,MAAI,UAAU;AACd,SAAQ,IAAI,SAAwB;AAClC,QAAI,EAAE,WAAW,GAAG;AAClB,aAAO,KAAK,GAAG,IAAI;AAAA,IACrB;AACA,WAAO;AAAA,EACT;AACF;","names":[]}
@@ -1,18 +0,0 @@
1
- // src/array/zip.ts
2
- function zip(...arrs) {
3
- const result = [];
4
- const maxIndex = Math.max(...arrs.map((x) => x.length));
5
- for (let i = 0; i < maxIndex; i++) {
6
- const element = [];
7
- for (const arr of arrs) {
8
- element.push(arr[i]);
9
- }
10
- result.push(element);
11
- }
12
- return result;
13
- }
14
-
15
- export {
16
- zip
17
- };
18
- //# sourceMappingURL=chunk-OLORW442.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/array/zip.ts"],"sourcesContent":["/**\n * Combines multiple arrays into a single array of tuples.\n *\n * This function takes multiple arrays and returns a new array where each element is a tuple\n * containing the corresponding elements from the input arrays. If the input arrays are of\n * different lengths, the resulting array will have the length of the longest input array,\n * with undefined values for missing elements.\n *\n * @param {...T[][]} arrs - The arrays to zip together.\n * @param arr1\n * @returns {T[][]} A new array of tuples containing the corresponding elements from the input arrays.\n *\n * @example\n * const arr1 = [1, 2, 3];\n * const arr2 = ['a', 'b', 'c'];\n * const result = zip(arr1, arr2);\n * // result will be [[1, 'a'], [2, 'b'], [3, 'c']]\n *\n * const arr3 = [true, false];\n * const result2 = zip(arr1, arr2, arr3);\n * // result2 will be [[1, 'a', true], [2, 'b', false], [3, 'c', undefined]]\n */\nexport function zip<T>(arr1: readonly T[]): Array<[T]>;\nexport function zip<T, U>(arr1: readonly T[], arr2: readonly U[]): Array<[T, U]>;\nexport function zip<T, U, V>(arr1: readonly T[], arr2: readonly U[], arr3: readonly V[]): Array<[T, U, V]>;\nexport function zip<T, U, V, W>(\n arr1: readonly T[],\n arr2: readonly U[],\n arr3: readonly V[],\n arr4: readonly W[]\n): Array<[T, U, V, W]>;\nexport function zip<T>(...arrs: Array<readonly T[]>): T[][] {\n const result: T[][] = [];\n\n const maxIndex = Math.max(...arrs.map(x => x.length));\n\n for (let i = 0; i < maxIndex; i++) {\n const element: T[] = [];\n\n for (const arr of arrs) {\n element.push(arr[i]);\n }\n\n result.push(element);\n }\n\n return result;\n}\n"],"mappings":";AA+BO,SAAS,OAAU,MAAkC;AAC1D,QAAM,SAAgB,CAAC;AAEvB,QAAM,WAAW,KAAK,IAAI,GAAG,KAAK,IAAI,OAAK,EAAE,MAAM,CAAC;AAEpD,WAAS,IAAI,GAAG,IAAI,UAAU,KAAK;AACjC,UAAM,UAAe,CAAC;AAEtB,eAAW,OAAO,MAAM;AACtB,cAAQ,KAAK,IAAI,CAAC,CAAC;AAAA,IACrB;AAEA,WAAO,KAAK,OAAO;AAAA,EACrB;AAEA,SAAO;AACT;","names":[]}
@@ -1,16 +0,0 @@
1
- // src/object/invert.ts
2
- function invert(obj) {
3
- const result = {};
4
- const keys = Object.keys(obj);
5
- for (let i = 0; i < keys.length; i++) {
6
- const key = keys[i];
7
- const value = obj[key];
8
- result[value] = key;
9
- }
10
- return result;
11
- }
12
-
13
- export {
14
- invert
15
- };
16
- //# sourceMappingURL=chunk-OLX53VEF.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/object/invert.ts"],"sourcesContent":["/**\n * Inverts the keys and values of an object. The keys of the input object become the values of the output object and vice versa.\n *\n * This function takes an object and creates a new object by inverting its keys and values. If the input object has duplicate values,\n * the key of the last occurrence will be used as the value for the new key in the output object. It effectively creates a reverse mapping\n * of the input object's key-value pairs.\n *\n * @template K - Type of the keys in the input object (string, number, symbol)\n * @template V - Type of the values in the input object (string, number, symbol)\n * @param {Record<K, V>} obj - The input object whose keys and values are to be inverted\n * @returns {{ [key in V]: K }} - A new object with keys and values inverted\n *\n * @example\n * invert({ a: 1, b: 2, c: 3 }); // { 1: 'a', 2: 'b', 3: 'c' }\n * invert({ 1: 'a', 2: 'b', 3: 'c' }); // { a: '1', b: '2', c: '3' }\n * invert({ a: 1, 2: 'b', c: 3, 4: 'd' }); // { 1: 'a', b: '2', 3: 'c', d: '4' }\n * invert({ a: Symbol('sym1'), b: Symbol('sym2') }); // { [Symbol('sym1')]: 'a', [Symbol('sym2')]: 'b' }\n */\nexport function invert<K extends PropertyKey, V extends PropertyKey>(obj: Record<K, V>): { [key in V]: K } {\n const result = {} as { [key in V]: K };\n\n const keys = Object.keys(obj) as K[];\n \n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n const value = obj[key];\n result[value] = key;\n }\n\n return result;\n}\n"],"mappings":";AAkBO,SAAS,OAAqD,KAAsC;AACzG,QAAM,SAAS,CAAC;AAEhB,QAAM,OAAO,OAAO,KAAK,GAAG;AAE5B,WAAS,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;AACpC,UAAM,MAAM,KAAK,CAAC;AAClB,UAAM,QAAQ,IAAI,GAAG;AACrB,WAAO,KAAK,IAAI;AAAA,EAClB;AAEA,SAAO;AACT;","names":[]}
@@ -1,18 +0,0 @@
1
- // src/array/maxBy.ts
2
- function maxBy(items, getValue) {
3
- let maxElement = items[0];
4
- let max = -Infinity;
5
- for (const element of items) {
6
- const value = getValue(element);
7
- if (value > max) {
8
- max = value;
9
- maxElement = element;
10
- }
11
- }
12
- return maxElement;
13
- }
14
-
15
- export {
16
- maxBy
17
- };
18
- //# sourceMappingURL=chunk-OOKNBU4V.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/array/maxBy.ts"],"sourcesContent":["/**\n * Finds the element in an array that has the maximum value when applying\n * the `getValue` function to each element.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} items The array of elements to search.\n * @param {(element: T) => number} getValue A function that selects a numeric value from each element.\n * @returns {T} The element with the maximum value as determined by the `getValue` function.\n * @example\n * maxBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // Returns: { a: 3 }\n * maxBy([], x => x.a); // Returns: undefined\n */\nexport function maxBy<T>(items: T[], getValue: (element: T) => number): T {\n let maxElement = items[0];\n let max = -Infinity;\n\n for (const element of items) {\n const value = getValue(element);\n if (value > max) {\n max = value;\n maxElement = element;\n }\n }\n\n return maxElement;\n}\n"],"mappings":";AAYO,SAAS,MAAS,OAAY,UAAqC;AACxE,MAAI,aAAa,MAAM,CAAC;AACxB,MAAI,MAAM;AAEV,aAAW,WAAW,OAAO;AAC3B,UAAM,QAAQ,SAAS,OAAO;AAC9B,QAAI,QAAQ,KAAK;AACf,YAAM;AACN,mBAAa;AAAA,IACf;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
@@ -1,13 +0,0 @@
1
- // src/array/dropRight.ts
2
- function dropRight(arr, itemsCount) {
3
- itemsCount = Math.min(-itemsCount, 0);
4
- if (itemsCount === 0) {
5
- return arr.slice();
6
- }
7
- return arr.slice(0, itemsCount);
8
- }
9
-
10
- export {
11
- dropRight
12
- };
13
- //# sourceMappingURL=chunk-OXZCMC5I.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/array/dropRight.ts"],"sourcesContent":["/**\n * Removes a specified number of elements from the end of an array and returns the rest.\n *\n * This function takes an array and a number, and returns a new array with the specified number\n * of elements removed from the end.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The array from which to drop elements.\n * @param {number} itemsCount - The number of elements to drop from the end of the array.\n * @returns {T[]} A new array with the specified number of elements removed from the end.\n *\n * @example\n * const array = [1, 2, 3, 4, 5];\n * const result = dropRight(array, 2);\n * // result will be [1, 2, 3] since the last two elements are dropped.\n */\nexport function dropRight<T>(arr: readonly T[], itemsCount: number): T[] {\n itemsCount = Math.min(-itemsCount, 0);\n\n if (itemsCount === 0) {\n return arr.slice();\n }\n\n return arr.slice(0, itemsCount);\n}\n"],"mappings":";AAgBO,SAAS,UAAa,KAAmB,YAAyB;AACvE,eAAa,KAAK,IAAI,CAAC,YAAY,CAAC;AAEpC,MAAI,eAAe,GAAG;AACpB,WAAO,IAAI,MAAM;AAAA,EACnB;AAEA,SAAO,IAAI,MAAM,GAAG,UAAU;AAChC;","names":[]}
@@ -1,15 +0,0 @@
1
- // src/array/compact.ts
2
- function compact(arr) {
3
- const result = [];
4
- for (const item of arr) {
5
- if (item) {
6
- result.push(item);
7
- }
8
- }
9
- return result;
10
- }
11
-
12
- export {
13
- compact
14
- };
15
- //# sourceMappingURL=chunk-PJPGJ2O6.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/array/compact.ts"],"sourcesContent":["type NotFalsey<T> = Exclude<T, false | null | 0 | '' | undefined>;\n\n/**\n * Removes falsey values (false, null, 0, '', undefined, NaN) from an array.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The input array to remove falsey values.\n * @returns {Array<Exclude<T, false | null | 0 | '' | undefined>>} - A new array with all falsey values removed.\n *\n * @example\n * compact([0, 1, false, 2, '', 3, null, undefined, 4, NaN, 5]);\n * Returns: [1, 2, 3, 4, 5]\n */\nexport function compact<T>(arr: readonly T[]): Array<NotFalsey<T>> {\n const result: Array<NotFalsey<T>> = [];\n\n for (const item of arr) {\n if (item) {\n result.push(item as NotFalsey<T>);\n }\n }\n\n return result;\n}\n"],"mappings":";AAaO,SAAS,QAAW,KAAwC;AACjE,QAAM,SAA8B,CAAC;AAErC,aAAW,QAAQ,KAAK;AACtB,QAAI,MAAM;AACR,aAAO,KAAK,IAAoB;AAAA,IAClC;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
@@ -1,10 +0,0 @@
1
- // src/array/without.ts
2
- function without(array, ...values) {
3
- const valuesSet = new Set(values);
4
- return array.filter((item) => !valuesSet.has(item));
5
- }
6
-
7
- export {
8
- without
9
- };
10
- //# sourceMappingURL=chunk-PYEYV7BY.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/array/without.ts"],"sourcesContent":["/**\n * Creates an array that excludes all specified values.\n *\n * It correctly excludes `NaN`, as it compares values using [SameValueZero](https://tc39.es/ecma262/multipage/abstract-operations.html#sec-samevaluezero).\n *\n * @template T The type of elements in the array.\n * @param {T[]} array - The array to filter.\n * @param {...T[]} values - The values to exclude.\n * @returns {T[]} A new array without the specified values.\n *\n * @example\n * // Removes the specified values from the array\n * without([1, 2, 3, 4, 5], 2, 4);\n * // Returns: [1, 3, 5]\n *\n * @example\n * // Removes specified string values from the array\n * without(['a', 'b', 'c', 'a'], 'a');\n * // Returns: ['b', 'c']\n */\nexport function without<T>(array: readonly T[], ...values: T[]): T[] {\n const valuesSet = new Set(values);\n return array.filter(item => !valuesSet.has(item));\n}\n"],"mappings":";AAoBO,SAAS,QAAW,UAAwB,QAAkB;AACnE,QAAM,YAAY,IAAI,IAAI,MAAM;AAChC,SAAO,MAAM,OAAO,UAAQ,CAAC,UAAU,IAAI,IAAI,CAAC;AAClD;","names":[]}
@@ -1,21 +0,0 @@
1
- import {
2
- unionBy
3
- } from "./chunk-NFS7RWWE.mjs";
4
- import {
5
- intersectionBy
6
- } from "./chunk-O6UXZR3U.mjs";
7
- import {
8
- differenceBy
9
- } from "./chunk-LVWX5B43.mjs";
10
-
11
- // src/array/xorBy.ts
12
- function xorBy(arr1, arr2, mapper) {
13
- const union = unionBy(arr1, arr2, mapper);
14
- const intersection = intersectionBy(arr1, arr2, mapper);
15
- return differenceBy(union, intersection, mapper);
16
- }
17
-
18
- export {
19
- xorBy
20
- };
21
- //# sourceMappingURL=chunk-Q47NGNXT.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/array/xorBy.ts"],"sourcesContent":["import { differenceBy } from './differenceBy.ts';\nimport { intersectionBy } from './intersectionBy.ts';\nimport { unionBy } from './unionBy.ts';\n\n/**\n * Computes the symmetric difference between two arrays using a custom mapping function.\n * The symmetric difference is the set of elements which are in either of the arrays,\n * but not in their intersection, determined by the result of the mapping function.\n *\n * @template T - Type of elements in the input arrays.\n * @template U - Type of the values returned by the mapping function.\n *\n * @param {T[]} arr1 - The first array.\n * @param {T[]} arr2 - The second array.\n * @param {(item: T) => U} mapper - The function to map array elements to comparison values.\n * @returns {T[]} An array containing the elements that are present in either `arr1` or `arr2` but not in both, based on the values returned by the mapping function.\n *\n * @example\n * // Custom mapping function for objects with an 'id' property\n * const idMapper = obj => obj.id;\n * xorBy([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], idMapper);\n * // Returns [{ id: 1 }, { id: 3 }]\n */\nexport function xorBy<T, U>(arr1: readonly T[], arr2: readonly T[], mapper: (item: T) => U): T[] {\n const union = unionBy(arr1, arr2, mapper);\n const intersection = intersectionBy(arr1, arr2, mapper);\n\n return differenceBy(union, intersection, mapper);\n}\n"],"mappings":";;;;;;;;;;;AAuBO,SAAS,MAAY,MAAoB,MAAoB,QAA6B;AAC/F,QAAM,QAAQ,QAAQ,MAAM,MAAM,MAAM;AACxC,QAAM,eAAe,eAAe,MAAM,MAAM,MAAM;AAEtD,SAAO,aAAa,OAAO,cAAc,MAAM;AACjD;","names":[]}
@@ -1,17 +0,0 @@
1
- // src/function/throttle.ts
2
- function throttle(func, throttleMs) {
3
- let lastCallTime;
4
- const throttledFunction = function(...args) {
5
- const now = Date.now();
6
- if (lastCallTime == null || now - lastCallTime >= throttleMs) {
7
- lastCallTime = now;
8
- func(...args);
9
- }
10
- };
11
- return throttledFunction;
12
- }
13
-
14
- export {
15
- throttle
16
- };
17
- //# sourceMappingURL=chunk-QOJGMVVR.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/function/throttle.ts"],"sourcesContent":["/**\n * Creates a throttled function that only invokes the provided function at most once\n * per every `throttleMs` milliseconds. Subsequent calls to the throttled function\n * within the wait time will not trigger the execution of the original function.\n *\n * @template F - The type of function.\n * @param {F} func - The function to throttle.\n * @param {number} throttleMs - The number of milliseconds to throttle executions to.\n * @returns {F} A new throttled function that accepts the same parameters as the original function.\n *\n * @example\n * const throttledFunction = throttle(() => {\n * console.log('Function executed');\n * }, 1000);\n *\n * // Will log 'Function executed' immediately\n * throttledFunction();\n *\n * // Will not log anything as it is within the throttle time\n * throttledFunction();\n *\n * // After 1 second\n * setTimeout(() => {\n * throttledFunction(); // Will log 'Function executed'\n * }, 1000);\n */\nexport function throttle<F extends (...args: any[]) => void>(func: F, throttleMs: number): F {\n let lastCallTime: number | null;\n\n const throttledFunction = function (...args: Parameters<F>) {\n const now = Date.now();\n\n if (lastCallTime == null || now - lastCallTime >= throttleMs) {\n lastCallTime = now;\n func(...args);\n }\n } as F;\n\n return throttledFunction;\n}\n"],"mappings":";AA0BO,SAAS,SAA6C,MAAS,YAAuB;AAC3F,MAAI;AAEJ,QAAM,oBAAoB,YAAa,MAAqB;AAC1D,UAAM,MAAM,KAAK,IAAI;AAErB,QAAI,gBAAgB,QAAQ,MAAM,gBAAgB,YAAY;AAC5D,qBAAe;AACf,WAAK,GAAG,IAAI;AAAA,IACd;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
@@ -1,21 +0,0 @@
1
- import {
2
- unionWith
3
- } from "./chunk-2ZCITDMK.mjs";
4
- import {
5
- intersectionWith
6
- } from "./chunk-XI7KRD2C.mjs";
7
- import {
8
- differenceWith
9
- } from "./chunk-6NVQAHXP.mjs";
10
-
11
- // src/array/xorWith.ts
12
- function xorWith(arr1, arr2, areElementsEqual) {
13
- const union = unionWith(arr1, arr2, areElementsEqual);
14
- const intersection = intersectionWith(arr1, arr2, areElementsEqual);
15
- return differenceWith(union, intersection, areElementsEqual);
16
- }
17
-
18
- export {
19
- xorWith
20
- };
21
- //# sourceMappingURL=chunk-QRSJBBFY.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/array/xorWith.ts"],"sourcesContent":["import { differenceWith } from './differenceWith.ts';\nimport { intersectionWith } from './intersectionWith.ts';\nimport { unionWith } from './unionWith.ts';\n\n/**\n * Computes the symmetric difference between two arrays using a custom equality function.\n * The symmetric difference is the set of elements which are in either of the arrays,\n * but not in their intersection.\n *\n * @template T - Type of elements in the input arrays.\n *\n * @param {T[]} arr1 - The first array.\n * @param {T[]} arr2 - The second array.\n * @param {(item1: T, item2: T) => boolean} areElementsEqual - The custom equality function to compare elements.\n * @returns {T[]} An array containing the elements that are present in either `arr1` or `arr2` but not in both, based on the custom equality function.\n *\n * @example\n * // Custom equality function for objects with an 'id' property\n * const areObjectsEqual = (a, b) => a.id === b.id;\n * xorWith([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], areObjectsEqual);\n * // Returns [{ id: 1 }, { id: 3 }]\n */\nexport function xorWith<T>(\n arr1: readonly T[],\n arr2: readonly T[],\n areElementsEqual: (item1: T, item2: T) => boolean\n): T[] {\n const union = unionWith(arr1, arr2, areElementsEqual);\n const intersection = intersectionWith(arr1, arr2, areElementsEqual);\n\n return differenceWith(union, intersection, areElementsEqual);\n}\n"],"mappings":";;;;;;;;;;;AAsBO,SAAS,QACd,MACA,MACA,kBACK;AACL,QAAM,QAAQ,UAAU,MAAM,MAAM,gBAAgB;AACpD,QAAM,eAAe,iBAAiB,MAAM,MAAM,gBAAgB;AAElE,SAAO,eAAe,OAAO,cAAc,gBAAgB;AAC7D;","names":[]}
@@ -1,9 +0,0 @@
1
- // src/predicate/isPrimitive.ts
2
- function isPrimitive(value) {
3
- return value == null || typeof value !== "object" && typeof value !== "function";
4
- }
5
-
6
- export {
7
- isPrimitive
8
- };
9
- //# sourceMappingURL=chunk-R6GLTTAB.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/predicate/isPrimitive.ts"],"sourcesContent":["/**\n * Checks whether a value is a JavaScript primitive.\n * JavaScript primitives include null, undefined, strings, numbers, booleans, symbols, and bigints.\n *\n * @param {unknown} x The value to check.\n * @returns {x is\n * | null\n * | undefined\n * | string\n * | number\n * | boolean\n * | symbol\n * | bigint} Returns true if `x` is a primitive, false otherwise.\n */\nexport function isPrimitive(value: unknown): value is null | undefined | string | number | boolean | symbol | bigint {\n return value == null || (typeof value !== 'object' && typeof value !== 'function');\n}\n"],"mappings":";AAcO,SAAS,YAAY,OAAyF;AACnH,SAAO,SAAS,QAAS,OAAO,UAAU,YAAY,OAAO,UAAU;AACzE;","names":[]}
@@ -1,13 +0,0 @@
1
- import {
2
- uniq
3
- } from "./chunk-DVK2N4KC.mjs";
4
-
5
- // src/array/union.ts
6
- function union(arr1, arr2) {
7
- return uniq(arr1.concat(arr2));
8
- }
9
-
10
- export {
11
- union
12
- };
13
- //# sourceMappingURL=chunk-R6QA7PLZ.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/array/union.ts"],"sourcesContent":["import { uniq } from './uniq.ts';\n\n/**\n * Creates an array of unique values from all given arrays.\n *\n * This function takes two arrays, merges them into a single array, and returns a new array\n * containing only the unique values from the merged array.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr1 - The first array to merge and filter for unique values.\n * @param {T[]} arr2 - The second array to merge and filter for unique values.\n * @returns {T[]} A new array of unique values.\n *\n * @example\n * const array1 = [1, 2, 3];\n * const array2 = [3, 4, 5];\n * const result = union(array1, array2);\n * // result will be [1, 2, 3, 4, 5]\n */\nexport function union<T>(arr1: readonly T[], arr2: readonly T[]): T[] {\n return uniq(arr1.concat(arr2));\n}\n"],"mappings":";;;;;AAmBO,SAAS,MAAS,MAAoB,MAAyB;AACpE,SAAO,KAAK,KAAK,OAAO,IAAI,CAAC;AAC/B;","names":[]}
@@ -1,14 +0,0 @@
1
- import {
2
- getWords
3
- } from "./chunk-OG2RLT5U.mjs";
4
-
5
- // src/string/lowerCase.ts
6
- var lowerCase = (str) => {
7
- const words = getWords(str);
8
- return words.map((word) => word.toLowerCase()).join(" ");
9
- };
10
-
11
- export {
12
- lowerCase
13
- };
14
- //# sourceMappingURL=chunk-RTFTLCF3.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/string/lowerCase.ts"],"sourcesContent":["import { getWords } from './_internal/getWords.ts';\n\n/**\n * Converts a string to lower case.\n *\n * Lower case is the naming convention in which each word is written in lowercase and separated by an space ( ) character.\n *\n * @param {string} str - The string that is to be changed to lower case.\n * @returns {string} - The converted string to lower case.\n *\n * @example\n * const convertedStr1 = lowerCase('camelCase') // returns 'camel case'\n * const convertedStr2 = lowerCase('some whitespace') // returns 'some whitespace'\n * const convertedStr3 = lowerCase('hyphen-text') // returns 'hyphen text'\n * const convertedStr4 = lowerCase('HTTPRequest') // returns 'http request'\n */\nexport const lowerCase = (str: string): string => {\n const words = getWords(str);\n return words.map(word => word.toLowerCase()).join(' ');\n};\n"],"mappings":";;;;;AAgBO,IAAM,YAAY,CAAC,QAAwB;AAChD,QAAM,QAAQ,SAAS,GAAG;AAC1B,SAAO,MAAM,IAAI,UAAQ,KAAK,YAAY,CAAC,EAAE,KAAK,GAAG;AACvD;","names":[]}
@@ -1,9 +0,0 @@
1
- // src/predicate/isTypedArray.ts
2
- function isTypedArray(x) {
3
- return x instanceof Uint8Array || x instanceof Uint8ClampedArray || x instanceof Uint16Array || x instanceof Uint32Array || x instanceof BigUint64Array || x instanceof Int8Array || x instanceof Int16Array || x instanceof Int32Array || x instanceof BigInt64Array || x instanceof Float32Array || x instanceof Float64Array;
4
- }
5
-
6
- export {
7
- isTypedArray
8
- };
9
- //# sourceMappingURL=chunk-SXFMQQ6F.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/predicate/isTypedArray.ts"],"sourcesContent":["/**\n * Checks if a value is a TypedArray.\n * @param {unknown} x The value to check.\n * @returns {x is\n * | Uint8Array\n * | Uint8ClampedArray\n * | Uint16Array\n * | Uint32Array\n * | BigUint64Array\n * | Int8Array\n * | Int16Array\n * | Int32Array\n * | BigInt64Array\n * | Float32Array\n * | Float64Array} Returns true if `x` is a TypedArray, false otherwise.\n */\nexport function isTypedArray(\n x: unknown\n): x is\n | Uint8Array\n | Uint8ClampedArray\n | Uint16Array\n | Uint32Array\n | BigUint64Array\n | Int8Array\n | Int16Array\n | Int32Array\n | BigInt64Array\n | Float32Array\n | Float64Array {\n return (\n x instanceof Uint8Array ||\n x instanceof Uint8ClampedArray ||\n x instanceof Uint16Array ||\n x instanceof Uint32Array ||\n x instanceof BigUint64Array ||\n x instanceof Int8Array ||\n x instanceof Int16Array ||\n x instanceof Int32Array ||\n x instanceof BigInt64Array ||\n x instanceof Float32Array ||\n x instanceof Float64Array\n );\n}\n"],"mappings":";AAgBO,SAAS,aACd,GAYe;AACf,SACE,aAAa,cACb,aAAa,qBACb,aAAa,eACb,aAAa,eACb,aAAa,kBACb,aAAa,aACb,aAAa,cACb,aAAa,cACb,aAAa,iBACb,aAAa,gBACb,aAAa;AAEjB;","names":[]}
@@ -1,16 +0,0 @@
1
- // src/math/random.ts
2
- function random(minimum, maximum) {
3
- if (maximum == null) {
4
- maximum = minimum;
5
- minimum = 0;
6
- }
7
- if (minimum >= maximum) {
8
- throw new Error("Invalid input: The maximum value must be greater than the minimum value.");
9
- }
10
- return Math.random() * (maximum - minimum) + minimum;
11
- }
12
-
13
- export {
14
- random
15
- };
16
- //# sourceMappingURL=chunk-SYWMYQYJ.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/math/random.ts"],"sourcesContent":["/**\n * Generate a random number within the given range.\n *\n * If only one argument is provided, a number between `0` and the given number is returned.\n *\n * @param {number} minimum - The lower bound (inclusive).\n * @param {number} maximum - The upper bound (exclusive).\n * @returns {number} A random number between minimum (inclusive) and maximum (exclusive). The number can be an integer or a decimal.\n * @throws {Error} Throws an error if `maximum` is not greater than `minimum`.\n *\n * @example\n * const result1 = random(0, 5); // Returns a random number between 0 and 5.\n * const result2 = random(5, 0); // If the minimum is greater than the maximum, an error is thrown\n * const result3 = random(5, 5); // If the minimum is equal to the maximum, an error is thrown.\n */\nexport function random(maximum: number): number;\nexport function random(minimum: number, maximum: number): number;\nexport function random(minimum: number, maximum?: number): number {\n if (maximum == null) {\n maximum = minimum;\n minimum = 0;\n }\n\n if (minimum >= maximum) {\n throw new Error('Invalid input: The maximum value must be greater than the minimum value.');\n }\n\n return Math.random() * (maximum - minimum) + minimum;\n}\n"],"mappings":";AAiBO,SAAS,OAAO,SAAiB,SAA0B;AAChE,MAAI,WAAW,MAAM;AACnB,cAAU;AACV,cAAU;AAAA,EACZ;AAEA,MAAI,WAAW,SAAS;AACtB,UAAM,IAAI,MAAM,0EAA0E;AAAA,EAC5F;AAEA,SAAO,KAAK,OAAO,KAAK,UAAU,WAAW;AAC/C;","names":[]}
@@ -1,9 +0,0 @@
1
- // src/string/capitalize.ts
2
- var capitalize = (str) => {
3
- return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
4
- };
5
-
6
- export {
7
- capitalize
8
- };
9
- //# sourceMappingURL=chunk-U56ZOM7L.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/string/capitalize.ts"],"sourcesContent":["/**\n * Converts the first character of string to upper case and the remaining to lower case.\n *\n * @template T - Literal type of the string.\n * @param {T} str - The string to be converted to uppercase.\n * @returns {Capitalize<T>} - The capitalized string.\n *\n * @example\n * const result = capitalize('fred') // returns 'Fred'\n * const result2 = capitalize('FRED') // returns 'Fred'\n */\n\nexport const capitalize = <T extends string>(str: T): Capitalize<T> => {\n return (str.charAt(0).toUpperCase() + str.slice(1).toLowerCase()) as Capitalize<T>;\n};\n"],"mappings":";AAYO,IAAM,aAAa,CAAmB,QAA0B;AACrE,SAAQ,IAAI,OAAO,CAAC,EAAE,YAAY,IAAI,IAAI,MAAM,CAAC,EAAE,YAAY;AACjE;","names":[]}
@@ -1,13 +0,0 @@
1
- import {
2
- flatten
3
- } from "./chunk-33MSBDC6.mjs";
4
-
5
- // src/array/flatMap.ts
6
- function flatMap(arr, iteratee, depth = 1) {
7
- return flatten(arr.map((item) => iteratee(item)), depth);
8
- }
9
-
10
- export {
11
- flatMap
12
- };
13
- //# sourceMappingURL=chunk-UY76KTPE.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/array/flatMap.ts"],"sourcesContent":["import { flatten } from './flatten.ts';\n\n/**\n * Maps each element in the array using the iteratee function and flattens the result up to the specified depth.\n *\n * @template T - The type of elements within the array.\n * @template U - The type of elements within the returned array from the iteratee function.\n * @template D - The depth to which the array should be flattened.\n * @param {T[]} arr - The array to flatten.\n * @param {(item: T) => U} iteratee - The function that produces the new array elements.\n * @param {D} depth - The depth level specifying how deep a nested array structure should be flattened. Defaults to 1.\n * @returns {Array<FlatArray<U[], D>>} The new array with the mapped and flattened elements.\n *\n * @example\n * const arr = [1, 2, 3];\n *\n * flatMap(arr, (item: number) => [item, item]);\n * // [1, 1, 2, 2, 3, 3]\n *\n * flatMap(arr, (item: number) => [[item, item]], 2);\n * // [1, 1, 2, 2, 3, 3]\n */\nexport function flatMap<T, U, D extends number>(\n arr: readonly T[],\n iteratee: (item: T) => U,\n depth = 1 as D\n): Array<FlatArray<U[], D>> {\n return flatten(arr.map(item => iteratee(item)), depth);\n}\n"],"mappings":";;;;;AAsBO,SAAS,QACd,KACA,UACA,QAAQ,GACkB;AAC1B,SAAO,QAAQ,IAAI,IAAI,UAAQ,SAAS,IAAI,CAAC,GAAG,KAAK;AACvD;","names":[]}
@@ -1,9 +0,0 @@
1
- // src/predicate/isUndefined.ts
2
- function isUndefined(x) {
3
- return x === void 0;
4
- }
5
-
6
- export {
7
- isUndefined
8
- };
9
- //# sourceMappingURL=chunk-VH2PV426.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/predicate/isUndefined.ts"],"sourcesContent":["/**\n * Checks if the given value is undefined.\n *\n * This function tests whether the provided value is strictly equal to `undefined`.\n * It returns `true` if the value is `undefined`, and `false` otherwise.\n *\n * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `undefined`.\n *\n * @param {unknown} x - The value to test if it is undefined.\n * @returns {x is undefined} true if the value is undefined, false otherwise.\n *\n * @example\n * const value1 = undefined;\n * const value2 = null;\n * const value3 = 42;\n *\n * console.log(isUndefined(value1)); // true\n * console.log(isUndefined(value2)); // false\n * console.log(isUndefined(value3)); // false\n */\nexport function isUndefined(x: unknown): x is undefined {\n return x === undefined;\n}\n"],"mappings":";AAoBO,SAAS,YAAY,GAA4B;AACtD,SAAO,MAAM;AACf;","names":[]}
@@ -1,43 +0,0 @@
1
- // src/object/clone.ts
2
- function clone(obj) {
3
- if (isPrimitive(obj)) {
4
- return obj;
5
- }
6
- if (Array.isArray(obj)) {
7
- return obj.slice();
8
- }
9
- if (obj instanceof Date) {
10
- return new Date(obj.getTime());
11
- }
12
- if (obj instanceof RegExp) {
13
- return new RegExp(obj.source, obj.flags);
14
- }
15
- if (obj instanceof Map) {
16
- const result = /* @__PURE__ */ new Map();
17
- for (const [key, value] of obj) {
18
- result.set(key, value);
19
- }
20
- return result;
21
- }
22
- if (obj instanceof Set) {
23
- const result = /* @__PURE__ */ new Set();
24
- for (const value of obj) {
25
- result.add(value);
26
- }
27
- return result;
28
- }
29
- if (typeof obj === "object") {
30
- const prototype = Object.getPrototypeOf(obj);
31
- const result = Object.create(prototype);
32
- return Object.assign(result, obj);
33
- }
34
- return obj;
35
- }
36
- function isPrimitive(value) {
37
- return value == null || typeof value !== "object" && typeof value !== "function";
38
- }
39
-
40
- export {
41
- clone
42
- };
43
- //# sourceMappingURL=chunk-VRUTBJYS.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/object/clone.ts"],"sourcesContent":["/**\n * Creates a shallow clone of the given object.\n *\n * @template T - The type of the object.\n * @param {T} obj - The object to clone.\n * @returns {T} - A shallow clone of the given object.\n *\n * @example\n * // Clone a primitive values\n * const num = 29;\n * const clonedNum = clone(num);\n * console.log(clonedNum); // 29\n * console.log(clonedNum === num) ; // true\n *\n * @example\n * // Clone an array\n * const arr = [1, 2, 3];\n * const clonedArr = clone(arr);\n * console.log(clonedArr); // [1, 2, 3]\n * console.log(clonedArr === arr); // false\n *\n * @example\n * // Clone an object\n * const obj = { a: 1, b: 'es-toolkit', c: [1, 2, 3] };\n * const clonedObj = clone(obj);\n * console.log(clonedObj); // { a: 1, b: 'es-toolkit', c: [1, 2, 3] }\n * console.log(clonedObj === obj); // false\n */\nexport function clone<T>(obj: T): T {\n if (isPrimitive(obj)) {\n return obj;\n }\n\n if (Array.isArray(obj)) {\n return obj.slice() as T;\n }\n\n if (obj instanceof Date) {\n return new Date(obj.getTime()) as T;\n }\n\n if (obj instanceof RegExp) {\n return new RegExp(obj.source, obj.flags) as T;\n }\n\n if (obj instanceof Map) {\n const result = new Map();\n for (const [key, value] of obj) {\n result.set(key, value);\n }\n return result as T;\n }\n\n if (obj instanceof Set) {\n const result = new Set();\n for (const value of obj) {\n result.add(value);\n }\n return result as T;\n }\n\n if (typeof obj === 'object') {\n const prototype = Object.getPrototypeOf(obj);\n const result = Object.create(prototype)\n return Object.assign(result, obj);\n }\n return obj;\n}\n\ntype Primitive = null | undefined | string | number | boolean | symbol | bigint;\n\nfunction isPrimitive(value: unknown): value is Primitive {\n return value == null || (typeof value !== 'object' && typeof value !== 'function');\n}\n"],"mappings":";AA4BO,SAAS,MAAS,KAAW;AAClC,MAAI,YAAY,GAAG,GAAG;AACpB,WAAO;AAAA,EACT;AAEA,MAAI,MAAM,QAAQ,GAAG,GAAG;AACtB,WAAO,IAAI,MAAM;AAAA,EACnB;AAEA,MAAI,eAAe,MAAM;AACvB,WAAO,IAAI,KAAK,IAAI,QAAQ,CAAC;AAAA,EAC/B;AAEA,MAAI,eAAe,QAAQ;AACzB,WAAO,IAAI,OAAO,IAAI,QAAQ,IAAI,KAAK;AAAA,EACzC;AAEA,MAAI,eAAe,KAAK;AACtB,UAAM,SAAS,oBAAI,IAAI;AACvB,eAAW,CAAC,KAAK,KAAK,KAAK,KAAK;AAC9B,aAAO,IAAI,KAAK,KAAK;AAAA,IACvB;AACA,WAAO;AAAA,EACT;AAEA,MAAI,eAAe,KAAK;AACtB,UAAM,SAAS,oBAAI,IAAI;AACvB,eAAW,SAAS,KAAK;AACvB,aAAO,IAAI,KAAK;AAAA,IAClB;AACA,WAAO;AAAA,EACT;AAEA,MAAI,OAAO,QAAQ,UAAU;AAC3B,UAAM,YAAY,OAAO,eAAe,GAAG;AAC3C,UAAM,SAAS,OAAO,OAAO,SAAS;AACtC,WAAO,OAAO,OAAO,QAAQ,GAAG;AAAA,EAClC;AACA,SAAO;AACT;AAIA,SAAS,YAAY,OAAoC;AACvD,SAAO,SAAS,QAAS,OAAO,UAAU,YAAY,OAAO,UAAU;AACzE;","names":[]}
@@ -1,9 +0,0 @@
1
- // src/predicate/isNil.ts
2
- function isNil(x) {
3
- return x == null;
4
- }
5
-
6
- export {
7
- isNil
8
- };
9
- //# sourceMappingURL=chunk-WMM7TZLG.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/predicate/isNil.ts"],"sourcesContent":["/**\n * Checks if a given value is null or undefined.\n *\n * This function tests whether the provided value is either `null` or `undefined`.\n * It returns `true` if the value is `null` or `undefined`, and `false` otherwise.\n *\n * This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to `null` or `undefined`.\n *\n * @param {unknown} x - The value to test for null or undefined.\n * @returns {boolean} `true` if the value is null or undefined, `false` otherwise.\n *\n * @example\n * const value1 = null;\n * const value2 = undefined;\n * const value3 = 42;\n * const result1 = isNil(value1); // true\n * const result2 = isNil(value2); // true\n * const result3 = isNil(value3); // false\n */\nexport function isNil(x: unknown): x is null | undefined {\n return x == null;\n}\n"],"mappings":";AAmBO,SAAS,MAAM,GAAmC;AACvD,SAAO,KAAK;AACd;","names":[]}