es-toolkit 1.0.3-dev.37 → 1.0.3

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 (470) hide show
  1. package/dist/array/chunk.d.ts +1 -3
  2. package/dist/array/chunk.spec.d.ts +1 -0
  3. package/dist/array/difference.d.ts +1 -3
  4. package/dist/array/difference.spec.d.ts +1 -0
  5. package/dist/array/differenceBy.d.ts +1 -3
  6. package/dist/array/differenceBy.spec.d.ts +1 -0
  7. package/dist/array/differenceWith.d.ts +1 -3
  8. package/dist/array/differenceWith.spec.d.ts +1 -0
  9. package/dist/array/drop.d.ts +1 -3
  10. package/dist/array/drop.spec.d.ts +1 -0
  11. package/dist/array/dropRight.d.ts +1 -3
  12. package/dist/array/dropRight.spec.d.ts +1 -0
  13. package/dist/array/dropRightWhile.d.ts +1 -3
  14. package/dist/array/dropRightWhile.spec.d.ts +1 -0
  15. package/dist/array/dropWhile.d.ts +1 -3
  16. package/dist/array/dropWhile.spec.d.ts +1 -0
  17. package/dist/array/groupBy.d.ts +1 -3
  18. package/dist/array/groupBy.spec.d.ts +1 -0
  19. package/dist/array/index.d.ts +30 -30
  20. package/dist/array/index.js +842 -199
  21. package/dist/array/intersection.d.ts +1 -3
  22. package/dist/array/intersection.spec.d.ts +1 -0
  23. package/dist/array/intersectionBy.d.ts +1 -3
  24. package/dist/array/intersectionBy.spec.d.ts +1 -0
  25. package/dist/array/intersectionWith.d.ts +1 -3
  26. package/dist/array/intersectionWith.spec.d.ts +1 -0
  27. package/dist/array/partition.d.ts +1 -3
  28. package/dist/array/partition.spec.d.ts +1 -0
  29. package/dist/array/sample.d.ts +1 -3
  30. package/dist/array/sample.spec.d.ts +1 -0
  31. package/dist/array/shuffle.d.ts +1 -3
  32. package/dist/array/shuffle.spec.d.ts +1 -0
  33. package/dist/array/take.d.ts +1 -3
  34. package/dist/array/take.spec.d.ts +1 -0
  35. package/dist/array/takeRight.d.ts +1 -3
  36. package/dist/array/takeRight.spec.d.ts +1 -0
  37. package/dist/array/takeRightWhile.d.ts +1 -3
  38. package/dist/array/takeRightWhile.spec.d.ts +1 -0
  39. package/dist/array/takeWhile.d.ts +1 -3
  40. package/dist/array/takeWhile.spec.d.ts +1 -0
  41. package/dist/array/union.d.ts +1 -3
  42. package/dist/array/union.spec.d.ts +1 -0
  43. package/dist/array/unionBy.d.ts +1 -3
  44. package/dist/array/unionBy.spec.d.ts +1 -0
  45. package/dist/array/unionWith.d.ts +1 -3
  46. package/dist/array/unionWith.spec.d.ts +1 -0
  47. package/dist/array/uniq.d.ts +1 -3
  48. package/dist/array/uniq.spec.d.ts +1 -0
  49. package/dist/array/uniqBy.d.ts +1 -3
  50. package/dist/array/uniqBy.spec.d.ts +1 -0
  51. package/dist/array/uniqWith.d.ts +1 -3
  52. package/dist/array/uniqWith.spec.d.ts +1 -0
  53. package/dist/array/xor.d.ts +1 -3
  54. package/dist/array/xor.spec.d.ts +1 -0
  55. package/dist/array/xorBy.d.ts +1 -3
  56. package/dist/array/xorBy.spec.d.ts +1 -0
  57. package/dist/array/xorWith.d.ts +1 -3
  58. package/dist/array/xorWith.spec.d.ts +1 -0
  59. package/dist/array/zip.d.ts +4 -6
  60. package/dist/array/zip.spec.d.ts +1 -0
  61. package/dist/array/zipWith.d.ts +4 -6
  62. package/dist/array/zipWith.spec.d.ts +1 -0
  63. package/dist/function/debounce.d.ts +1 -3
  64. package/dist/function/debounce.spec.d.ts +1 -0
  65. package/dist/function/index.d.ts +3 -3
  66. package/dist/function/index.js +78 -47
  67. package/dist/function/once.d.ts +1 -3
  68. package/dist/function/once.spec.d.ts +1 -0
  69. package/dist/function/throttle.d.ts +1 -3
  70. package/dist/function/throttle.spec.d.ts +1 -0
  71. package/dist/index.d.ts +6 -45
  72. package/dist/index.js +1271 -288
  73. package/dist/math/clamp.d.ts +2 -4
  74. package/dist/math/clamp.spec.d.ts +1 -0
  75. package/dist/math/index.d.ts +3 -3
  76. package/dist/math/index.js +132 -41
  77. package/dist/math/round.d.ts +1 -3
  78. package/dist/math/round.spec.d.ts +1 -0
  79. package/dist/math/sum.d.ts +1 -3
  80. package/dist/math/sum.spec.d.ts +1 -0
  81. package/dist/object/index.d.ts +4 -4
  82. package/dist/object/index.js +256 -62
  83. package/dist/object/omit.d.ts +1 -3
  84. package/dist/object/omit.spec.d.ts +1 -0
  85. package/dist/object/omitBy.d.ts +1 -3
  86. package/dist/object/omitBy.spec.d.ts +1 -0
  87. package/dist/object/pick.d.ts +1 -3
  88. package/dist/object/pick.spec.d.ts +1 -0
  89. package/dist/object/pickBy.d.ts +1 -3
  90. package/dist/object/pickBy.spec.d.ts +1 -0
  91. package/dist/predicate/index.d.ts +4 -4
  92. package/dist/predicate/index.js +84 -42
  93. package/dist/predicate/isNil.d.ts +1 -3
  94. package/dist/predicate/isNil.spec.d.ts +1 -0
  95. package/dist/predicate/isNotNil.d.ts +1 -3
  96. package/dist/predicate/isNotNil.spec.d.ts +1 -0
  97. package/dist/predicate/isNull.d.ts +1 -3
  98. package/dist/predicate/isNull.spec.d.ts +1 -0
  99. package/dist/predicate/isUndefined.d.ts +1 -3
  100. package/dist/predicate/isUndefined.spec.d.ts +1 -0
  101. package/dist/promise/delay.d.ts +1 -3
  102. package/dist/promise/delay.spec.d.ts +1 -0
  103. package/dist/promise/index.d.ts +1 -1
  104. package/dist/promise/index.js +23 -31
  105. package/esm/_virtual/_rollupPluginBabelHelpers.mjs +163 -0
  106. package/esm/array/_virtual/_rollupPluginBabelHelpers.mjs +78 -0
  107. package/{dist/array/chunk.d.mts → esm/array/chunk.mjs} +13 -1
  108. package/{dist/array/difference.d.mts → esm/array/difference.mjs} +12 -8
  109. package/{dist/array/differenceBy.d.mts → esm/array/differenceBy.mjs} +17 -10
  110. package/{dist/array/differenceWith.d.mts → esm/array/differenceWith.mjs} +12 -6
  111. package/{dist/array/drop.d.mts → esm/array/drop.mjs} +6 -4
  112. package/{dist/array/dropRight.d.mts → esm/array/dropRight.mjs} +5 -3
  113. package/{dist/array/dropRightWhile.d.mts → esm/array/dropRightWhile.mjs} +11 -5
  114. package/{dist/array/dropWhile.d.mts → esm/array/dropWhile.mjs} +10 -5
  115. package/{dist/array/groupBy.d.mts → esm/array/groupBy.mjs} +26 -5
  116. package/{dist/array/intersection.d.mts → esm/array/intersection.mjs} +8 -4
  117. package/{dist/array/intersectionBy.d.mts → esm/array/intersectionBy.mjs} +12 -5
  118. package/{dist/array/intersectionWith.d.mts → esm/array/intersectionWith.mjs} +12 -6
  119. package/{dist/array/partition.d.mts → esm/array/partition.mjs} +30 -8
  120. package/{dist/array/sample.d.mts → esm/array/sample.mjs} +5 -2
  121. package/{dist/array/shuffle.d.mts → esm/array/shuffle.mjs} +13 -2
  122. package/{dist/array/take.d.mts → esm/array/take.mjs} +7 -5
  123. package/{dist/array/takeRight.d.mts → esm/array/takeRight.mjs} +10 -5
  124. package/{dist/array/takeRightWhile.d.mts → esm/array/takeRightWhile.mjs} +12 -5
  125. package/{dist/array/takeWhile.d.mts → esm/array/takeWhile.mjs} +21 -1
  126. package/{dist/array/union.d.mts → esm/array/union.mjs} +7 -3
  127. package/{dist/array/unionBy.d.mts → esm/array/unionBy.mjs} +16 -4
  128. package/{dist/array/unionWith.d.mts → esm/array/unionWith.mjs} +8 -4
  129. package/esm/array/uniq.mjs +37 -0
  130. package/{dist/array/uniqBy.d.mts → esm/array/uniqBy.mjs} +7 -1
  131. package/esm/array/uniqWith.mjs +39 -0
  132. package/{dist/array/xor.d.mts → esm/array/xor.mjs} +10 -4
  133. package/{dist/array/xorBy.d.mts → esm/array/xorBy.mjs} +13 -5
  134. package/{dist/array/xorWith.d.mts → esm/array/xorWith.mjs} +13 -5
  135. package/esm/array/zip.mjs +52 -0
  136. package/{dist/array/zipWith.d.mts → esm/array/zipWith.mjs} +26 -6
  137. package/{dist/function/debounce.d.mts → esm/function/debounce.mjs} +18 -5
  138. package/{dist/function/once.d.mts → esm/function/once.mjs} +14 -2
  139. package/{dist/function/throttle.d.mts → esm/function/throttle.mjs} +13 -3
  140. package/esm/math/_virtual/_rollupPluginBabelHelpers.mjs +66 -0
  141. package/{dist/math/clamp.d.mts → esm/math/clamp.mjs} +7 -2
  142. package/{dist/math/round.d.mts → esm/math/round.mjs} +7 -3
  143. package/esm/math/sum.mjs +33 -0
  144. package/esm/object/_virtual/_rollupPluginBabelHelpers.mjs +151 -0
  145. package/{dist/object/omit.d.mts → esm/object/omit.mjs} +19 -2
  146. package/{dist/object/omitBy.d.mts → esm/object/omitBy.mjs} +18 -4
  147. package/{dist/object/pick.d.mts → esm/object/pick.mjs} +19 -2
  148. package/{dist/object/pickBy.d.mts → esm/object/pickBy.mjs} +18 -4
  149. package/{dist/predicate/isNil.d.mts → esm/predicate/isNil.mjs} +6 -4
  150. package/{dist/predicate/isNotNil.d.mts → esm/predicate/isNotNil.mjs} +4 -2
  151. package/{dist/predicate/isNull.d.mts → esm/predicate/isNull.mjs} +6 -4
  152. package/{dist/predicate/isUndefined.d.mts → esm/predicate/isUndefined.mjs} +6 -4
  153. package/{dist/promise/delay.d.mts → esm/promise/delay.mjs} +8 -4
  154. package/package.json +48 -118
  155. package/dist/array/chunk.js +0 -43
  156. package/dist/array/chunk.js.map +0 -1
  157. package/dist/array/chunk.mjs +0 -8
  158. package/dist/array/chunk.mjs.map +0 -1
  159. package/dist/array/difference.js +0 -35
  160. package/dist/array/difference.js.map +0 -1
  161. package/dist/array/difference.mjs +0 -8
  162. package/dist/array/difference.mjs.map +0 -1
  163. package/dist/array/differenceBy.js +0 -36
  164. package/dist/array/differenceBy.js.map +0 -1
  165. package/dist/array/differenceBy.mjs +0 -8
  166. package/dist/array/differenceBy.mjs.map +0 -1
  167. package/dist/array/differenceWith.js +0 -37
  168. package/dist/array/differenceWith.js.map +0 -1
  169. package/dist/array/differenceWith.mjs +0 -8
  170. package/dist/array/differenceWith.mjs.map +0 -1
  171. package/dist/array/drop.js +0 -33
  172. package/dist/array/drop.js.map +0 -1
  173. package/dist/array/drop.mjs +0 -8
  174. package/dist/array/drop.mjs.map +0 -1
  175. package/dist/array/dropRight.js +0 -33
  176. package/dist/array/dropRight.js.map +0 -1
  177. package/dist/array/dropRight.mjs +0 -8
  178. package/dist/array/dropRight.mjs.map +0 -1
  179. package/dist/array/dropRightWhile.js +0 -43
  180. package/dist/array/dropRightWhile.js.map +0 -1
  181. package/dist/array/dropRightWhile.mjs +0 -9
  182. package/dist/array/dropRightWhile.mjs.map +0 -1
  183. package/dist/array/dropWhile.js +0 -34
  184. package/dist/array/dropWhile.js.map +0 -1
  185. package/dist/array/dropWhile.mjs +0 -8
  186. package/dist/array/dropWhile.mjs.map +0 -1
  187. package/dist/array/groupBy.js +0 -41
  188. package/dist/array/groupBy.js.map +0 -1
  189. package/dist/array/groupBy.mjs +0 -8
  190. package/dist/array/groupBy.mjs.map +0 -1
  191. package/dist/array/index.js.map +0 -1
  192. package/dist/array/index.mjs +0 -125
  193. package/dist/array/index.mjs.map +0 -1
  194. package/dist/array/intersection.js +0 -35
  195. package/dist/array/intersection.js.map +0 -1
  196. package/dist/array/intersection.mjs +0 -8
  197. package/dist/array/intersection.mjs.map +0 -1
  198. package/dist/array/intersectionBy.js +0 -36
  199. package/dist/array/intersectionBy.js.map +0 -1
  200. package/dist/array/intersectionBy.mjs +0 -8
  201. package/dist/array/intersectionBy.mjs.map +0 -1
  202. package/dist/array/intersectionWith.js +0 -37
  203. package/dist/array/intersectionWith.js.map +0 -1
  204. package/dist/array/intersectionWith.mjs +0 -8
  205. package/dist/array/intersectionWith.mjs.map +0 -1
  206. package/dist/array/partition.js +0 -42
  207. package/dist/array/partition.js.map +0 -1
  208. package/dist/array/partition.mjs +0 -8
  209. package/dist/array/partition.mjs.map +0 -1
  210. package/dist/array/sample.js +0 -34
  211. package/dist/array/sample.js.map +0 -1
  212. package/dist/array/sample.mjs +0 -8
  213. package/dist/array/sample.mjs.map +0 -1
  214. package/dist/array/shuffle.js +0 -37
  215. package/dist/array/shuffle.js.map +0 -1
  216. package/dist/array/shuffle.mjs +0 -8
  217. package/dist/array/shuffle.mjs.map +0 -1
  218. package/dist/array/take.js +0 -33
  219. package/dist/array/take.js.map +0 -1
  220. package/dist/array/take.mjs +0 -8
  221. package/dist/array/take.mjs.map +0 -1
  222. package/dist/array/takeRight.js +0 -36
  223. package/dist/array/takeRight.js.map +0 -1
  224. package/dist/array/takeRight.mjs +0 -8
  225. package/dist/array/takeRight.mjs.map +0 -1
  226. package/dist/array/takeRightWhile.js +0 -38
  227. package/dist/array/takeRightWhile.js.map +0 -1
  228. package/dist/array/takeRightWhile.mjs +0 -8
  229. package/dist/array/takeRightWhile.mjs.map +0 -1
  230. package/dist/array/takeWhile.js +0 -40
  231. package/dist/array/takeWhile.js.map +0 -1
  232. package/dist/array/takeWhile.mjs +0 -8
  233. package/dist/array/takeWhile.mjs.map +0 -1
  234. package/dist/array/union.js +0 -47
  235. package/dist/array/union.js.map +0 -1
  236. package/dist/array/union.mjs +0 -9
  237. package/dist/array/union.mjs.map +0 -1
  238. package/dist/array/unionBy.js +0 -40
  239. package/dist/array/unionBy.js.map +0 -1
  240. package/dist/array/unionBy.mjs +0 -8
  241. package/dist/array/unionBy.mjs.map +0 -1
  242. package/dist/array/unionWith.js +0 -47
  243. package/dist/array/unionWith.js.map +0 -1
  244. package/dist/array/unionWith.mjs +0 -9
  245. package/dist/array/unionWith.mjs.map +0 -1
  246. package/dist/array/uniq.d.mts +0 -17
  247. package/dist/array/uniq.js +0 -40
  248. package/dist/array/uniq.js.map +0 -1
  249. package/dist/array/uniq.mjs +0 -8
  250. package/dist/array/uniq.mjs.map +0 -1
  251. package/dist/array/uniqBy.js +0 -47
  252. package/dist/array/uniqBy.js.map +0 -1
  253. package/dist/array/uniqBy.mjs +0 -9
  254. package/dist/array/uniqBy.mjs.map +0 -1
  255. package/dist/array/uniqWith.d.mts +0 -14
  256. package/dist/array/uniqWith.js +0 -40
  257. package/dist/array/uniqWith.js.map +0 -1
  258. package/dist/array/uniqWith.mjs +0 -8
  259. package/dist/array/uniqWith.mjs.map +0 -1
  260. package/dist/array/xor.js +0 -66
  261. package/dist/array/xor.js.map +0 -1
  262. package/dist/array/xor.mjs +0 -12
  263. package/dist/array/xor.mjs.map +0 -1
  264. package/dist/array/xorBy.js +0 -65
  265. package/dist/array/xorBy.js.map +0 -1
  266. package/dist/array/xorBy.mjs +0 -11
  267. package/dist/array/xorBy.mjs.map +0 -1
  268. package/dist/array/xorWith.js +0 -72
  269. package/dist/array/xorWith.js.map +0 -1
  270. package/dist/array/xorWith.mjs +0 -12
  271. package/dist/array/xorWith.mjs.map +0 -1
  272. package/dist/array/zip.d.mts +0 -27
  273. package/dist/array/zip.js +0 -42
  274. package/dist/array/zip.js.map +0 -1
  275. package/dist/array/zip.mjs +0 -8
  276. package/dist/array/zip.mjs.map +0 -1
  277. package/dist/array/zipWith.js +0 -41
  278. package/dist/array/zipWith.js.map +0 -1
  279. package/dist/array/zipWith.mjs +0 -8
  280. package/dist/array/zipWith.mjs.map +0 -1
  281. package/dist/chunk-2KXLTAVK.mjs +0 -16
  282. package/dist/chunk-2KXLTAVK.mjs.map +0 -1
  283. package/dist/chunk-2MM5EJJX.mjs +0 -21
  284. package/dist/chunk-2MM5EJJX.mjs.map +0 -1
  285. package/dist/chunk-2VB6XU3I.mjs +0 -12
  286. package/dist/chunk-2VB6XU3I.mjs.map +0 -1
  287. package/dist/chunk-35TWSMYS.mjs +0 -19
  288. package/dist/chunk-35TWSMYS.mjs.map +0 -1
  289. package/dist/chunk-6ZCQ5ZMB.mjs +0 -13
  290. package/dist/chunk-6ZCQ5ZMB.mjs.map +0 -1
  291. package/dist/chunk-724PNXPR.mjs +0 -13
  292. package/dist/chunk-724PNXPR.mjs.map +0 -1
  293. package/dist/chunk-7GWOR247.mjs +0 -11
  294. package/dist/chunk-7GWOR247.mjs.map +0 -1
  295. package/dist/chunk-7KIXZNXS.mjs +0 -21
  296. package/dist/chunk-7KIXZNXS.mjs.map +0 -1
  297. package/dist/chunk-7OZZODAE.mjs +0 -19
  298. package/dist/chunk-7OZZODAE.mjs.map +0 -1
  299. package/dist/chunk-7PPND7QY.mjs +0 -16
  300. package/dist/chunk-7PPND7QY.mjs.map +0 -1
  301. package/dist/chunk-7SJHJHBN.mjs +0 -11
  302. package/dist/chunk-7SJHJHBN.mjs.map +0 -1
  303. package/dist/chunk-ARWKEQMQ.mjs +0 -19
  304. package/dist/chunk-ARWKEQMQ.mjs.map +0 -1
  305. package/dist/chunk-ARZ5BDR6.mjs +0 -1
  306. package/dist/chunk-ARZ5BDR6.mjs.map +0 -1
  307. package/dist/chunk-BAJC3BM7.mjs +0 -12
  308. package/dist/chunk-BAJC3BM7.mjs.map +0 -1
  309. package/dist/chunk-EAI6NLXI.mjs +0 -12
  310. package/dist/chunk-EAI6NLXI.mjs.map +0 -1
  311. package/dist/chunk-EJGAXTF7.mjs +0 -1
  312. package/dist/chunk-EJGAXTF7.mjs.map +0 -1
  313. package/dist/chunk-FUWEG5ZM.mjs +0 -9
  314. package/dist/chunk-FUWEG5ZM.mjs.map +0 -1
  315. package/dist/chunk-GJM7F3TH.mjs +0 -13
  316. package/dist/chunk-GJM7F3TH.mjs.map +0 -1
  317. package/dist/chunk-HQF6OFGM.mjs +0 -9
  318. package/dist/chunk-HQF6OFGM.mjs.map +0 -1
  319. package/dist/chunk-IJLQVGW4.mjs +0 -1
  320. package/dist/chunk-IJLQVGW4.mjs.map +0 -1
  321. package/dist/chunk-J3NTLMAE.mjs +0 -10
  322. package/dist/chunk-J3NTLMAE.mjs.map +0 -1
  323. package/dist/chunk-L4Y3G6AJ.mjs +0 -23
  324. package/dist/chunk-L4Y3G6AJ.mjs.map +0 -1
  325. package/dist/chunk-LAZNLIBJ.mjs +0 -10
  326. package/dist/chunk-LAZNLIBJ.mjs.map +0 -1
  327. package/dist/chunk-MAJSPFA6.mjs +0 -1
  328. package/dist/chunk-MAJSPFA6.mjs.map +0 -1
  329. package/dist/chunk-NEMQJ2GF.mjs +0 -18
  330. package/dist/chunk-NEMQJ2GF.mjs.map +0 -1
  331. package/dist/chunk-NK2262VG.mjs +0 -9
  332. package/dist/chunk-NK2262VG.mjs.map +0 -1
  333. package/dist/chunk-NSYWEYWT.mjs +0 -13
  334. package/dist/chunk-NSYWEYWT.mjs.map +0 -1
  335. package/dist/chunk-NYVT33DR.mjs +0 -9
  336. package/dist/chunk-NYVT33DR.mjs.map +0 -1
  337. package/dist/chunk-O3DWW7O5.mjs +0 -18
  338. package/dist/chunk-O3DWW7O5.mjs.map +0 -1
  339. package/dist/chunk-O5YJUO7P.mjs +0 -13
  340. package/dist/chunk-O5YJUO7P.mjs.map +0 -1
  341. package/dist/chunk-OBMK7JO2.mjs +0 -13
  342. package/dist/chunk-OBMK7JO2.mjs.map +0 -1
  343. package/dist/chunk-OF7HQYH4.mjs +0 -9
  344. package/dist/chunk-OF7HQYH4.mjs.map +0 -1
  345. package/dist/chunk-PTQLD7TG.mjs +0 -11
  346. package/dist/chunk-PTQLD7TG.mjs.map +0 -1
  347. package/dist/chunk-PWMHSN27.mjs +0 -14
  348. package/dist/chunk-PWMHSN27.mjs.map +0 -1
  349. package/dist/chunk-QRQPLMV4.mjs +0 -16
  350. package/dist/chunk-QRQPLMV4.mjs.map +0 -1
  351. package/dist/chunk-R5DNKXDI.mjs +0 -21
  352. package/dist/chunk-R5DNKXDI.mjs.map +0 -1
  353. package/dist/chunk-RK6PRCEJ.mjs +0 -12
  354. package/dist/chunk-RK6PRCEJ.mjs.map +0 -1
  355. package/dist/chunk-RLDY4N3Q.mjs +0 -13
  356. package/dist/chunk-RLDY4N3Q.mjs.map +0 -1
  357. package/dist/chunk-RU3RXBUC.mjs +0 -17
  358. package/dist/chunk-RU3RXBUC.mjs.map +0 -1
  359. package/dist/chunk-S767XFOS.mjs +0 -10
  360. package/dist/chunk-S767XFOS.mjs.map +0 -1
  361. package/dist/chunk-SGSQKXDO.mjs +0 -15
  362. package/dist/chunk-SGSQKXDO.mjs.map +0 -1
  363. package/dist/chunk-SYQTG4N4.mjs +0 -1
  364. package/dist/chunk-SYQTG4N4.mjs.map +0 -1
  365. package/dist/chunk-T5JCRGXA.mjs +0 -1
  366. package/dist/chunk-T5JCRGXA.mjs.map +0 -1
  367. package/dist/chunk-TOLR2FNF.mjs +0 -13
  368. package/dist/chunk-TOLR2FNF.mjs.map +0 -1
  369. package/dist/chunk-U42V7PZH.mjs +0 -9
  370. package/dist/chunk-U42V7PZH.mjs.map +0 -1
  371. package/dist/chunk-UNX3KZO2.mjs +0 -17
  372. package/dist/chunk-UNX3KZO2.mjs.map +0 -1
  373. package/dist/chunk-UZP4YX7I.mjs +0 -17
  374. package/dist/chunk-UZP4YX7I.mjs.map +0 -1
  375. package/dist/chunk-VACGGQOL.mjs +0 -9
  376. package/dist/chunk-VACGGQOL.mjs.map +0 -1
  377. package/dist/chunk-VAKCSKGR.mjs +0 -17
  378. package/dist/chunk-VAKCSKGR.mjs.map +0 -1
  379. package/dist/chunk-XAJYDHCM.mjs +0 -16
  380. package/dist/chunk-XAJYDHCM.mjs.map +0 -1
  381. package/dist/chunk-XW452I77.mjs +0 -16
  382. package/dist/chunk-XW452I77.mjs.map +0 -1
  383. package/dist/chunk-Z4IO7EIH.mjs +0 -16
  384. package/dist/chunk-Z4IO7EIH.mjs.map +0 -1
  385. package/dist/function/debounce.js +0 -47
  386. package/dist/function/debounce.js.map +0 -1
  387. package/dist/function/debounce.mjs +0 -8
  388. package/dist/function/debounce.mjs.map +0 -1
  389. package/dist/function/index.js.map +0 -1
  390. package/dist/function/index.mjs +0 -17
  391. package/dist/function/index.mjs.map +0 -1
  392. package/dist/function/once.js +0 -43
  393. package/dist/function/once.js.map +0 -1
  394. package/dist/function/once.mjs +0 -8
  395. package/dist/function/once.mjs.map +0 -1
  396. package/dist/function/throttle.js +0 -41
  397. package/dist/function/throttle.js.map +0 -1
  398. package/dist/function/throttle.mjs +0 -8
  399. package/dist/function/throttle.mjs.map +0 -1
  400. package/dist/index.js.map +0 -1
  401. package/dist/index.mjs +0 -190
  402. package/dist/index.mjs.map +0 -1
  403. package/dist/math/clamp.js +0 -36
  404. package/dist/math/clamp.js.map +0 -1
  405. package/dist/math/clamp.mjs +0 -8
  406. package/dist/math/clamp.mjs.map +0 -1
  407. package/dist/math/index.js.map +0 -1
  408. package/dist/math/index.mjs +0 -17
  409. package/dist/math/index.mjs.map +0 -1
  410. package/dist/math/round.js +0 -34
  411. package/dist/math/round.js.map +0 -1
  412. package/dist/math/round.mjs +0 -8
  413. package/dist/math/round.mjs.map +0 -1
  414. package/dist/math/sum.d.mts +0 -16
  415. package/dist/math/sum.js +0 -37
  416. package/dist/math/sum.js.map +0 -1
  417. package/dist/math/sum.mjs +0 -8
  418. package/dist/math/sum.mjs.map +0 -1
  419. package/dist/object/index.js.map +0 -1
  420. package/dist/object/index.mjs +0 -21
  421. package/dist/object/index.mjs.map +0 -1
  422. package/dist/object/omit.js +0 -51
  423. package/dist/object/omit.js.map +0 -1
  424. package/dist/object/omit.mjs +0 -8
  425. package/dist/object/omit.mjs.map +0 -1
  426. package/dist/object/omitBy.js +0 -40
  427. package/dist/object/omitBy.js.map +0 -1
  428. package/dist/object/omitBy.mjs +0 -8
  429. package/dist/object/omitBy.mjs.map +0 -1
  430. package/dist/object/pick.js +0 -37
  431. package/dist/object/pick.js.map +0 -1
  432. package/dist/object/pick.mjs +0 -8
  433. package/dist/object/pick.mjs.map +0 -1
  434. package/dist/object/pickBy.js +0 -40
  435. package/dist/object/pickBy.js.map +0 -1
  436. package/dist/object/pickBy.mjs +0 -8
  437. package/dist/object/pickBy.mjs.map +0 -1
  438. package/dist/predicate/index.js.map +0 -1
  439. package/dist/predicate/index.mjs +0 -21
  440. package/dist/predicate/index.mjs.map +0 -1
  441. package/dist/predicate/isNil.js +0 -33
  442. package/dist/predicate/isNil.js.map +0 -1
  443. package/dist/predicate/isNil.mjs +0 -8
  444. package/dist/predicate/isNil.mjs.map +0 -1
  445. package/dist/predicate/isNotNil.js +0 -33
  446. package/dist/predicate/isNotNil.js.map +0 -1
  447. package/dist/predicate/isNotNil.mjs +0 -8
  448. package/dist/predicate/isNotNil.mjs.map +0 -1
  449. package/dist/predicate/isNull.js +0 -33
  450. package/dist/predicate/isNull.js.map +0 -1
  451. package/dist/predicate/isNull.mjs +0 -8
  452. package/dist/predicate/isNull.mjs.map +0 -1
  453. package/dist/predicate/isUndefined.js +0 -33
  454. package/dist/predicate/isUndefined.js.map +0 -1
  455. package/dist/predicate/isUndefined.mjs +0 -8
  456. package/dist/predicate/isUndefined.mjs.map +0 -1
  457. package/dist/promise/delay.js +0 -35
  458. package/dist/promise/delay.js.map +0 -1
  459. package/dist/promise/delay.mjs +0 -8
  460. package/dist/promise/delay.mjs.map +0 -1
  461. package/dist/promise/index.js.map +0 -1
  462. package/dist/promise/index.mjs +0 -9
  463. package/dist/promise/index.mjs.map +0 -1
  464. /package/{dist/array/index.d.mts → esm/array/index.mjs} +0 -0
  465. /package/{dist/function/index.d.mts → esm/function/index.mjs} +0 -0
  466. /package/{dist/index.d.mts → esm/index.mjs} +0 -0
  467. /package/{dist/math/index.d.mts → esm/math/index.mjs} +0 -0
  468. /package/{dist/object/index.d.mts → esm/object/index.mjs} +0 -0
  469. /package/{dist/predicate/index.d.mts → esm/predicate/index.mjs} +0 -0
  470. /package/{dist/promise/index.d.mts → esm/promise/index.mjs} +0 -0
@@ -1,8 +0,0 @@
1
- import {
2
- intersectionBy
3
- } from "../chunk-2VB6XU3I.mjs";
4
- import "../chunk-2MM5EJJX.mjs";
5
- export {
6
- intersectionBy
7
- };
8
- //# sourceMappingURL=intersectionBy.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,37 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/array/intersectionWith.ts
21
- var intersectionWith_exports = {};
22
- __export(intersectionWith_exports, {
23
- intersectionWith: () => intersectionWith
24
- });
25
- module.exports = __toCommonJS(intersectionWith_exports);
26
- function intersectionWith(firstArr, secondArr, areItemsEqual) {
27
- return firstArr.filter((firstItem) => {
28
- return secondArr.some((secondItem) => {
29
- return areItemsEqual(firstItem, secondItem);
30
- });
31
- });
32
- }
33
- // Annotate the CommonJS export names for ESM import in node:
34
- 0 && (module.exports = {
35
- intersectionWith
36
- });
37
- //# sourceMappingURL=intersectionWith.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/array/intersectionWith.ts"],"sourcesContent":["/**\n * Returns the intersection of two arrays based on a custom equality function.\n * \n * This function takes two arrays and a custom equality function. It returns a new array containing \n * the elements from the first array that have matching elements in the second array, as determined \n * by the custom equality function. It effectively filters out any elements from the first array that \n * do not have corresponding matches in the second array according to the equality function.\n *\n * @param {T[]} firstArr - The first array to compare.\n * @param {T[]} secondArr - The second array to compare.\n * @param {(x: T, y: T) => boolean} areItemsEqual - A custom function to determine if two elements are equal. \n * This function takes two arguments, one from each array, and returns `true` if the elements are considered equal, and `false` otherwise.\n * @returns {T[]} A new array containing the elements from the first array that have corresponding matches in the second array according to the custom equality function.\n *\n * @example\n * * const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }];\n * const array2 = [{ id: 2 }, { id: 4 }];\n * const areItemsEqual = (a, b) => a.id === b.id;\n * const result = intersectionWith(array1, array2, areItemsEqual);\n * // result will be [{ id: 2 }] since this element has a matching id in both arrays.\n */\nexport function intersectionWith<T>(firstArr: T[], secondArr: T[], areItemsEqual: (x: T, y: T) => boolean): T[] {\n return firstArr.filter(firstItem => {\n return secondArr.some(secondItem => {\n return areItemsEqual(firstItem, secondItem);\n });\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAqBO,SAAS,iBAAoB,UAAe,WAAgB,eAA6C;AAC9G,SAAO,SAAS,OAAO,eAAa;AAClC,WAAO,UAAU,KAAK,gBAAc;AAClC,aAAO,cAAc,WAAW,UAAU;AAAA,IAC5C,CAAC;AAAA,EACH,CAAC;AACH;","names":[]}
@@ -1,8 +0,0 @@
1
- import {
2
- intersectionWith
3
- } from "../chunk-GJM7F3TH.mjs";
4
- import "../chunk-2MM5EJJX.mjs";
5
- export {
6
- intersectionWith
7
- };
8
- //# sourceMappingURL=intersectionWith.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,42 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/array/partition.ts
21
- var partition_exports = {};
22
- __export(partition_exports, {
23
- partition: () => partition
24
- });
25
- module.exports = __toCommonJS(partition_exports);
26
- function partition(arr, isInTruthy) {
27
- const truthy = [];
28
- const falsy = [];
29
- for (const item of arr) {
30
- if (isInTruthy(item)) {
31
- truthy.push(item);
32
- } else {
33
- falsy.push(item);
34
- }
35
- }
36
- return [truthy, falsy];
37
- }
38
- // Annotate the CommonJS export names for ESM import in node:
39
- 0 && (module.exports = {
40
- partition
41
- });
42
- //# sourceMappingURL=partition.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/array/partition.ts"],"sourcesContent":["/**\n * Splits an array into two groups based on a predicate function.\n * \n * This function takes an array and a predicate function. It returns a tuple of two arrays: \n * the first array contains elements for which the predicate function returns true, and \n * the second array contains elements for which the predicate function returns false.\n *\n * @param {T[]} arr - The array to partition.\n * @param {(value: T) => boolean} isInTruthy - A predicate function that determines \n * whether an element should be placed in the truthy array. The function is called with each \n * element of the array.\n * @returns {[T[], T[]]} A tuple containing two arrays: the first array contains elements for \n * which the predicate returned true, and the second array contains elements for which the \n * predicate returned false.\n *\n * @example\n * const array = [1, 2, 3, 4, 5];\n * const isEven = x => x % 2 === 0;\n * const [even, odd] = partition(array, isEven);\n * // even will be [2, 4], and odd will be [1, 3, 5]\n */\nexport function partition<T>(arr: T[], isInTruthy: (value: T) => boolean): [truthy: T[], falsy: T[]] {\n const truthy: T[] = [];\n const falsy: T[] = [];\n\n for (const item of arr) {\n if (isInTruthy(item)) {\n truthy.push(item);\n } else {\n falsy.push(item);\n }\n }\n\n return [truthy, falsy];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAqBO,SAAS,UAAa,KAAU,YAA8D;AACnG,QAAM,SAAc,CAAC;AACrB,QAAM,QAAa,CAAC;AAEpB,aAAW,QAAQ,KAAK;AACtB,QAAI,WAAW,IAAI,GAAG;AACpB,aAAO,KAAK,IAAI;AAAA,IAClB,OAAO;AACL,YAAM,KAAK,IAAI;AAAA,IACjB;AAAA,EACF;AAEA,SAAO,CAAC,QAAQ,KAAK;AACvB;","names":[]}
@@ -1,8 +0,0 @@
1
- import {
2
- partition
3
- } from "../chunk-NEMQJ2GF.mjs";
4
- import "../chunk-2MM5EJJX.mjs";
5
- export {
6
- partition
7
- };
8
- //# sourceMappingURL=partition.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,34 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/array/sample.ts
21
- var sample_exports = {};
22
- __export(sample_exports, {
23
- sample: () => sample
24
- });
25
- module.exports = __toCommonJS(sample_exports);
26
- function sample(arr) {
27
- const randomIndex = Math.floor(Math.random() * arr.length);
28
- return arr[randomIndex];
29
- }
30
- // Annotate the CommonJS export names for ESM import in node:
31
- 0 && (module.exports = {
32
- sample
33
- });
34
- //# sourceMappingURL=sample.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/array/sample.ts"],"sourcesContent":["/**\n * Returns a random element from an array.\n * \n * This function takes an array and returns a single element selected randomly from the array.\n *\n * @param {T[]} arr - The array to sample from.\n * @returns {T} A random element from the array.\n *\n * @example\n * const array = [1, 2, 3, 4, 5];\n * const randomElement = sample(array);\n * // randomElement will be one of the elements from the array, selected randomly.\n */\nexport function sample<T>(arr: T[]): T {\n const randomIndex = Math.floor(Math.random() * arr.length);\n return arr[randomIndex];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAaO,SAAS,OAAU,KAAa;AACrC,QAAM,cAAc,KAAK,MAAM,KAAK,OAAO,IAAI,IAAI,MAAM;AACzD,SAAO,IAAI,WAAW;AACxB;","names":[]}
@@ -1,8 +0,0 @@
1
- import {
2
- sample
3
- } from "../chunk-J3NTLMAE.mjs";
4
- import "../chunk-2MM5EJJX.mjs";
5
- export {
6
- sample
7
- };
8
- //# sourceMappingURL=sample.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,37 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/array/shuffle.ts
21
- var shuffle_exports = {};
22
- __export(shuffle_exports, {
23
- shuffle: () => shuffle
24
- });
25
- module.exports = __toCommonJS(shuffle_exports);
26
- function shuffle(arr) {
27
- for (let i = arr.length - 1; i >= 1; i--) {
28
- const j = Math.floor(Math.random() * (i + 1));
29
- [arr[i], arr[j]] = [arr[j], arr[i]];
30
- }
31
- return arr;
32
- }
33
- // Annotate the CommonJS export names for ESM import in node:
34
- 0 && (module.exports = {
35
- shuffle
36
- });
37
- //# sourceMappingURL=shuffle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/array/shuffle.ts"],"sourcesContent":["/**\n * Randomizes the order of elements in an array using the Fisher-Yates algorithm.\n * \n * This function takes an array and returns a new array with its elements shuffled in a random order.\n *\n * @param {T[]} arr - The array to shuffle.\n * @returns {T[]} A new array with its elements shuffled in random order.\n *\n * @example\n * const array = [1, 2, 3, 4, 5];\n * const shuffledArray = shuffle(array);\n * // shuffledArray will be a new array with elements of array in random order, e.g., [3, 1, 4, 5, 2]\n */\nexport function shuffle<T>(arr: T[]): T[] {\n /**\n * https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#The_modern_algorithm\n */\n for (let i = arr.length - 1; i >= 1; i--) {\n const j = Math.floor(Math.random() * (i + 1));\n \n [arr[i], arr[j]] = [arr[j], arr[i]];\n }\n\n return arr;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAaO,SAAS,QAAW,KAAe;AAIxC,WAAS,IAAI,IAAI,SAAS,GAAG,KAAK,GAAG,KAAK;AACxC,UAAM,IAAI,KAAK,MAAM,KAAK,OAAO,KAAK,IAAI,EAAE;AAE5C,KAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;AAAA,EACpC;AAEA,SAAO;AACT;","names":[]}
@@ -1,8 +0,0 @@
1
- import {
2
- shuffle
3
- } from "../chunk-TOLR2FNF.mjs";
4
- import "../chunk-2MM5EJJX.mjs";
5
- export {
6
- shuffle
7
- };
8
- //# sourceMappingURL=shuffle.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,33 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/array/take.ts
21
- var take_exports = {};
22
- __export(take_exports, {
23
- take: () => take
24
- });
25
- module.exports = __toCommonJS(take_exports);
26
- function take(arr, count) {
27
- return arr.slice(0, count);
28
- }
29
- // Annotate the CommonJS export names for ESM import in node:
30
- 0 && (module.exports = {
31
- take
32
- });
33
- //# sourceMappingURL=take.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/array/take.ts"],"sourcesContent":["/**\n * Returns a new array containing the first `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 - Type of elements in the input array.\n * \n * @param {T[]} arr - The array to take elements from.\n * @param {number} count - The number of elements to take.\n * @returns {T[]} A new array containing the first `count` elements from `arr`.\n * \n * @example\n * // Returns [1, 2, 3]\n * take([1, 2, 3, 4, 5], 3);\n * \n * @example\n * // Returns ['a', 'b']\n * take(['a', 'b', 'c'], 2);\n * \n * @example\n * // Returns [1, 2, 3]\n * take([1, 2, 3], 5);\n */\nexport function take<T>(arr: T[], count: number) {\n return arr.slice(0, count);\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAsBO,SAAS,KAAQ,KAAU,OAAe;AAC/C,SAAO,IAAI,MAAM,GAAG,KAAK;AAC3B;","names":[]}
@@ -1,8 +0,0 @@
1
- import {
2
- take
3
- } from "../chunk-HQF6OFGM.mjs";
4
- import "../chunk-2MM5EJJX.mjs";
5
- export {
6
- take
7
- };
8
- //# sourceMappingURL=take.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,36 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/array/takeRight.ts
21
- var takeRight_exports = {};
22
- __export(takeRight_exports, {
23
- takeRight: () => takeRight
24
- });
25
- module.exports = __toCommonJS(takeRight_exports);
26
- function takeRight(arr, count) {
27
- if (count === 0) {
28
- return [];
29
- }
30
- return arr.slice(-count);
31
- }
32
- // Annotate the CommonJS export names for ESM import in node:
33
- 0 && (module.exports = {
34
- takeRight
35
- });
36
- //# sourceMappingURL=takeRight.js.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 * @param {T[]} arr - The array to take elements from.\n * @param {number} count - 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: T[], count: number): T[] {\n if (count === 0) {\n return [];\n }\n\n return arr.slice(-count);\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBO,SAAS,UAAa,KAAU,OAAoB;AACzD,MAAI,UAAU,GAAG;AACf,WAAO,CAAC;AAAA,EACV;AAEA,SAAO,IAAI,MAAM,CAAC,KAAK;AACzB;","names":[]}
@@ -1,8 +0,0 @@
1
- import {
2
- takeRight
3
- } from "../chunk-BAJC3BM7.mjs";
4
- import "../chunk-2MM5EJJX.mjs";
5
- export {
6
- takeRight
7
- };
8
- //# sourceMappingURL=takeRight.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,38 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/array/takeRightWhile.ts
21
- var takeRightWhile_exports = {};
22
- __export(takeRightWhile_exports, {
23
- takeRightWhile: () => takeRightWhile
24
- });
25
- module.exports = __toCommonJS(takeRightWhile_exports);
26
- function takeRightWhile(arr, shouldContinueTaking) {
27
- for (let i = arr.length - 1; i >= 0; i--) {
28
- if (!shouldContinueTaking(arr[i])) {
29
- return arr.slice(i + 1);
30
- }
31
- }
32
- return arr.slice();
33
- }
34
- // Annotate the CommonJS export names for ESM import in node:
35
- 0 && (module.exports = {
36
- takeRightWhile
37
- });
38
- //# sourceMappingURL=takeRightWhile.js.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: 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":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBO,SAAS,eAAkB,KAAU,sBAAiD;AAC3F,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,8 +0,0 @@
1
- import {
2
- takeRightWhile
3
- } from "../chunk-PWMHSN27.mjs";
4
- import "../chunk-2MM5EJJX.mjs";
5
- export {
6
- takeRightWhile
7
- };
8
- //# sourceMappingURL=takeRightWhile.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,40 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/array/takeWhile.ts
21
- var takeWhile_exports = {};
22
- __export(takeWhile_exports, {
23
- takeWhile: () => takeWhile
24
- });
25
- module.exports = __toCommonJS(takeWhile_exports);
26
- function takeWhile(arr, shouldContinueTaking) {
27
- const result = [];
28
- for (const item of arr) {
29
- if (!shouldContinueTaking(item)) {
30
- break;
31
- }
32
- result.push(item);
33
- }
34
- return result;
35
- }
36
- // Annotate the CommonJS export names for ESM import in node:
37
- 0 && (module.exports = {
38
- takeWhile
39
- });
40
- //# sourceMappingURL=takeWhile.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/array/takeWhile.ts"],"sourcesContent":["/**\n * Returns a new array containing the leading elements of the provided array\n * that satisfy the provided predicate function. It stops taking elements as soon\n * as an element does not satisfy the predicate.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The array to process.\n * @param {(element: T) => boolean} shouldContinueTaking - The predicate function that is called with each element. Elements are included in the result as long as this function returns true.\n * @returns {T[]} A new array containing the leading elements that satisfy the predicate.\n *\n * @example\n * // Returns [1, 2]\n * takeWhile([1, 2, 3, 4], x => x < 3);\n *\n * @example\n * // Returns []\n * takeWhile([1, 2, 3, 4], x => x > 3);\n */\nexport function takeWhile<T>(arr: T[], shouldContinueTaking: (element: T) => boolean): T[] {\n const result: T[] = [];\n\n for (const item of arr) {\n if (!shouldContinueTaking(item)) {\n break;\n }\n\n result.push(item);\n }\n\n return result;\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAkBO,SAAS,UAAa,KAAU,sBAAoD;AACzF,QAAM,SAAc,CAAC;AAErB,aAAW,QAAQ,KAAK;AACtB,QAAI,CAAC,qBAAqB,IAAI,GAAG;AAC/B;AAAA,IACF;AAEA,WAAO,KAAK,IAAI;AAAA,EAClB;AAEA,SAAO;AACT;","names":[]}
@@ -1,8 +0,0 @@
1
- import {
2
- takeWhile
3
- } from "../chunk-2KXLTAVK.mjs";
4
- import "../chunk-2MM5EJJX.mjs";
5
- export {
6
- takeWhile
7
- };
8
- //# sourceMappingURL=takeWhile.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,47 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/array/union.ts
21
- var union_exports = {};
22
- __export(union_exports, {
23
- union: () => union
24
- });
25
- module.exports = __toCommonJS(union_exports);
26
-
27
- // src/array/uniq.ts
28
- function uniq(arr) {
29
- const result = [];
30
- for (const item of arr) {
31
- if (result.includes(item)) {
32
- continue;
33
- }
34
- result.push(item);
35
- }
36
- return result;
37
- }
38
-
39
- // src/array/union.ts
40
- function union(arr1, arr2) {
41
- return uniq(arr1.concat(arr2));
42
- }
43
- // Annotate the CommonJS export names for ESM import in node:
44
- 0 && (module.exports = {
45
- union
46
- });
47
- //# sourceMappingURL=union.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/array/union.ts","../../src/array/uniq.ts"],"sourcesContent":["import { uniq } from \"./uniq\";\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 * @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: T[], arr2: T[]): T[] {\n return uniq(arr1.concat(arr2));\n}\n","/**\n * Creates a duplicate-free version of an array.\n * \n * This function takes an array and returns a new array containing only the unique values \n * from the original array, preserving the order of first occurrence.\n *\n * @param {T[]} arr - The array to process.\n * @returns {T[]} A new array with only unique values from the original array.\n *\n * @example\n * * const array = [1, 2, 2, 3, 4, 4, 5];\n * const result = uniq(array);\n * // result will be [1, 2, 3, 4, 5]\n */\nexport function uniq<T>(arr: T[]): T[] {\n const result: T[] = [];\n\n for (const item of arr) {\n if (result.includes(item)) {\n continue;\n }\n\n result.push(item);\n }\n\n return result;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACcO,SAAS,KAAQ,KAAe;AACrC,QAAM,SAAc,CAAC;AAErB,aAAW,QAAQ,KAAK;AACtB,QAAI,OAAO,SAAS,IAAI,GAAG;AACzB;AAAA,IACF;AAEA,WAAO,KAAK,IAAI;AAAA,EAClB;AAEA,SAAO;AACT;;;ADRO,SAAS,MAAS,MAAW,MAAgB;AAClD,SAAO,KAAK,KAAK,OAAO,IAAI,CAAC;AAC/B;","names":[]}
@@ -1,9 +0,0 @@
1
- import {
2
- union
3
- } from "../chunk-RLDY4N3Q.mjs";
4
- import "../chunk-QRQPLMV4.mjs";
5
- import "../chunk-2MM5EJJX.mjs";
6
- export {
7
- union
8
- };
9
- //# sourceMappingURL=union.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,40 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/array/unionBy.ts
21
- var unionBy_exports = {};
22
- __export(unionBy_exports, {
23
- unionBy: () => unionBy
24
- });
25
- module.exports = __toCommonJS(unionBy_exports);
26
- function unionBy(arr1, arr2, mapper) {
27
- const map = /* @__PURE__ */ new Map();
28
- for (const item of [...arr1, ...arr2]) {
29
- const key = mapper(item);
30
- if (!map.has(key)) {
31
- map.set(key, item);
32
- }
33
- }
34
- return [...map.values()];
35
- }
36
- // Annotate the CommonJS export names for ESM import in node:
37
- 0 && (module.exports = {
38
- unionBy
39
- });
40
- //# sourceMappingURL=unionBy.js.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 * @param {T[]} arr1 - The first array.\n * @param {T[]} arr2 - The second array.\n * @param {function(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: T[], arr2: 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 if (!map.has(key)) {\n map.set(key, item);\n }\n }\n\n return [...map.values()];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBO,SAAS,QAAc,MAAW,MAAW,QAA6B;AAC/E,QAAM,MAAM,oBAAI,IAAU;AAE1B,aAAW,QAAQ,CAAC,GAAG,MAAM,GAAG,IAAI,GAAG;AACrC,UAAM,MAAM,OAAO,IAAI;AACvB,QAAI,CAAC,IAAI,IAAI,GAAG,GAAG;AACjB,UAAI,IAAI,KAAK,IAAI;AAAA,IACnB;AAAA,EACF;AAEA,SAAO,CAAC,GAAG,IAAI,OAAO,CAAC;AACzB;","names":[]}
@@ -1,8 +0,0 @@
1
- import {
2
- unionBy
3
- } from "../chunk-7PPND7QY.mjs";
4
- import "../chunk-2MM5EJJX.mjs";
5
- export {
6
- unionBy
7
- };
8
- //# sourceMappingURL=unionBy.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,47 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/array/unionWith.ts
21
- var unionWith_exports = {};
22
- __export(unionWith_exports, {
23
- unionWith: () => unionWith
24
- });
25
- module.exports = __toCommonJS(unionWith_exports);
26
-
27
- // src/array/uniqWith.ts
28
- function uniqWith(arr, areItemsEqual) {
29
- const result = [];
30
- for (const item of arr) {
31
- const isUniq = result.every((v) => !areItemsEqual(v, item));
32
- if (isUniq) {
33
- result.push(item);
34
- }
35
- }
36
- return result;
37
- }
38
-
39
- // src/array/unionWith.ts
40
- function unionWith(arr1, arr2, areItemsEqual) {
41
- return uniqWith(arr1.concat(arr2), areItemsEqual);
42
- }
43
- // Annotate the CommonJS export names for ESM import in node:
44
- 0 && (module.exports = {
45
- unionWith
46
- });
47
- //# sourceMappingURL=unionWith.js.map