es-toolkit 1.0.3-dev.38 → 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 +49 -120
  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-5JWSGT4R.mjs +0 -18
  290. package/dist/chunk-5JWSGT4R.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-7OZZODAE.mjs +0 -19
  296. package/dist/chunk-7OZZODAE.mjs.map +0 -1
  297. package/dist/chunk-7PPND7QY.mjs +0 -16
  298. package/dist/chunk-7PPND7QY.mjs.map +0 -1
  299. package/dist/chunk-7SJHJHBN.mjs +0 -11
  300. package/dist/chunk-7SJHJHBN.mjs.map +0 -1
  301. package/dist/chunk-ARWKEQMQ.mjs +0 -19
  302. package/dist/chunk-ARWKEQMQ.mjs.map +0 -1
  303. package/dist/chunk-ARZ5BDR6.mjs +0 -1
  304. package/dist/chunk-ARZ5BDR6.mjs.map +0 -1
  305. package/dist/chunk-BAJC3BM7.mjs +0 -12
  306. package/dist/chunk-BAJC3BM7.mjs.map +0 -1
  307. package/dist/chunk-EAI4DDCQ.mjs +0 -16
  308. package/dist/chunk-EAI4DDCQ.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-JMLFPGZ3.mjs +0 -13
  324. package/dist/chunk-JMLFPGZ3.mjs.map +0 -1
  325. package/dist/chunk-L4Y3G6AJ.mjs +0 -23
  326. package/dist/chunk-L4Y3G6AJ.mjs.map +0 -1
  327. package/dist/chunk-LAZNLIBJ.mjs +0 -10
  328. package/dist/chunk-LAZNLIBJ.mjs.map +0 -1
  329. package/dist/chunk-MAJSPFA6.mjs +0 -1
  330. package/dist/chunk-MAJSPFA6.mjs.map +0 -1
  331. package/dist/chunk-NEMQJ2GF.mjs +0 -18
  332. package/dist/chunk-NEMQJ2GF.mjs.map +0 -1
  333. package/dist/chunk-NK2262VG.mjs +0 -9
  334. package/dist/chunk-NK2262VG.mjs.map +0 -1
  335. package/dist/chunk-NSYWEYWT.mjs +0 -13
  336. package/dist/chunk-NSYWEYWT.mjs.map +0 -1
  337. package/dist/chunk-NYVT33DR.mjs +0 -9
  338. package/dist/chunk-NYVT33DR.mjs.map +0 -1
  339. package/dist/chunk-OBMK7JO2.mjs +0 -13
  340. package/dist/chunk-OBMK7JO2.mjs.map +0 -1
  341. package/dist/chunk-PTQLD7TG.mjs +0 -11
  342. package/dist/chunk-PTQLD7TG.mjs.map +0 -1
  343. package/dist/chunk-PWMHSN27.mjs +0 -14
  344. package/dist/chunk-PWMHSN27.mjs.map +0 -1
  345. package/dist/chunk-QRQPLMV4.mjs +0 -16
  346. package/dist/chunk-QRQPLMV4.mjs.map +0 -1
  347. package/dist/chunk-R5DNKXDI.mjs +0 -21
  348. package/dist/chunk-R5DNKXDI.mjs.map +0 -1
  349. package/dist/chunk-RK6PRCEJ.mjs +0 -12
  350. package/dist/chunk-RK6PRCEJ.mjs.map +0 -1
  351. package/dist/chunk-RLDY4N3Q.mjs +0 -13
  352. package/dist/chunk-RLDY4N3Q.mjs.map +0 -1
  353. package/dist/chunk-RU3RXBUC.mjs +0 -17
  354. package/dist/chunk-RU3RXBUC.mjs.map +0 -1
  355. package/dist/chunk-S767XFOS.mjs +0 -10
  356. package/dist/chunk-S767XFOS.mjs.map +0 -1
  357. package/dist/chunk-SGSQKXDO.mjs +0 -15
  358. package/dist/chunk-SGSQKXDO.mjs.map +0 -1
  359. package/dist/chunk-SYQTG4N4.mjs +0 -1
  360. package/dist/chunk-SYQTG4N4.mjs.map +0 -1
  361. package/dist/chunk-T5JCRGXA.mjs +0 -1
  362. package/dist/chunk-T5JCRGXA.mjs.map +0 -1
  363. package/dist/chunk-TOLR2FNF.mjs +0 -13
  364. package/dist/chunk-TOLR2FNF.mjs.map +0 -1
  365. package/dist/chunk-UNX3KZO2.mjs +0 -17
  366. package/dist/chunk-UNX3KZO2.mjs.map +0 -1
  367. package/dist/chunk-UZP4YX7I.mjs +0 -17
  368. package/dist/chunk-UZP4YX7I.mjs.map +0 -1
  369. package/dist/chunk-VACGGQOL.mjs +0 -9
  370. package/dist/chunk-VACGGQOL.mjs.map +0 -1
  371. package/dist/chunk-VAKCSKGR.mjs +0 -17
  372. package/dist/chunk-VAKCSKGR.mjs.map +0 -1
  373. package/dist/chunk-VJGGYY4Y.mjs +0 -13
  374. package/dist/chunk-VJGGYY4Y.mjs.map +0 -1
  375. package/dist/chunk-WFQ3LAHQ.mjs +0 -9
  376. package/dist/chunk-WFQ3LAHQ.mjs.map +0 -1
  377. package/dist/chunk-XS4ZPJMT.mjs +0 -21
  378. package/dist/chunk-XS4ZPJMT.mjs.map +0 -1
  379. package/dist/chunk-XW452I77.mjs +0 -16
  380. package/dist/chunk-XW452I77.mjs.map +0 -1
  381. package/dist/chunk-YMNXRH52.mjs +0 -9
  382. package/dist/chunk-YMNXRH52.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,19 +1,25 @@
1
+ import { difference } from './difference.mjs';
2
+ import { intersection } from './intersection.mjs';
3
+ import { union } from './union.mjs';
4
+
1
5
  /**
2
6
  * Computes the symmetric difference between two arrays. The symmetric difference is the set of elements
3
7
  * which are in either of the arrays, but not in their intersection.
4
- *
8
+ *
5
9
  * @param {T[]} arr1 - The first array.
6
10
  * @param {T[]} arr2 - The second array.
7
11
  * @returns {T[]} An array containing the elements that are present in either `arr1` or `arr2` but not in both.
8
- *
12
+ *
9
13
  * @example
10
14
  * // Returns [1, 2, 5, 6]
11
15
  * xor([1, 2, 3, 4], [3, 4, 5, 6]);
12
- *
16
+ *
13
17
  * @example
14
18
  * // Returns ['a', 'c']
15
19
  * xor(['a', 'b'], ['b', 'c']);
16
20
  */
17
- declare function xor<T>(arr1: T[], arr2: T[]): T[];
21
+ function xor(arr1, arr2) {
22
+ return difference(union(arr1, arr2), intersection(arr1, arr2));
23
+ }
18
24
 
19
25
  export { xor };
@@ -1,22 +1,30 @@
1
+ import { differenceBy } from './differenceBy.mjs';
2
+ import { intersectionBy } from './intersectionBy.mjs';
3
+ import { unionBy } from './unionBy.mjs';
4
+
1
5
  /**
2
- * Computes the symmetric difference between two arrays using a custom mapping function.
3
- * The symmetric difference is the set of elements which are in either of the arrays,
6
+ * Computes the symmetric difference between two arrays using a custom mapping function.
7
+ * The symmetric difference is the set of elements which are in either of the arrays,
4
8
  * but not in their intersection, determined by the result of the mapping function.
5
9
  *
6
10
  * @template T - Type of elements in the input arrays.
7
11
  * @template U - Type of the values returned by the mapping function.
8
- *
12
+ *
9
13
  * @param {T[]} arr1 - The first array.
10
14
  * @param {T[]} arr2 - The second array.
11
15
  * @param {function(item: T): U} mapper - The function to map array elements to comparison values.
12
16
  * @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.
13
- *
17
+ *
14
18
  * @example
15
19
  * // Custom mapping function for objects with an 'id' property
16
20
  * const idMapper = obj => obj.id;
17
21
  * xorBy([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], idMapper);
18
22
  * // Returns [{ id: 1 }, { id: 3 }]
19
23
  */
20
- declare function xorBy<T, U>(arr1: T[], arr2: T[], mapper: (item: T) => U): T[];
24
+ function xorBy(arr1, arr2, mapper) {
25
+ var union = unionBy(arr1, arr2, mapper);
26
+ var intersection = intersectionBy(arr1, arr2, mapper);
27
+ return differenceBy(union, intersection, mapper);
28
+ }
21
29
 
22
30
  export { xorBy };
@@ -1,21 +1,29 @@
1
+ import { differenceWith } from './differenceWith.mjs';
2
+ import { intersectionWith } from './intersectionWith.mjs';
3
+ import { unionWith } from './unionWith.mjs';
4
+
1
5
  /**
2
- * Computes the symmetric difference between two arrays using a custom equality function.
3
- * The symmetric difference is the set of elements which are in either of the arrays,
6
+ * Computes the symmetric difference between two arrays using a custom equality function.
7
+ * The symmetric difference is the set of elements which are in either of the arrays,
4
8
  * but not in their intersection.
5
9
  *
6
10
  * @template T - Type of elements in the input arrays.
7
- *
11
+ *
8
12
  * @param {T[]} arr1 - The first array.
9
13
  * @param {T[]} arr2 - The second array.
10
14
  * @param {(item1: T, item2: T) => boolean} areElementsEqual - The custom equality function to compare elements.
11
15
  * @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.
12
- *
16
+ *
13
17
  * @example
14
18
  * // Custom equality function for objects with an 'id' property
15
19
  * const areObjectsEqual = (a, b) => a.id === b.id;
16
20
  * xorWith([{ id: 1 }, { id: 2 }], [{ id: 2 }, { id: 3 }], areObjectsEqual);
17
21
  * // Returns [{ id: 1 }, { id: 3 }]
18
22
  */
19
- declare function xorWith<T>(arr1: T[], arr2: T[], areElementsEqual: (item1: T, item2: T) => boolean): T[];
23
+ function xorWith(arr1, arr2, areElementsEqual) {
24
+ var union = unionWith(arr1, arr2, areElementsEqual);
25
+ var intersection = intersectionWith(arr1, arr2, areElementsEqual);
26
+ return differenceWith(union, intersection, areElementsEqual);
27
+ }
20
28
 
21
29
  export { xorWith };
@@ -0,0 +1,52 @@
1
+ import { toConsumableArray as _toConsumableArray, createForOfIteratorHelper as _createForOfIteratorHelper } from './_virtual/_rollupPluginBabelHelpers.mjs';
2
+
3
+ /**
4
+ * Combines multiple arrays into a single array of tuples.
5
+ *
6
+ * This function takes multiple arrays and returns a new array where each element is a tuple
7
+ * containing the corresponding elements from the input arrays. If the input arrays are of
8
+ * different lengths, the resulting array will have the length of the longest input array,
9
+ * with undefined values for missing elements.
10
+ *
11
+ * @param {...T[][]} arrs - The arrays to zip together.
12
+ * @returns {T[][]} A new array of tuples containing the corresponding elements from the input arrays.
13
+ *
14
+ * @example
15
+ * const arr1 = [1, 2, 3];
16
+ * const arr2 = ['a', 'b', 'c'];
17
+ * const result = zip(arr1, arr2);
18
+ * // result will be [[1, 'a'], [2, 'b'], [3, 'c']]
19
+ *
20
+ * const arr3 = [true, false];
21
+ * const result2 = zip(arr1, arr2, arr3);
22
+ * // result2 will be [[1, 'a', true], [2, 'b', false], [3, 'c', undefined]]
23
+ */
24
+
25
+ function zip() {
26
+ var result = [];
27
+ for (var _len = arguments.length, arrs = new Array(_len), _key = 0; _key < _len; _key++) {
28
+ arrs[_key] = arguments[_key];
29
+ }
30
+ var maxIndex = Math.max.apply(Math, _toConsumableArray(arrs.map(function (x) {
31
+ return x.length;
32
+ })));
33
+ for (var i = 0; i < maxIndex; i++) {
34
+ var element = [];
35
+ var _iterator = _createForOfIteratorHelper(arrs),
36
+ _step;
37
+ try {
38
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
39
+ var arr = _step.value;
40
+ element.push(arr[i]);
41
+ }
42
+ } catch (err) {
43
+ _iterator.e(err);
44
+ } finally {
45
+ _iterator.f();
46
+ }
47
+ result.push(element);
48
+ }
49
+ return result;
50
+ }
51
+
52
+ export { zip };
@@ -1,7 +1,9 @@
1
+ import { toConsumableArray as _toConsumableArray } from './_virtual/_rollupPluginBabelHelpers.mjs';
2
+
1
3
  /**
2
4
  * Combines multiple arrays into a single array using a custom combiner function.
3
- *
4
- * This function takes multiple arrays and a combiner function, and returns a new array where each element
5
+ *
6
+ * This function takes multiple arrays and a combiner function, and returns a new array where each element
5
7
  * is the result of applying the combiner function to the corresponding elements of the input arrays.
6
8
  *
7
9
  * @param {T[]} arr1 - The first array to zip.
@@ -26,9 +28,27 @@
26
28
  * const result = zipWith(arr1, arr2, arr3, (a, b, c) => `${a}${b}${c}`);
27
29
  * // result will be [`135`, `246`]
28
30
  */
29
- declare function zipWith<T, R>(arr1: T[], combine: (item: T) => R): R[];
30
- declare function zipWith<T, U, R>(arr1: T[], arr2: U[], combine: (item1: T, item2: U) => R): R[];
31
- declare function zipWith<T, U, V, R>(arr1: T[], arr2: U[], arr3: V[], combine: (item1: T, item2: U, item3: V) => R): R[];
32
- declare function zipWith<T, U, V, W, R>(arr1: T[], arr2: U[], arr3: V[], arr4: W[], combine: (item1: T, item2: U, item3: V, item4: W) => R): R[];
31
+
32
+ function zipWith(arr1) {
33
+ for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
34
+ rest[_key - 1] = arguments[_key];
35
+ }
36
+ var arrs = [arr1].concat(_toConsumableArray(rest.slice(0, -1)));
37
+ var combine = rest[rest.length - 1];
38
+ var result = [];
39
+ var maxIndex = Math.max.apply(Math, _toConsumableArray(arrs.map(function (arr) {
40
+ return arr.length;
41
+ })));
42
+ var _loop = function _loop(i) {
43
+ var elements = arrs.map(function (arr) {
44
+ return arr[i];
45
+ });
46
+ result.push(combine.apply(void 0, _toConsumableArray(elements)));
47
+ };
48
+ for (var i = 0; i < maxIndex; i++) {
49
+ _loop(i);
50
+ }
51
+ return result;
52
+ }
33
53
 
34
54
  export { zipWith };
@@ -14,13 +14,26 @@
14
14
  *
15
15
  * // Will log 'Function executed' after 1 second if not called again in that time
16
16
  * debouncedFunction();
17
- *
17
+ *
18
18
  * // Will not log anything as the previous call is canceled
19
19
  * debouncedFunction.cancel();
20
20
  */
21
- declare function debounce(func: () => void, debounceMs: number): {
22
- (): void;
23
- cancel: () => void;
24
- };
21
+ function debounce(func, debounceMs) {
22
+ var timeoutId = null;
23
+ var debounced = function debounced() {
24
+ if (timeoutId != null) {
25
+ clearTimeout(timeoutId);
26
+ }
27
+ timeoutId = setTimeout(function () {
28
+ func();
29
+ }, debounceMs);
30
+ };
31
+ debounced.cancel = function () {
32
+ if (timeoutId != null) {
33
+ clearTimeout(timeoutId);
34
+ }
35
+ };
36
+ return debounced;
37
+ }
25
38
 
26
39
  export { debounce };
@@ -10,10 +10,22 @@
10
10
  * console.log('Initialized!');
11
11
  * return true;
12
12
  * });
13
- *
13
+ *
14
14
  * initialize(); // Logs: 'Initialized!' and returns true
15
15
  * initialize(); // Returns true without logging
16
16
  */
17
- declare function once<F extends () => any>(func: F): F;
17
+ function once(func) {
18
+ var called = false;
19
+ var cache;
20
+ return function () {
21
+ if (called) {
22
+ return cache;
23
+ }
24
+ var result = func();
25
+ called = true;
26
+ cache = result;
27
+ return result;
28
+ };
29
+ }
18
30
 
19
31
  export { once };
@@ -14,15 +14,25 @@
14
14
  *
15
15
  * // Will log 'Function executed' immediately
16
16
  * throttledFunction();
17
- *
17
+ *
18
18
  * // Will not log anything as it is within the throttle time
19
19
  * throttledFunction();
20
- *
20
+ *
21
21
  * // After 1 second
22
22
  * setTimeout(() => {
23
23
  * throttledFunction(); // Will log 'Function executed'
24
24
  * }, 1000);
25
25
  */
26
- declare function throttle(func: () => void, throttleMs: number): () => void;
26
+ function throttle(func, throttleMs) {
27
+ var lastCallTime;
28
+ var throttledFunction = function throttledFunction() {
29
+ var now = Date.now();
30
+ if (lastCallTime == null || now - lastCallTime >= throttleMs) {
31
+ lastCallTime = now;
32
+ func();
33
+ }
34
+ };
35
+ return throttledFunction;
36
+ }
27
37
 
28
38
  export { throttle };
@@ -0,0 +1,66 @@
1
+ function _unsupportedIterableToArray(o, minLen) {
2
+ if (!o) return;
3
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
4
+ var n = Object.prototype.toString.call(o).slice(8, -1);
5
+ if (n === "Object" && o.constructor) n = o.constructor.name;
6
+ if (n === "Map" || n === "Set") return Array.from(o);
7
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
8
+ }
9
+ function _arrayLikeToArray(arr, len) {
10
+ if (len == null || len > arr.length) len = arr.length;
11
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
12
+ return arr2;
13
+ }
14
+ function _createForOfIteratorHelper(o, allowArrayLike) {
15
+ var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
16
+ if (!it) {
17
+ if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
18
+ if (it) o = it;
19
+ var i = 0;
20
+ var F = function () {};
21
+ return {
22
+ s: F,
23
+ n: function () {
24
+ if (i >= o.length) return {
25
+ done: true
26
+ };
27
+ return {
28
+ done: false,
29
+ value: o[i++]
30
+ };
31
+ },
32
+ e: function (e) {
33
+ throw e;
34
+ },
35
+ f: F
36
+ };
37
+ }
38
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
39
+ }
40
+ var normalCompletion = true,
41
+ didErr = false,
42
+ err;
43
+ return {
44
+ s: function () {
45
+ it = it.call(o);
46
+ },
47
+ n: function () {
48
+ var step = it.next();
49
+ normalCompletion = step.done;
50
+ return step;
51
+ },
52
+ e: function (e) {
53
+ didErr = true;
54
+ err = e;
55
+ },
56
+ f: function () {
57
+ try {
58
+ if (!normalCompletion && it.return != null) it.return();
59
+ } finally {
60
+ if (didErr) throw err;
61
+ }
62
+ }
63
+ };
64
+ }
65
+
66
+ export { _arrayLikeToArray as arrayLikeToArray, _createForOfIteratorHelper as createForOfIteratorHelper, _unsupportedIterableToArray as unsupportedIterableToArray };
@@ -15,7 +15,12 @@
15
15
  * const result3 = clamp(2, 5, 15); // result3 will be 5, as 2 is clamped to the lower bound 5
16
16
  * const result4 = clamp(20, 5, 15); // result4 will be 15, as 20 is clamped to the upper bound 15
17
17
  */
18
- declare function clamp(value: number, maximum: number): number;
19
- declare function clamp(value: number, minimum: number, maximum: number): number;
18
+
19
+ function clamp(value, bound1, bound2) {
20
+ if (bound2 == null) {
21
+ return Math.min(value, bound1);
22
+ }
23
+ return Math.min(Math.max(value, bound1), bound2);
24
+ }
20
25
 
21
26
  export { clamp };
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Rounds a number to a specified precision.
3
- *
4
- * This function takes a number and an optional precision value, and returns the number rounded
3
+ *
4
+ * This function takes a number and an optional precision value, and returns the number rounded
5
5
  * to the specified number of decimal places.
6
6
  *
7
7
  * @param {number} value - The number to round.
@@ -13,6 +13,10 @@
13
13
  * const result2 = round(1.2345, 2); // result2 will be 1.23
14
14
  * const result3 = round(1.2345, 3); // result3 will be 1.235
15
15
  */
16
- declare function round(value: number, precision?: number): number;
16
+ function round(value) {
17
+ var precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
18
+ var multiplier = Math.pow(10, precision);
19
+ return Math.round(value * multiplier) / multiplier;
20
+ }
17
21
 
18
22
  export { round };
@@ -0,0 +1,33 @@
1
+ import { createForOfIteratorHelper as _createForOfIteratorHelper } from './_virtual/_rollupPluginBabelHelpers.mjs';
2
+
3
+ /**
4
+ * Calculates the sum of an array of numbers.
5
+ *
6
+ * This function takes an array of numbers and returns the sum of all the elements in the array.
7
+ *
8
+ * @param {number[]} nums - An array of numbers to be summed.
9
+ * @returns {number} The sum of all the numbers in the array.
10
+ *
11
+ * @example
12
+ * * const numbers = [1, 2, 3, 4, 5];
13
+ * const result = sum(numbers);
14
+ * // result will be 15
15
+ */
16
+ function sum(nums) {
17
+ var result = 0;
18
+ var _iterator = _createForOfIteratorHelper(nums),
19
+ _step;
20
+ try {
21
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
22
+ var num = _step.value;
23
+ result += num;
24
+ }
25
+ } catch (err) {
26
+ _iterator.e(err);
27
+ } finally {
28
+ _iterator.f();
29
+ }
30
+ return result;
31
+ }
32
+
33
+ export { sum };
@@ -0,0 +1,151 @@
1
+ function _iterableToArrayLimit(r, l) {
2
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
3
+ if (null != t) {
4
+ var e,
5
+ n,
6
+ i,
7
+ u,
8
+ a = [],
9
+ f = !0,
10
+ o = !1;
11
+ try {
12
+ if (i = (t = t.call(r)).next, 0 === l) {
13
+ if (Object(t) !== t) return;
14
+ f = !1;
15
+ } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
16
+ } catch (r) {
17
+ o = !0, n = r;
18
+ } finally {
19
+ try {
20
+ if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
21
+ } finally {
22
+ if (o) throw n;
23
+ }
24
+ }
25
+ return a;
26
+ }
27
+ }
28
+ function ownKeys(e, r) {
29
+ var t = Object.keys(e);
30
+ if (Object.getOwnPropertySymbols) {
31
+ var o = Object.getOwnPropertySymbols(e);
32
+ r && (o = o.filter(function (r) {
33
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
34
+ })), t.push.apply(t, o);
35
+ }
36
+ return t;
37
+ }
38
+ function _objectSpread2(e) {
39
+ for (var r = 1; r < arguments.length; r++) {
40
+ var t = null != arguments[r] ? arguments[r] : {};
41
+ r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
42
+ _defineProperty(e, r, t[r]);
43
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
44
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
45
+ });
46
+ }
47
+ return e;
48
+ }
49
+ function _toPrimitive(t, r) {
50
+ if ("object" != typeof t || !t) return t;
51
+ var e = t[Symbol.toPrimitive];
52
+ if (void 0 !== e) {
53
+ var i = e.call(t, r || "default");
54
+ if ("object" != typeof i) return i;
55
+ throw new TypeError("@@toPrimitive must return a primitive value.");
56
+ }
57
+ return ("string" === r ? String : Number)(t);
58
+ }
59
+ function _toPropertyKey(t) {
60
+ var i = _toPrimitive(t, "string");
61
+ return "symbol" == typeof i ? i : i + "";
62
+ }
63
+ function _defineProperty(obj, key, value) {
64
+ key = _toPropertyKey(key);
65
+ if (key in obj) {
66
+ Object.defineProperty(obj, key, {
67
+ value: value,
68
+ enumerable: true,
69
+ configurable: true,
70
+ writable: true
71
+ });
72
+ } else {
73
+ obj[key] = value;
74
+ }
75
+ return obj;
76
+ }
77
+ function _slicedToArray(arr, i) {
78
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
79
+ }
80
+ function _arrayWithHoles(arr) {
81
+ if (Array.isArray(arr)) return arr;
82
+ }
83
+ function _unsupportedIterableToArray(o, minLen) {
84
+ if (!o) return;
85
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
86
+ var n = Object.prototype.toString.call(o).slice(8, -1);
87
+ if (n === "Object" && o.constructor) n = o.constructor.name;
88
+ if (n === "Map" || n === "Set") return Array.from(o);
89
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
90
+ }
91
+ function _arrayLikeToArray(arr, len) {
92
+ if (len == null || len > arr.length) len = arr.length;
93
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
94
+ return arr2;
95
+ }
96
+ function _nonIterableRest() {
97
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
98
+ }
99
+ function _createForOfIteratorHelper(o, allowArrayLike) {
100
+ var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
101
+ if (!it) {
102
+ if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
103
+ if (it) o = it;
104
+ var i = 0;
105
+ var F = function () {};
106
+ return {
107
+ s: F,
108
+ n: function () {
109
+ if (i >= o.length) return {
110
+ done: true
111
+ };
112
+ return {
113
+ done: false,
114
+ value: o[i++]
115
+ };
116
+ },
117
+ e: function (e) {
118
+ throw e;
119
+ },
120
+ f: F
121
+ };
122
+ }
123
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
124
+ }
125
+ var normalCompletion = true,
126
+ didErr = false,
127
+ err;
128
+ return {
129
+ s: function () {
130
+ it = it.call(o);
131
+ },
132
+ n: function () {
133
+ var step = it.next();
134
+ normalCompletion = step.done;
135
+ return step;
136
+ },
137
+ e: function (e) {
138
+ didErr = true;
139
+ err = e;
140
+ },
141
+ f: function () {
142
+ try {
143
+ if (!normalCompletion && it.return != null) it.return();
144
+ } finally {
145
+ if (didErr) throw err;
146
+ }
147
+ }
148
+ };
149
+ }
150
+
151
+ export { _arrayLikeToArray as arrayLikeToArray, _arrayWithHoles as arrayWithHoles, _createForOfIteratorHelper as createForOfIteratorHelper, _defineProperty as defineProperty, _iterableToArrayLimit as iterableToArrayLimit, _nonIterableRest as nonIterableRest, _objectSpread2 as objectSpread2, _slicedToArray as slicedToArray, _toPrimitive as toPrimitive, _toPropertyKey as toPropertyKey, _unsupportedIterableToArray as unsupportedIterableToArray };
@@ -1,7 +1,9 @@
1
+ import { objectSpread2 as _objectSpread2, createForOfIteratorHelper as _createForOfIteratorHelper } from './_virtual/_rollupPluginBabelHelpers.mjs';
2
+
1
3
  /**
2
4
  * Creates a new object with specified keys omitted.
3
5
  *
4
- * This function takes an object and an array of keys, and returns a new object that
6
+ * This function takes an object and an array of keys, and returns a new object that
5
7
  * excludes the properties corresponding to the specified keys.
6
8
  *
7
9
  * @param {T} obj - The object to omit keys from.
@@ -13,6 +15,21 @@
13
15
  * const result = omit(obj, ['b', 'c']);
14
16
  * // result will be { a: 1 }
15
17
  */
16
- declare function omit<T, K extends keyof T>(obj: T, keys: K[]): Omit<T, K>;
18
+ function omit(obj, keys) {
19
+ var result = _objectSpread2({}, obj);
20
+ var _iterator = _createForOfIteratorHelper(keys),
21
+ _step;
22
+ try {
23
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
24
+ var key = _step.value;
25
+ delete result[key];
26
+ }
27
+ } catch (err) {
28
+ _iterator.e(err);
29
+ } finally {
30
+ _iterator.f();
31
+ }
32
+ return result;
33
+ }
17
34
 
18
35
  export { omit };
@@ -1,12 +1,14 @@
1
+ import { slicedToArray as _slicedToArray } from './_virtual/_rollupPluginBabelHelpers.mjs';
2
+
1
3
  /**
2
4
  * Creates a new object composed of the properties that do not satisfy the predicate function.
3
5
  *
4
- * This function takes an object and a predicate function, and returns a new object that
6
+ * This function takes an object and a predicate function, and returns a new object that
5
7
  * includes only the properties for which the predicate function returns false.
6
8
  *
7
9
  * @param {T} obj - The object to omit properties from.
8
- * @param {(value: T[string], key: string) => boolean} shouldOmit - A predicate function that determines
9
- * whether a property should be omitted. It takes the property's key and value as arguments and returns `true`
10
+ * @param {(value: T[string], key: string) => boolean} shouldOmit - A predicate function that determines
11
+ * whether a property should be omitted. It takes the property's key and value as arguments and returns `true`
10
12
  * if the property should be omitted, and `false` otherwise.
11
13
  * @returns {Partial<T>} A new object with the properties that do not satisfy the predicate function.
12
14
  *
@@ -16,6 +18,18 @@
16
18
  * const result = omitBy(obj, shouldOmit);
17
19
  * // result will be { a: 1, c: 3 }
18
20
  */
19
- declare function omitBy<T extends Record<string, any>>(obj: T, shouldOmit: (value: T[keyof T], key: string) => boolean): Partial<T>;
21
+ function omitBy(obj, shouldOmit) {
22
+ var result = {};
23
+ for (var _i = 0, _Object$entries = Object.entries(obj); _i < _Object$entries.length; _i++) {
24
+ var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
25
+ key = _Object$entries$_i[0],
26
+ value = _Object$entries$_i[1];
27
+ if (shouldOmit(value, key)) {
28
+ continue;
29
+ }
30
+ result[key] = value;
31
+ }
32
+ return result;
33
+ }
20
34
 
21
35
  export { omitBy };