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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (735) hide show
  1. package/dist/_chunk/index-CwRt_M.js +47 -0
  2. package/dist/_chunk/index-CwRt_M.js.map +1 -0
  3. package/dist/_chunk/isPlainObject-bK22pA.js +24 -0
  4. package/dist/_chunk/isPlainObject-bK22pA.js.map +1 -0
  5. package/dist/_chunk/randomInt-CF7bZK.js +20 -0
  6. package/dist/_chunk/randomInt-CF7bZK.js.map +1 -0
  7. package/dist/_chunk/union-CdQeDK.js +13 -0
  8. package/dist/_chunk/union-CdQeDK.js.map +1 -0
  9. package/dist/array/chunk.mjs +16 -8
  10. package/dist/array/chunk.mjs.map +1 -1
  11. package/dist/array/compact.mjs +12 -8
  12. package/dist/array/compact.mjs.map +1 -1
  13. package/dist/array/countBy.mjs +11 -8
  14. package/dist/array/countBy.mjs.map +1 -1
  15. package/dist/array/difference.mjs +7 -8
  16. package/dist/array/difference.mjs.map +1 -1
  17. package/dist/array/differenceBy.mjs +9 -8
  18. package/dist/array/differenceBy.mjs.map +1 -1
  19. package/dist/array/differenceWith.mjs +10 -8
  20. package/dist/array/differenceWith.mjs.map +1 -1
  21. package/dist/array/drop.mjs +7 -8
  22. package/dist/array/drop.mjs.map +1 -1
  23. package/dist/array/dropRight.mjs +10 -8
  24. package/dist/array/dropRight.mjs.map +1 -1
  25. package/dist/array/dropRightWhile.mjs +11 -8
  26. package/dist/array/dropRightWhile.mjs.map +1 -1
  27. package/dist/array/dropWhile.mjs +10 -8
  28. package/dist/array/dropWhile.mjs.map +1 -1
  29. package/dist/array/fill.mjs +12 -8
  30. package/dist/array/fill.mjs.map +1 -1
  31. package/dist/array/flatMap.mjs +8 -9
  32. package/dist/array/flatMap.mjs.map +1 -1
  33. package/dist/array/flatten.mjs +19 -8
  34. package/dist/array/flatten.mjs.map +1 -1
  35. package/dist/array/flattenDeep.mjs +8 -9
  36. package/dist/array/flattenDeep.mjs.map +1 -1
  37. package/dist/array/forEachRight.mjs +9 -8
  38. package/dist/array/forEachRight.mjs.map +1 -1
  39. package/dist/array/groupBy.mjs +14 -8
  40. package/dist/array/groupBy.mjs.map +1 -1
  41. package/dist/array/head.mjs +6 -8
  42. package/dist/array/head.mjs.map +1 -1
  43. package/dist/array/index.js +353 -498
  44. package/dist/array/index.js.map +1 -1
  45. package/dist/array/index.mjs +52 -211
  46. package/dist/array/index.mjs.map +1 -1
  47. package/dist/array/initial.mjs +9 -8
  48. package/dist/array/initial.mjs.map +1 -1
  49. package/dist/array/intersection.mjs +9 -8
  50. package/dist/array/intersection.mjs.map +1 -1
  51. package/dist/array/intersectionBy.mjs +7 -8
  52. package/dist/array/intersectionBy.mjs.map +1 -1
  53. package/dist/array/intersectionWith.mjs +10 -8
  54. package/dist/array/intersectionWith.mjs.map +1 -1
  55. package/dist/array/keyBy.mjs +11 -8
  56. package/dist/array/keyBy.mjs.map +1 -1
  57. package/dist/array/last.mjs +6 -8
  58. package/dist/array/last.mjs.map +1 -1
  59. package/dist/array/maxBy.mjs +15 -8
  60. package/dist/array/maxBy.mjs.map +1 -1
  61. package/dist/array/minBy.mjs +15 -8
  62. package/dist/array/minBy.mjs.map +1 -1
  63. package/dist/array/orderBy.mjs +26 -8
  64. package/dist/array/orderBy.mjs.map +1 -1
  65. package/dist/array/partition.mjs +16 -8
  66. package/dist/array/partition.mjs.map +1 -1
  67. package/dist/array/sample.mjs +7 -8
  68. package/dist/array/sample.mjs.map +1 -1
  69. package/dist/array/sampleSize.mjs +21 -10
  70. package/dist/array/sampleSize.mjs.map +1 -1
  71. package/dist/array/shuffle.mjs +11 -8
  72. package/dist/array/shuffle.mjs.map +1 -1
  73. package/dist/array/tail.mjs +14 -8
  74. package/dist/array/tail.mjs.map +1 -1
  75. package/dist/array/take.mjs +6 -8
  76. package/dist/array/take.mjs.map +1 -1
  77. package/dist/array/takeRight.mjs +9 -8
  78. package/dist/array/takeRight.mjs.map +1 -1
  79. package/dist/array/takeRightWhile.mjs +11 -8
  80. package/dist/array/takeRightWhile.mjs.map +1 -1
  81. package/dist/array/takeWhile.mjs +13 -8
  82. package/dist/array/takeWhile.mjs.map +1 -1
  83. package/dist/array/toFilled.mjs +13 -8
  84. package/dist/array/toFilled.mjs.map +1 -1
  85. package/dist/array/union.mjs +8 -9
  86. package/dist/array/union.mjs.map +1 -1
  87. package/dist/array/unionBy.mjs +13 -8
  88. package/dist/array/unionBy.mjs.map +1 -1
  89. package/dist/array/unionWith.mjs +8 -9
  90. package/dist/array/unionWith.mjs.map +1 -1
  91. package/dist/array/uniq.mjs +6 -8
  92. package/dist/array/uniq.mjs.map +1 -1
  93. package/dist/array/uniqBy.mjs +13 -8
  94. package/dist/array/uniqBy.mjs.map +1 -1
  95. package/dist/array/uniqWith.mjs +13 -8
  96. package/dist/array/uniqWith.mjs.map +1 -1
  97. package/dist/array/unzip.mjs +19 -8
  98. package/dist/array/unzip.mjs.map +1 -1
  99. package/dist/array/unzipWith.mjs +15 -8
  100. package/dist/array/unzipWith.mjs.map +1 -1
  101. package/dist/array/without.mjs +7 -8
  102. package/dist/array/without.mjs.map +1 -1
  103. package/dist/array/xor.mjs +10 -12
  104. package/dist/array/xor.mjs.map +1 -1
  105. package/dist/array/xorBy.mjs +12 -11
  106. package/dist/array/xorBy.mjs.map +1 -1
  107. package/dist/array/xorWith.mjs +12 -12
  108. package/dist/array/xorWith.mjs.map +1 -1
  109. package/dist/array/zip.mjs +15 -8
  110. package/dist/array/zip.mjs.map +1 -1
  111. package/dist/array/zipObject.mjs +10 -8
  112. package/dist/array/zipObject.mjs.map +1 -1
  113. package/dist/array/zipWith.mjs +14 -8
  114. package/dist/array/zipWith.mjs.map +1 -1
  115. package/dist/compat/_internal/isDeepKey.mjs +16 -0
  116. package/dist/compat/_internal/isDeepKey.mjs.map +1 -0
  117. package/dist/compat/_internal/isIndex.mjs +17 -0
  118. package/dist/compat/_internal/isIndex.mjs.map +1 -0
  119. package/dist/compat/_internal/toPath.mjs +41 -0
  120. package/dist/compat/_internal/toPath.mjs.map +1 -0
  121. package/dist/compat/array/chunk.d.mts +26 -0
  122. package/dist/compat/array/chunk.d.ts +26 -0
  123. package/dist/compat/array/chunk.mjs +12 -0
  124. package/dist/compat/array/chunk.mjs.map +1 -0
  125. package/dist/compat/array/concat.d.mts +30 -0
  126. package/dist/compat/array/concat.d.ts +30 -0
  127. package/dist/compat/array/concat.mjs +8 -0
  128. package/dist/compat/array/concat.mjs.map +1 -0
  129. package/dist/compat/array/difference.d.mts +3 -0
  130. package/dist/compat/array/difference.d.ts +3 -0
  131. package/dist/compat/array/difference.mjs +11 -0
  132. package/dist/compat/array/difference.mjs.map +1 -0
  133. package/dist/compat/array/fill.d.mts +33 -0
  134. package/dist/compat/array/fill.d.ts +33 -0
  135. package/dist/compat/array/fill.mjs +16 -0
  136. package/dist/compat/array/fill.mjs.map +1 -0
  137. package/dist/compat/array/zipObjectDeep.d.mts +37 -0
  138. package/dist/compat/array/zipObjectDeep.d.ts +37 -0
  139. package/dist/compat/array/zipObjectDeep.mjs +17 -0
  140. package/dist/compat/array/zipObjectDeep.mjs.map +1 -0
  141. package/dist/compat/index.d.mts +14 -546
  142. package/dist/compat/index.d.ts +14 -546
  143. package/dist/compat/index.js +287 -1498
  144. package/dist/compat/index.js.map +1 -1
  145. package/dist/compat/index.mjs +106 -415
  146. package/dist/compat/index.mjs.map +1 -1
  147. package/dist/compat/math/max.d.mts +19 -0
  148. package/dist/compat/math/max.d.ts +19 -0
  149. package/dist/compat/math/max.mjs +14 -0
  150. package/dist/compat/math/max.mjs.map +1 -0
  151. package/dist/compat/math/min.d.mts +19 -0
  152. package/dist/compat/math/min.d.ts +19 -0
  153. package/dist/compat/math/min.mjs +14 -0
  154. package/dist/compat/math/min.mjs.map +1 -0
  155. package/dist/compat/object/get.d.mts +247 -0
  156. package/dist/compat/object/get.d.ts +247 -0
  157. package/dist/compat/object/get.mjs +34 -0
  158. package/dist/compat/object/get.mjs.map +1 -0
  159. package/dist/compat/object/get.types.d.mts +9 -0
  160. package/dist/compat/object/get.types.d.ts +9 -0
  161. package/dist/compat/object/set.d.mts +30 -0
  162. package/dist/compat/object/set.d.ts +30 -0
  163. package/dist/compat/object/set.mjs +25 -0
  164. package/dist/compat/object/set.mjs.map +1 -0
  165. package/dist/compat/predicate/isArray.d.mts +24 -0
  166. package/dist/compat/predicate/isArray.d.ts +24 -0
  167. package/dist/compat/predicate/isArray.mjs +6 -0
  168. package/dist/compat/predicate/isArray.mjs.map +1 -0
  169. package/dist/compat/predicate/isPlainObject.d.mts +25 -0
  170. package/dist/compat/predicate/isPlainObject.d.ts +25 -0
  171. package/dist/compat/predicate/isPlainObject.mjs +30 -0
  172. package/dist/compat/predicate/isPlainObject.mjs.map +1 -0
  173. package/dist/compat/predicate/isTypedArray.d.mts +19 -0
  174. package/dist/compat/predicate/isTypedArray.d.ts +19 -0
  175. package/dist/compat/predicate/isTypedArray.mjs +8 -0
  176. package/dist/compat/predicate/isTypedArray.mjs.map +1 -0
  177. package/dist/compat/string/endsWith.d.mts +20 -0
  178. package/dist/compat/string/endsWith.d.ts +20 -0
  179. package/dist/compat/string/endsWith.mjs +6 -0
  180. package/dist/compat/string/endsWith.mjs.map +1 -0
  181. package/dist/compat/string/startsWith.d.mts +20 -0
  182. package/dist/compat/string/startsWith.d.ts +20 -0
  183. package/dist/compat/string/startsWith.mjs +6 -0
  184. package/dist/compat/string/startsWith.mjs.map +1 -0
  185. package/dist/error/AbortError.mjs +9 -8
  186. package/dist/error/AbortError.mjs.map +1 -1
  187. package/dist/error/TimeoutError.mjs +9 -8
  188. package/dist/error/TimeoutError.mjs.map +1 -1
  189. package/dist/function/after.mjs +14 -7
  190. package/dist/function/after.mjs.map +1 -1
  191. package/dist/function/debounce.mjs +29 -8
  192. package/dist/function/debounce.mjs.map +1 -1
  193. package/dist/function/index.js +66 -102
  194. package/dist/function/index.js.map +1 -1
  195. package/dist/function/index.mjs +7 -29
  196. package/dist/function/index.mjs.map +1 -1
  197. package/dist/function/negate.mjs +6 -8
  198. package/dist/function/negate.mjs.map +1 -1
  199. package/dist/function/noop.mjs +4 -8
  200. package/dist/function/noop.mjs.map +1 -1
  201. package/dist/function/once.mjs +16 -8
  202. package/dist/function/once.mjs.map +1 -1
  203. package/dist/function/throttle.mjs +14 -8
  204. package/dist/function/throttle.mjs.map +1 -1
  205. package/dist/index.js +114 -1307
  206. package/dist/index.js.map +1 -1
  207. package/dist/index.mjs +97 -399
  208. package/dist/index.mjs.map +1 -1
  209. package/dist/math/clamp.mjs +9 -8
  210. package/dist/math/clamp.mjs.map +1 -1
  211. package/dist/math/inRange.mjs +13 -8
  212. package/dist/math/inRange.mjs.map +1 -1
  213. package/dist/math/index.js +59 -115
  214. package/dist/math/index.js.map +1 -1
  215. package/dist/math/index.mjs +11 -45
  216. package/dist/math/index.mjs.map +1 -1
  217. package/dist/math/mean.mjs +8 -9
  218. package/dist/math/mean.mjs.map +1 -1
  219. package/dist/math/meanBy.mjs +9 -10
  220. package/dist/math/meanBy.mjs.map +1 -1
  221. package/dist/math/random.mjs +13 -8
  222. package/dist/math/random.mjs.map +1 -1
  223. package/dist/math/randomInt.mjs +8 -9
  224. package/dist/math/randomInt.mjs.map +1 -1
  225. package/dist/math/range.mjs +21 -8
  226. package/dist/math/range.mjs.map +1 -1
  227. package/dist/math/round.mjs +10 -8
  228. package/dist/math/round.mjs.map +1 -1
  229. package/dist/math/sum.mjs +10 -8
  230. package/dist/math/sum.mjs.map +1 -1
  231. package/dist/math/sumBy.mjs +9 -9
  232. package/dist/math/sumBy.mjs.map +1 -1
  233. package/dist/object/clone.mjs +40 -8
  234. package/dist/object/clone.mjs.map +1 -1
  235. package/dist/object/cloneDeep.mjs +100 -8
  236. package/dist/object/cloneDeep.mjs.map +1 -1
  237. package/dist/object/flattenObject.mjs +29 -9
  238. package/dist/object/flattenObject.mjs.map +1 -1
  239. package/dist/object/index.js +184 -232
  240. package/dist/object/index.js.map +1 -1
  241. package/dist/object/index.mjs +9 -38
  242. package/dist/object/index.mjs.map +1 -1
  243. package/dist/object/invert.mjs +13 -8
  244. package/dist/object/invert.mjs.map +1 -1
  245. package/dist/object/omit.mjs +10 -8
  246. package/dist/object/omit.mjs.map +1 -1
  247. package/dist/object/omitBy.mjs +13 -8
  248. package/dist/object/omitBy.mjs.map +1 -1
  249. package/dist/object/pick.mjs +10 -8
  250. package/dist/object/pick.mjs.map +1 -1
  251. package/dist/object/pickBy.mjs +13 -8
  252. package/dist/object/pickBy.mjs.map +1 -1
  253. package/dist/predicate/index.js +65 -126
  254. package/dist/predicate/index.js.map +1 -1
  255. package/dist/predicate/index.mjs +12 -51
  256. package/dist/predicate/index.mjs.map +1 -1
  257. package/dist/predicate/isArrayLike.mjs +9 -9
  258. package/dist/predicate/isArrayLike.mjs.map +1 -1
  259. package/dist/predicate/isEqual.mjs +36 -10
  260. package/dist/predicate/isEqual.mjs.map +1 -1
  261. package/dist/predicate/isFunction.mjs +6 -8
  262. package/dist/predicate/isFunction.mjs.map +1 -1
  263. package/dist/predicate/isLength.mjs +6 -8
  264. package/dist/predicate/isLength.mjs.map +1 -1
  265. package/dist/predicate/isNil.mjs +6 -8
  266. package/dist/predicate/isNil.mjs.map +1 -1
  267. package/dist/predicate/isNotNil.mjs +6 -8
  268. package/dist/predicate/isNotNil.mjs.map +1 -1
  269. package/dist/predicate/isNull.mjs +6 -8
  270. package/dist/predicate/isNull.mjs.map +1 -1
  271. package/dist/predicate/isPlainObject.mjs +22 -8
  272. package/dist/predicate/isPlainObject.mjs.map +1 -1
  273. package/dist/predicate/isPrimitive.mjs +6 -8
  274. package/dist/predicate/isPrimitive.mjs.map +1 -1
  275. package/dist/predicate/isTypedArray.mjs +16 -8
  276. package/dist/predicate/isTypedArray.mjs.map +1 -1
  277. package/dist/predicate/isUndefined.mjs +6 -8
  278. package/dist/predicate/isUndefined.mjs.map +1 -1
  279. package/dist/promise/delay.mjs +21 -9
  280. package/dist/promise/delay.mjs.map +1 -1
  281. package/dist/promise/index.js +6 -72
  282. package/dist/promise/index.js.map +1 -1
  283. package/dist/promise/index.mjs +3 -16
  284. package/dist/promise/index.mjs.map +1 -1
  285. package/dist/promise/timeout.mjs +10 -11
  286. package/dist/promise/timeout.mjs.map +1 -1
  287. package/dist/promise/withTimeout.mjs +8 -12
  288. package/dist/promise/withTimeout.mjs.map +1 -1
  289. package/dist/string/_internal/getWords.mjs +7 -0
  290. package/dist/string/_internal/getWords.mjs.map +1 -0
  291. package/dist/string/camelCase.mjs +14 -10
  292. package/dist/string/camelCase.mjs.map +1 -1
  293. package/dist/string/capitalize.mjs +5 -7
  294. package/dist/string/capitalize.mjs.map +1 -1
  295. package/dist/string/index.js +42 -77
  296. package/dist/string/index.js.map +1 -1
  297. package/dist/string/index.mjs +7 -30
  298. package/dist/string/index.mjs.map +1 -1
  299. package/dist/string/kebabCase.mjs +8 -8
  300. package/dist/string/kebabCase.mjs.map +1 -1
  301. package/dist/string/lowerCase.mjs +8 -8
  302. package/dist/string/lowerCase.mjs.map +1 -1
  303. package/dist/string/snakeCase.mjs +8 -8
  304. package/dist/string/snakeCase.mjs.map +1 -1
  305. package/dist/string/startCase.mjs +21 -9
  306. package/dist/string/startCase.mjs.map +1 -1
  307. package/package.json +8 -2
  308. package/umd/browser.global.js +2 -2
  309. package/umd/browser.global.js.map +1 -0
  310. package/dist/array/chunk.js +0 -43
  311. package/dist/array/chunk.js.map +0 -1
  312. package/dist/array/compact.js +0 -39
  313. package/dist/array/compact.js.map +0 -1
  314. package/dist/array/countBy.js +0 -38
  315. package/dist/array/countBy.js.map +0 -1
  316. package/dist/array/difference.js +0 -34
  317. package/dist/array/difference.js.map +0 -1
  318. package/dist/array/differenceBy.js +0 -36
  319. package/dist/array/differenceBy.js.map +0 -1
  320. package/dist/array/differenceWith.js +0 -37
  321. package/dist/array/differenceWith.js.map +0 -1
  322. package/dist/array/drop.js +0 -34
  323. package/dist/array/drop.js.map +0 -1
  324. package/dist/array/dropRight.js +0 -37
  325. package/dist/array/dropRight.js.map +0 -1
  326. package/dist/array/dropRightWhile.js +0 -38
  327. package/dist/array/dropRightWhile.js.map +0 -1
  328. package/dist/array/dropWhile.js +0 -37
  329. package/dist/array/dropWhile.js.map +0 -1
  330. package/dist/array/fill.js +0 -39
  331. package/dist/array/fill.js.map +0 -1
  332. package/dist/array/flatMap.js +0 -52
  333. package/dist/array/flatMap.js.map +0 -1
  334. package/dist/array/flatten.js +0 -45
  335. package/dist/array/flatten.js.map +0 -1
  336. package/dist/array/flattenDeep.js +0 -52
  337. package/dist/array/flattenDeep.js.map +0 -1
  338. package/dist/array/forEachRight.js +0 -36
  339. package/dist/array/forEachRight.js.map +0 -1
  340. package/dist/array/groupBy.js +0 -41
  341. package/dist/array/groupBy.js.map +0 -1
  342. package/dist/array/head.js +0 -33
  343. package/dist/array/head.js.map +0 -1
  344. package/dist/array/initial.js +0 -36
  345. package/dist/array/initial.js.map +0 -1
  346. package/dist/array/intersection.js +0 -36
  347. package/dist/array/intersection.js.map +0 -1
  348. package/dist/array/intersectionBy.js +0 -34
  349. package/dist/array/intersectionBy.js.map +0 -1
  350. package/dist/array/intersectionWith.js +0 -37
  351. package/dist/array/intersectionWith.js.map +0 -1
  352. package/dist/array/keyBy.js +0 -38
  353. package/dist/array/keyBy.js.map +0 -1
  354. package/dist/array/last.js +0 -33
  355. package/dist/array/last.js.map +0 -1
  356. package/dist/array/maxBy.js +0 -42
  357. package/dist/array/maxBy.js.map +0 -1
  358. package/dist/array/minBy.js +0 -42
  359. package/dist/array/minBy.js.map +0 -1
  360. package/dist/array/orderBy.js +0 -53
  361. package/dist/array/orderBy.js.map +0 -1
  362. package/dist/array/partition.js +0 -42
  363. package/dist/array/partition.js.map +0 -1
  364. package/dist/array/sample.js +0 -34
  365. package/dist/array/sample.js.map +0 -1
  366. package/dist/array/sampleSize.js +0 -65
  367. package/dist/array/sampleSize.js.map +0 -1
  368. package/dist/array/shuffle.js +0 -38
  369. package/dist/array/shuffle.js.map +0 -1
  370. package/dist/array/tail.js +0 -41
  371. package/dist/array/tail.js.map +0 -1
  372. package/dist/array/take.js +0 -33
  373. package/dist/array/take.js.map +0 -1
  374. package/dist/array/takeRight.js +0 -36
  375. package/dist/array/takeRight.js.map +0 -1
  376. package/dist/array/takeRightWhile.js +0 -38
  377. package/dist/array/takeRightWhile.js.map +0 -1
  378. package/dist/array/takeWhile.js +0 -40
  379. package/dist/array/takeWhile.js.map +0 -1
  380. package/dist/array/toFilled.js +0 -40
  381. package/dist/array/toFilled.js.map +0 -1
  382. package/dist/array/union.js +0 -40
  383. package/dist/array/union.js.map +0 -1
  384. package/dist/array/unionBy.js +0 -40
  385. package/dist/array/unionBy.js.map +0 -1
  386. package/dist/array/unionWith.js +0 -47
  387. package/dist/array/unionWith.js.map +0 -1
  388. package/dist/array/uniq.js +0 -33
  389. package/dist/array/uniq.js.map +0 -1
  390. package/dist/array/uniqBy.js +0 -40
  391. package/dist/array/uniqBy.js.map +0 -1
  392. package/dist/array/uniqWith.js +0 -40
  393. package/dist/array/uniqWith.js.map +0 -1
  394. package/dist/array/unzip.js +0 -46
  395. package/dist/array/unzip.js.map +0 -1
  396. package/dist/array/unzipWith.js +0 -42
  397. package/dist/array/unzipWith.js.map +0 -1
  398. package/dist/array/without.js +0 -34
  399. package/dist/array/without.js.map +0 -1
  400. package/dist/array/xor.js +0 -59
  401. package/dist/array/xor.js.map +0 -1
  402. package/dist/array/xorBy.js +0 -63
  403. package/dist/array/xorBy.js.map +0 -1
  404. package/dist/array/xorWith.js +0 -72
  405. package/dist/array/xorWith.js.map +0 -1
  406. package/dist/array/zip.js +0 -42
  407. package/dist/array/zip.js.map +0 -1
  408. package/dist/array/zipObject.js +0 -37
  409. package/dist/array/zipObject.js.map +0 -1
  410. package/dist/array/zipWith.js +0 -41
  411. package/dist/array/zipWith.js.map +0 -1
  412. package/dist/browser.d.mts +0 -2
  413. package/dist/browser.d.ts +0 -2
  414. package/dist/browser.js +0 -1440
  415. package/dist/browser.js.map +0 -1
  416. package/dist/browser.mjs +0 -115
  417. package/dist/browser.mjs.map +0 -1
  418. package/dist/chunk-237HGSZS.mjs +0 -16
  419. package/dist/chunk-237HGSZS.mjs.map +0 -1
  420. package/dist/chunk-27QMXBLJ.mjs +0 -9
  421. package/dist/chunk-27QMXBLJ.mjs.map +0 -1
  422. package/dist/chunk-2IXFGSUA.mjs +0 -16
  423. package/dist/chunk-2IXFGSUA.mjs.map +0 -1
  424. package/dist/chunk-2KNLZB7V.mjs +0 -10
  425. package/dist/chunk-2KNLZB7V.mjs.map +0 -1
  426. package/dist/chunk-2SLTL4KL.mjs +0 -13
  427. package/dist/chunk-2SLTL4KL.mjs.map +0 -1
  428. package/dist/chunk-2ZCITDMK.mjs +0 -13
  429. package/dist/chunk-2ZCITDMK.mjs.map +0 -1
  430. package/dist/chunk-33MSBDC6.mjs +0 -21
  431. package/dist/chunk-33MSBDC6.mjs.map +0 -1
  432. package/dist/chunk-3EZAFZG3.mjs +0 -10
  433. package/dist/chunk-3EZAFZG3.mjs.map +0 -1
  434. package/dist/chunk-3SBT6WDU.mjs +0 -25
  435. package/dist/chunk-3SBT6WDU.mjs.map +0 -1
  436. package/dist/chunk-4DFAGGIM.mjs +0 -26
  437. package/dist/chunk-4DFAGGIM.mjs.map +0 -1
  438. package/dist/chunk-4OIZM4HS.mjs +0 -1
  439. package/dist/chunk-4OIZM4HS.mjs.map +0 -1
  440. package/dist/chunk-4ZES5T6V.mjs +0 -21
  441. package/dist/chunk-4ZES5T6V.mjs.map +0 -1
  442. package/dist/chunk-5ASRKEB4.mjs +0 -13
  443. package/dist/chunk-5ASRKEB4.mjs.map +0 -1
  444. package/dist/chunk-5F26PFZL.mjs +0 -32
  445. package/dist/chunk-5F26PFZL.mjs.map +0 -1
  446. package/dist/chunk-5L4VWRFX.mjs +0 -14
  447. package/dist/chunk-5L4VWRFX.mjs.map +0 -1
  448. package/dist/chunk-5PMKOZ2F.mjs +0 -13
  449. package/dist/chunk-5PMKOZ2F.mjs.map +0 -1
  450. package/dist/chunk-6CLH5YZ2.mjs +0 -16
  451. package/dist/chunk-6CLH5YZ2.mjs.map +0 -1
  452. package/dist/chunk-6NVQAHXP.mjs +0 -13
  453. package/dist/chunk-6NVQAHXP.mjs.map +0 -1
  454. package/dist/chunk-74CREQXW.mjs +0 -9
  455. package/dist/chunk-74CREQXW.mjs.map +0 -1
  456. package/dist/chunk-7B7W36UP.mjs +0 -29
  457. package/dist/chunk-7B7W36UP.mjs.map +0 -1
  458. package/dist/chunk-7GXKT3VW.mjs +0 -41
  459. package/dist/chunk-7GXKT3VW.mjs.map +0 -1
  460. package/dist/chunk-AIRSKN47.mjs +0 -9
  461. package/dist/chunk-AIRSKN47.mjs.map +0 -1
  462. package/dist/chunk-AJKZMN2V.mjs +0 -14
  463. package/dist/chunk-AJKZMN2V.mjs.map +0 -1
  464. package/dist/chunk-B4COTK4K.mjs +0 -16
  465. package/dist/chunk-B4COTK4K.mjs.map +0 -1
  466. package/dist/chunk-BCTYOXT7.mjs +0 -16
  467. package/dist/chunk-BCTYOXT7.mjs.map +0 -1
  468. package/dist/chunk-BGWHVWY4.mjs +0 -13
  469. package/dist/chunk-BGWHVWY4.mjs.map +0 -1
  470. package/dist/chunk-BH6HLGBA.mjs +0 -16
  471. package/dist/chunk-BH6HLGBA.mjs.map +0 -1
  472. package/dist/chunk-BMRTZMRE.mjs +0 -9
  473. package/dist/chunk-BMRTZMRE.mjs.map +0 -1
  474. package/dist/chunk-BOOQBJN2.mjs +0 -9
  475. package/dist/chunk-BOOQBJN2.mjs.map +0 -1
  476. package/dist/chunk-CMBC4MXG.mjs +0 -19
  477. package/dist/chunk-CMBC4MXG.mjs.map +0 -1
  478. package/dist/chunk-DDH7K4QM.mjs +0 -1
  479. package/dist/chunk-DDH7K4QM.mjs.map +0 -1
  480. package/dist/chunk-DLS7UJKJ.mjs +0 -17
  481. package/dist/chunk-DLS7UJKJ.mjs.map +0 -1
  482. package/dist/chunk-DN3NOZ3H.mjs +0 -18
  483. package/dist/chunk-DN3NOZ3H.mjs.map +0 -1
  484. package/dist/chunk-DPH2KE6O.mjs +0 -24
  485. package/dist/chunk-DPH2KE6O.mjs.map +0 -1
  486. package/dist/chunk-DTTKJ3VC.mjs +0 -9
  487. package/dist/chunk-DTTKJ3VC.mjs.map +0 -1
  488. package/dist/chunk-DVK2N4KC.mjs +0 -9
  489. package/dist/chunk-DVK2N4KC.mjs.map +0 -1
  490. package/dist/chunk-DXB7EZUQ.mjs +0 -12
  491. package/dist/chunk-DXB7EZUQ.mjs.map +0 -1
  492. package/dist/chunk-E6C5EZQA.mjs +0 -19
  493. package/dist/chunk-E6C5EZQA.mjs.map +0 -1
  494. package/dist/chunk-E6E4RZLN.mjs +0 -17
  495. package/dist/chunk-E6E4RZLN.mjs.map +0 -1
  496. package/dist/chunk-EHSKB6DF.mjs +0 -26
  497. package/dist/chunk-EHSKB6DF.mjs.map +0 -1
  498. package/dist/chunk-ET33L3MQ.mjs +0 -14
  499. package/dist/chunk-ET33L3MQ.mjs.map +0 -1
  500. package/dist/chunk-EZYYB34V.mjs +0 -17
  501. package/dist/chunk-EZYYB34V.mjs.map +0 -1
  502. package/dist/chunk-F47GLYUU.mjs +0 -1
  503. package/dist/chunk-F47GLYUU.mjs.map +0 -1
  504. package/dist/chunk-FUS75PJ7.mjs +0 -1
  505. package/dist/chunk-FUS75PJ7.mjs.map +0 -1
  506. package/dist/chunk-FVVSE2F2.mjs +0 -12
  507. package/dist/chunk-FVVSE2F2.mjs.map +0 -1
  508. package/dist/chunk-FZZNWXDM.mjs +0 -9
  509. package/dist/chunk-FZZNWXDM.mjs.map +0 -1
  510. package/dist/chunk-G7UQ5PUR.mjs +0 -14
  511. package/dist/chunk-G7UQ5PUR.mjs.map +0 -1
  512. package/dist/chunk-GIWAOOFY.mjs +0 -13
  513. package/dist/chunk-GIWAOOFY.mjs.map +0 -1
  514. package/dist/chunk-GTFDDKZ2.mjs +0 -15
  515. package/dist/chunk-GTFDDKZ2.mjs.map +0 -1
  516. package/dist/chunk-GZGXXIF7.mjs +0 -650
  517. package/dist/chunk-GZGXXIF7.mjs.map +0 -1
  518. package/dist/chunk-HPFDYUGP.mjs +0 -13
  519. package/dist/chunk-HPFDYUGP.mjs.map +0 -1
  520. package/dist/chunk-IEA53J7P.mjs +0 -12
  521. package/dist/chunk-IEA53J7P.mjs.map +0 -1
  522. package/dist/chunk-IFNXROZR.mjs +0 -18
  523. package/dist/chunk-IFNXROZR.mjs.map +0 -1
  524. package/dist/chunk-IJD7FE2Z.mjs +0 -18
  525. package/dist/chunk-IJD7FE2Z.mjs.map +0 -1
  526. package/dist/chunk-IWXZI3QT.mjs +0 -14
  527. package/dist/chunk-IWXZI3QT.mjs.map +0 -1
  528. package/dist/chunk-J5LGTIGS.mjs +0 -10
  529. package/dist/chunk-J5LGTIGS.mjs.map +0 -1
  530. package/dist/chunk-JCRY7ZYS.mjs +0 -22
  531. package/dist/chunk-JCRY7ZYS.mjs.map +0 -1
  532. package/dist/chunk-JPUKH67K.mjs +0 -10
  533. package/dist/chunk-JPUKH67K.mjs.map +0 -1
  534. package/dist/chunk-K5WL54BY.mjs +0 -93
  535. package/dist/chunk-K5WL54BY.mjs.map +0 -1
  536. package/dist/chunk-KIOYQRMQ.mjs +0 -12
  537. package/dist/chunk-KIOYQRMQ.mjs.map +0 -1
  538. package/dist/chunk-L7FQX5MN.mjs +0 -19
  539. package/dist/chunk-L7FQX5MN.mjs.map +0 -1
  540. package/dist/chunk-LJ2C6MVP.mjs +0 -13
  541. package/dist/chunk-LJ2C6MVP.mjs.map +0 -1
  542. package/dist/chunk-LKXCOLNY.mjs +0 -8
  543. package/dist/chunk-LKXCOLNY.mjs.map +0 -1
  544. package/dist/chunk-LPZZIY5Z.mjs +0 -13
  545. package/dist/chunk-LPZZIY5Z.mjs.map +0 -1
  546. package/dist/chunk-LVWX5B43.mjs +0 -12
  547. package/dist/chunk-LVWX5B43.mjs.map +0 -1
  548. package/dist/chunk-M7SBBYV2.mjs +0 -14
  549. package/dist/chunk-M7SBBYV2.mjs.map +0 -1
  550. package/dist/chunk-ME352XO7.mjs +0 -9
  551. package/dist/chunk-ME352XO7.mjs.map +0 -1
  552. package/dist/chunk-MIGAC7F4.mjs +0 -25
  553. package/dist/chunk-MIGAC7F4.mjs.map +0 -1
  554. package/dist/chunk-MJ7LNBI6.mjs +0 -17
  555. package/dist/chunk-MJ7LNBI6.mjs.map +0 -1
  556. package/dist/chunk-ML727RRJ.mjs +0 -13
  557. package/dist/chunk-ML727RRJ.mjs.map +0 -1
  558. package/dist/chunk-MLCL773E.mjs +0 -12
  559. package/dist/chunk-MLCL773E.mjs.map +0 -1
  560. package/dist/chunk-MY4G7R3I.mjs +0 -14
  561. package/dist/chunk-MY4G7R3I.mjs.map +0 -1
  562. package/dist/chunk-N3QYJX4T.mjs +0 -12
  563. package/dist/chunk-N3QYJX4T.mjs.map +0 -1
  564. package/dist/chunk-NFS7RWWE.mjs +0 -16
  565. package/dist/chunk-NFS7RWWE.mjs.map +0 -1
  566. package/dist/chunk-NKLIE2OI.mjs +0 -1
  567. package/dist/chunk-NKLIE2OI.mjs.map +0 -1
  568. package/dist/chunk-NTLX2MPV.mjs +0 -14
  569. package/dist/chunk-NTLX2MPV.mjs.map +0 -1
  570. package/dist/chunk-O6UXZR3U.mjs +0 -10
  571. package/dist/chunk-O6UXZR3U.mjs.map +0 -1
  572. package/dist/chunk-OG2RLT5U.mjs +0 -10
  573. package/dist/chunk-OG2RLT5U.mjs.map +0 -1
  574. package/dist/chunk-OGZMEWPR.mjs +0 -18
  575. package/dist/chunk-OGZMEWPR.mjs.map +0 -1
  576. package/dist/chunk-OLORW442.mjs +0 -18
  577. package/dist/chunk-OLORW442.mjs.map +0 -1
  578. package/dist/chunk-OLX53VEF.mjs +0 -16
  579. package/dist/chunk-OLX53VEF.mjs.map +0 -1
  580. package/dist/chunk-OOKNBU4V.mjs +0 -18
  581. package/dist/chunk-OOKNBU4V.mjs.map +0 -1
  582. package/dist/chunk-OXZCMC5I.mjs +0 -13
  583. package/dist/chunk-OXZCMC5I.mjs.map +0 -1
  584. package/dist/chunk-PJPGJ2O6.mjs +0 -15
  585. package/dist/chunk-PJPGJ2O6.mjs.map +0 -1
  586. package/dist/chunk-PYEYV7BY.mjs +0 -10
  587. package/dist/chunk-PYEYV7BY.mjs.map +0 -1
  588. package/dist/chunk-Q47NGNXT.mjs +0 -21
  589. package/dist/chunk-Q47NGNXT.mjs.map +0 -1
  590. package/dist/chunk-QOJGMVVR.mjs +0 -17
  591. package/dist/chunk-QOJGMVVR.mjs.map +0 -1
  592. package/dist/chunk-QRSJBBFY.mjs +0 -21
  593. package/dist/chunk-QRSJBBFY.mjs.map +0 -1
  594. package/dist/chunk-R6GLTTAB.mjs +0 -9
  595. package/dist/chunk-R6GLTTAB.mjs.map +0 -1
  596. package/dist/chunk-R6QA7PLZ.mjs +0 -13
  597. package/dist/chunk-R6QA7PLZ.mjs.map +0 -1
  598. package/dist/chunk-RTFTLCF3.mjs +0 -14
  599. package/dist/chunk-RTFTLCF3.mjs.map +0 -1
  600. package/dist/chunk-SXFMQQ6F.mjs +0 -9
  601. package/dist/chunk-SXFMQQ6F.mjs.map +0 -1
  602. package/dist/chunk-SYWMYQYJ.mjs +0 -16
  603. package/dist/chunk-SYWMYQYJ.mjs.map +0 -1
  604. package/dist/chunk-U56ZOM7L.mjs +0 -9
  605. package/dist/chunk-U56ZOM7L.mjs.map +0 -1
  606. package/dist/chunk-UY76KTPE.mjs +0 -13
  607. package/dist/chunk-UY76KTPE.mjs.map +0 -1
  608. package/dist/chunk-VH2PV426.mjs +0 -9
  609. package/dist/chunk-VH2PV426.mjs.map +0 -1
  610. package/dist/chunk-VRUTBJYS.mjs +0 -43
  611. package/dist/chunk-VRUTBJYS.mjs.map +0 -1
  612. package/dist/chunk-WMM7TZLG.mjs +0 -9
  613. package/dist/chunk-WMM7TZLG.mjs.map +0 -1
  614. package/dist/chunk-XGQWTHW6.mjs +0 -34
  615. package/dist/chunk-XGQWTHW6.mjs.map +0 -1
  616. package/dist/chunk-XHSIT5DL.mjs +0 -16
  617. package/dist/chunk-XHSIT5DL.mjs.map +0 -1
  618. package/dist/chunk-XI7KRD2C.mjs +0 -13
  619. package/dist/chunk-XI7KRD2C.mjs.map +0 -1
  620. package/dist/chunk-XPSOKBRZ.mjs +0 -12
  621. package/dist/chunk-XPSOKBRZ.mjs.map +0 -1
  622. package/dist/chunk-XT74R35S.mjs +0 -1
  623. package/dist/chunk-XT74R35S.mjs.map +0 -1
  624. package/dist/chunk-YOPFSFTD.mjs +0 -13
  625. package/dist/chunk-YOPFSFTD.mjs.map +0 -1
  626. package/dist/chunk-YXAOYIRV.mjs +0 -1
  627. package/dist/chunk-YXAOYIRV.mjs.map +0 -1
  628. package/dist/chunk-YXD3AQAK.mjs +0 -1
  629. package/dist/chunk-YXD3AQAK.mjs.map +0 -1
  630. package/dist/chunk-Z7HWEOQX.mjs +0 -14
  631. package/dist/chunk-Z7HWEOQX.mjs.map +0 -1
  632. package/dist/chunk-ZA2XI3OV.mjs +0 -1
  633. package/dist/chunk-ZA2XI3OV.mjs.map +0 -1
  634. package/dist/chunk-ZPNX2QDE.mjs +0 -13
  635. package/dist/chunk-ZPNX2QDE.mjs.map +0 -1
  636. package/dist/error/AbortError.js +0 -36
  637. package/dist/error/AbortError.js.map +0 -1
  638. package/dist/error/TimeoutError.js +0 -36
  639. package/dist/error/TimeoutError.js.map +0 -1
  640. package/dist/error/index.d.mts +0 -2
  641. package/dist/error/index.d.ts +0 -2
  642. package/dist/error/index.js +0 -48
  643. package/dist/error/index.js.map +0 -1
  644. package/dist/error/index.mjs +0 -13
  645. package/dist/error/index.mjs.map +0 -1
  646. package/dist/function/after.js +0 -42
  647. package/dist/function/after.js.map +0 -1
  648. package/dist/function/debounce.js +0 -56
  649. package/dist/function/debounce.js.map +0 -1
  650. package/dist/function/negate.js +0 -33
  651. package/dist/function/negate.js.map +0 -1
  652. package/dist/function/noop.js +0 -32
  653. package/dist/function/noop.js.map +0 -1
  654. package/dist/function/once.js +0 -43
  655. package/dist/function/once.js.map +0 -1
  656. package/dist/function/throttle.js +0 -41
  657. package/dist/function/throttle.js.map +0 -1
  658. package/dist/math/clamp.js +0 -36
  659. package/dist/math/clamp.js.map +0 -1
  660. package/dist/math/inRange.js +0 -40
  661. package/dist/math/inRange.js.map +0 -1
  662. package/dist/math/mean.js +0 -44
  663. package/dist/math/mean.js.map +0 -1
  664. package/dist/math/meanBy.js +0 -50
  665. package/dist/math/meanBy.js.map +0 -1
  666. package/dist/math/random.js +0 -40
  667. package/dist/math/random.js.map +0 -1
  668. package/dist/math/randomInt.js +0 -47
  669. package/dist/math/randomInt.js.map +0 -1
  670. package/dist/math/range.js +0 -48
  671. package/dist/math/range.js.map +0 -1
  672. package/dist/math/round.js +0 -37
  673. package/dist/math/round.js.map +0 -1
  674. package/dist/math/sum.js +0 -37
  675. package/dist/math/sum.js.map +0 -1
  676. package/dist/math/sumBy.js +0 -45
  677. package/dist/math/sumBy.js.map +0 -1
  678. package/dist/object/clone.js +0 -67
  679. package/dist/object/clone.js.map +0 -1
  680. package/dist/object/cloneDeep.js +0 -117
  681. package/dist/object/cloneDeep.js.map +0 -1
  682. package/dist/object/flattenObject.js +0 -77
  683. package/dist/object/flattenObject.js.map +0 -1
  684. package/dist/object/invert.js +0 -40
  685. package/dist/object/invert.js.map +0 -1
  686. package/dist/object/omit.js +0 -37
  687. package/dist/object/omit.js.map +0 -1
  688. package/dist/object/omitBy.js +0 -40
  689. package/dist/object/omitBy.js.map +0 -1
  690. package/dist/object/pick.js +0 -37
  691. package/dist/object/pick.js.map +0 -1
  692. package/dist/object/pickBy.js +0 -40
  693. package/dist/object/pickBy.js.map +0 -1
  694. package/dist/predicate/isArrayLike.js +0 -40
  695. package/dist/predicate/isArrayLike.js.map +0 -1
  696. package/dist/predicate/isEqual.js +0 -73
  697. package/dist/predicate/isEqual.js.map +0 -1
  698. package/dist/predicate/isFunction.js +0 -33
  699. package/dist/predicate/isFunction.js.map +0 -1
  700. package/dist/predicate/isLength.js +0 -33
  701. package/dist/predicate/isLength.js.map +0 -1
  702. package/dist/predicate/isNil.js +0 -33
  703. package/dist/predicate/isNil.js.map +0 -1
  704. package/dist/predicate/isNotNil.js +0 -33
  705. package/dist/predicate/isNotNil.js.map +0 -1
  706. package/dist/predicate/isNull.js +0 -33
  707. package/dist/predicate/isNull.js.map +0 -1
  708. package/dist/predicate/isPlainObject.js +0 -49
  709. package/dist/predicate/isPlainObject.js.map +0 -1
  710. package/dist/predicate/isPrimitive.js +0 -33
  711. package/dist/predicate/isPrimitive.js.map +0 -1
  712. package/dist/predicate/isTypedArray.js +0 -33
  713. package/dist/predicate/isTypedArray.js.map +0 -1
  714. package/dist/predicate/isUndefined.js +0 -33
  715. package/dist/predicate/isUndefined.js.map +0 -1
  716. package/dist/promise/delay.js +0 -56
  717. package/dist/promise/delay.js.map +0 -1
  718. package/dist/promise/timeout.d.mts +0 -10
  719. package/dist/promise/timeout.d.ts +0 -10
  720. package/dist/promise/timeout.js +0 -70
  721. package/dist/promise/timeout.js.map +0 -1
  722. package/dist/promise/withTimeout.js +0 -75
  723. package/dist/promise/withTimeout.js.map +0 -1
  724. package/dist/string/camelCase.js +0 -51
  725. package/dist/string/camelCase.js.map +0 -1
  726. package/dist/string/capitalize.js +0 -33
  727. package/dist/string/capitalize.js.map +0 -1
  728. package/dist/string/kebabCase.js +0 -42
  729. package/dist/string/kebabCase.js.map +0 -1
  730. package/dist/string/lowerCase.js +0 -42
  731. package/dist/string/lowerCase.js.map +0 -1
  732. package/dist/string/snakeCase.js +0 -42
  733. package/dist/string/snakeCase.js.map +0 -1
  734. package/dist/string/startCase.js +0 -53
  735. package/dist/string/startCase.js.map +0 -1
@@ -1,211 +1,52 @@
1
- import "../chunk-DDH7K4QM.mjs";
2
- import {
3
- zipWith
4
- } from "../chunk-MJ7LNBI6.mjs";
5
- import {
6
- unzip
7
- } from "../chunk-JCRY7ZYS.mjs";
8
- import {
9
- unzipWith
10
- } from "../chunk-IFNXROZR.mjs";
11
- import {
12
- without
13
- } from "../chunk-PYEYV7BY.mjs";
14
- import {
15
- xor
16
- } from "../chunk-L7FQX5MN.mjs";
17
- import {
18
- xorBy
19
- } from "../chunk-Q47NGNXT.mjs";
20
- import {
21
- xorWith
22
- } from "../chunk-QRSJBBFY.mjs";
23
- import {
24
- zip
25
- } from "../chunk-OLORW442.mjs";
26
- import {
27
- zipObject
28
- } from "../chunk-BGWHVWY4.mjs";
29
- import {
30
- takeWhile
31
- } from "../chunk-2IXFGSUA.mjs";
32
- import {
33
- toFilled
34
- } from "../chunk-XHSIT5DL.mjs";
35
- import {
36
- union
37
- } from "../chunk-R6QA7PLZ.mjs";
38
- import {
39
- unionBy
40
- } from "../chunk-NFS7RWWE.mjs";
41
- import {
42
- unionWith
43
- } from "../chunk-2ZCITDMK.mjs";
44
- import {
45
- uniq
46
- } from "../chunk-DVK2N4KC.mjs";
47
- import {
48
- uniqBy
49
- } from "../chunk-B4COTK4K.mjs";
50
- import {
51
- uniqWith
52
- } from "../chunk-237HGSZS.mjs";
53
- import {
54
- partition
55
- } from "../chunk-DN3NOZ3H.mjs";
56
- import {
57
- sample
58
- } from "../chunk-2KNLZB7V.mjs";
59
- import {
60
- sampleSize
61
- } from "../chunk-EHSKB6DF.mjs";
62
- import "../chunk-GIWAOOFY.mjs";
63
- import "../chunk-SYWMYQYJ.mjs";
64
- import {
65
- shuffle
66
- } from "../chunk-G7UQ5PUR.mjs";
67
- import {
68
- tail
69
- } from "../chunk-DLS7UJKJ.mjs";
70
- import {
71
- take
72
- } from "../chunk-ME352XO7.mjs";
73
- import {
74
- takeRight
75
- } from "../chunk-N3QYJX4T.mjs";
76
- import {
77
- takeRightWhile
78
- } from "../chunk-NTLX2MPV.mjs";
79
- import {
80
- intersection
81
- } from "../chunk-FVVSE2F2.mjs";
82
- import {
83
- intersectionBy
84
- } from "../chunk-O6UXZR3U.mjs";
85
- import {
86
- intersectionWith
87
- } from "../chunk-XI7KRD2C.mjs";
88
- import {
89
- keyBy
90
- } from "../chunk-AJKZMN2V.mjs";
91
- import {
92
- last
93
- } from "../chunk-DTTKJ3VC.mjs";
94
- import {
95
- maxBy
96
- } from "../chunk-OOKNBU4V.mjs";
97
- import {
98
- minBy
99
- } from "../chunk-IJD7FE2Z.mjs";
100
- import {
101
- orderBy
102
- } from "../chunk-7B7W36UP.mjs";
103
- import {
104
- flatMap
105
- } from "../chunk-UY76KTPE.mjs";
106
- import {
107
- flattenDeep
108
- } from "../chunk-ML727RRJ.mjs";
109
- import {
110
- flatten
111
- } from "../chunk-33MSBDC6.mjs";
112
- import {
113
- forEachRight
114
- } from "../chunk-IEA53J7P.mjs";
115
- import {
116
- groupBy
117
- } from "../chunk-E6E4RZLN.mjs";
118
- import {
119
- head
120
- } from "../chunk-FZZNWXDM.mjs";
121
- import {
122
- initial
123
- } from "../chunk-XPSOKBRZ.mjs";
124
- import {
125
- difference
126
- } from "../chunk-JPUKH67K.mjs";
127
- import {
128
- differenceBy
129
- } from "../chunk-LVWX5B43.mjs";
130
- import {
131
- differenceWith
132
- } from "../chunk-6NVQAHXP.mjs";
133
- import {
134
- drop
135
- } from "../chunk-3EZAFZG3.mjs";
136
- import {
137
- dropRight
138
- } from "../chunk-OXZCMC5I.mjs";
139
- import {
140
- dropRightWhile
141
- } from "../chunk-M7SBBYV2.mjs";
142
- import {
143
- dropWhile
144
- } from "../chunk-LJ2C6MVP.mjs";
145
- import {
146
- fill
147
- } from "../chunk-GTFDDKZ2.mjs";
148
- import {
149
- chunk
150
- } from "../chunk-E6C5EZQA.mjs";
151
- import {
152
- compact
153
- } from "../chunk-PJPGJ2O6.mjs";
154
- import {
155
- countBy
156
- } from "../chunk-Z7HWEOQX.mjs";
157
- import "../chunk-J5LGTIGS.mjs";
158
- export {
159
- chunk,
160
- compact,
161
- countBy,
162
- difference,
163
- differenceBy,
164
- differenceWith,
165
- drop,
166
- dropRight,
167
- dropRightWhile,
168
- dropWhile,
169
- fill,
170
- flatMap,
171
- flatten,
172
- flattenDeep,
173
- forEachRight,
174
- groupBy,
175
- head,
176
- initial,
177
- intersection,
178
- intersectionBy,
179
- intersectionWith,
180
- keyBy,
181
- last,
182
- maxBy,
183
- minBy,
184
- orderBy,
185
- partition,
186
- sample,
187
- sampleSize,
188
- shuffle,
189
- tail,
190
- take,
191
- takeRight,
192
- takeRightWhile,
193
- takeWhile,
194
- toFilled,
195
- union,
196
- unionBy,
197
- unionWith,
198
- uniq,
199
- uniqBy,
200
- uniqWith,
201
- unzip,
202
- unzipWith,
203
- without,
204
- xor,
205
- xorBy,
206
- xorWith,
207
- zip,
208
- zipObject,
209
- zipWith
210
- };
211
- //# sourceMappingURL=index.mjs.map
1
+ export { chunk } from './chunk.mjs';
2
+ export { compact } from './compact.mjs';
3
+ export { countBy } from './countBy.mjs';
4
+ export { difference } from './difference.mjs';
5
+ export { differenceBy } from './differenceBy.mjs';
6
+ export { differenceWith } from './differenceWith.mjs';
7
+ export { drop } from './drop.mjs';
8
+ export { dropRight } from './dropRight.mjs';
9
+ export { dropRightWhile } from './dropRightWhile.mjs';
10
+ export { dropWhile } from './dropWhile.mjs';
11
+ export { fill } from './fill.mjs';
12
+ export { flatMap } from './flatMap.mjs';
13
+ export { flatten } from './flatten.mjs';
14
+ export { flattenDeep } from './flattenDeep.mjs';
15
+ export { forEachRight } from './forEachRight.mjs';
16
+ export { groupBy } from './groupBy.mjs';
17
+ export { intersection } from './intersection.mjs';
18
+ export { intersectionBy } from './intersectionBy.mjs';
19
+ export { intersectionWith } from './intersectionWith.mjs';
20
+ export { keyBy } from './keyBy.mjs';
21
+ export { maxBy } from './maxBy.mjs';
22
+ export { minBy } from './minBy.mjs';
23
+ export { orderBy } from './orderBy.mjs';
24
+ export { partition } from './partition.mjs';
25
+ export { sample } from './sample.mjs';
26
+ export { sampleSize } from './sampleSize.mjs';
27
+ export { shuffle } from './shuffle.mjs';
28
+ export { take } from './take.mjs';
29
+ export { takeRight } from './takeRight.mjs';
30
+ export { takeRightWhile } from './takeRightWhile.mjs';
31
+ export { takeWhile } from './takeWhile.mjs';
32
+ export { union } from './union.mjs';
33
+ export { unionBy } from './unionBy.mjs';
34
+ export { unionWith } from './unionWith.mjs';
35
+ export { uniq } from './uniq.mjs';
36
+ export { uniqBy } from './uniqBy.mjs';
37
+ export { uniqWith } from './uniqWith.mjs';
38
+ export { unzip } from './unzip.mjs';
39
+ export { unzipWith } from './unzipWith.mjs';
40
+ export { xor } from './xor.mjs';
41
+ export { xorBy } from './xorBy.mjs';
42
+ export { xorWith } from './xorWith.mjs';
43
+ export { zip } from './zip.mjs';
44
+ export { zipObject } from './zipObject.mjs';
45
+ export { zipWith } from './zipWith.mjs';
46
+ export { without } from './without.mjs';
47
+ export { head } from './head.mjs';
48
+ export { tail } from './tail.mjs';
49
+ export { toFilled } from './toFilled.mjs';
50
+ export { last } from './last.mjs';
51
+ export { initial } from './initial.mjs';
52
+ //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,8 +1,9 @@
1
- import {
2
- initial
3
- } from "../chunk-XPSOKBRZ.mjs";
4
- import "../chunk-J5LGTIGS.mjs";
5
- export {
6
- initial
7
- };
8
- //# sourceMappingURL=initial.mjs.map
1
+ function initial(arr) {
2
+ if (arr.length <= 1) {
3
+ return [];
4
+ }
5
+ return arr.slice(0, -1);
6
+ }
7
+
8
+ export { initial };
9
+ //# sourceMappingURL=initial.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
1
+ {"version":3,"file":"initial.mjs","sources":["../../src/array/initial.ts"],"sourcesContent":["/**\n * Returns a new array containing all elements except the last one from the input array.\n * If the input array is empty or has only one element, the function returns an empty array.\n *\n * @template T The type of elements in the array.\n * @param {T[]} arr - The input array to query.\n * @returns {T[]} A new array containing all but the last element of the input array.\n *\n * @example\n * const arr = [1, 2, 3, 4];\n * const newArr = initial(arr);\n * // newArr will be [1, 2, 3]\n *\n * @example\n * const emptyArr: number[] = [];\n * const newEmptyArr = initial(emptyArr);\n * // newEmptyArr will be []\n *\n * @example\n * const singleElementArr = ['only one'];\n * const newSingleElementArr = initial(singleElementArr);\n * // newSingleElementArr will be []\n */\nexport function initial<T>(arr: T[]): T[] {\n if (arr.length <= 1) {\n return [];\n }\n return arr.slice(0, -1);\n}\n"],"names":[],"mappings":"AAuBM,SAAU,OAAO,CAAI,GAAQ,EAAA;AACjC,IAAA,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,EAAE;AACnB,QAAA,OAAO,EAAE,CAAC;KACX;IACD,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAC1B;;;;"}
@@ -1,8 +1,9 @@
1
- import {
2
- intersection
3
- } from "../chunk-FVVSE2F2.mjs";
4
- import "../chunk-J5LGTIGS.mjs";
5
- export {
6
- intersection
7
- };
8
- //# sourceMappingURL=intersection.mjs.map
1
+ function intersection(firstArr, secondArr) {
2
+ const secondSet = new Set(secondArr);
3
+ return firstArr.filter(item => {
4
+ return secondSet.has(item);
5
+ });
6
+ }
7
+
8
+ export { intersection };
9
+ //# sourceMappingURL=intersection.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
1
+ {"version":3,"file":"intersection.mjs","sources":["../../src/array/intersection.ts"],"sourcesContent":["/**\n * Returns the intersection of two arrays.\n *\n * This function takes two arrays and returns a new array containing the elements that are\n * present in both arrays. It effectively filters out any elements from the first array that\n * are not found in the second array.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} firstArr - The first array to compare.\n * @param {T[]} secondArr - The second array to compare.\n * @returns {T[]} A new array containing the elements that are present in both arrays.\n *\n * @example\n * const array1 = [1, 2, 3, 4, 5];\n * const array2 = [3, 4, 5, 6, 7];\n * const result = intersection(array1, array2);\n * // result will be [3, 4, 5] since these elements are in both arrays.\n */\nexport function intersection<T>(firstArr: readonly T[], secondArr: readonly T[]): T[] {\n const secondSet = new Set(secondArr);\n\n return firstArr.filter(item => {\n return secondSet.has(item);\n });\n}\n"],"names":[],"mappings":"AAkBgB,SAAA,YAAY,CAAI,QAAsB,EAAE,SAAuB,EAAA;AAC7E,IAAA,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,CAAC;AAErC,IAAA,OAAO,QAAQ,CAAC,MAAM,CAAC,IAAI,IAAG;AAC5B,QAAA,OAAO,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAC7B,KAAC,CAAC,CAAC;AACL;;;;"}
@@ -1,8 +1,7 @@
1
- import {
2
- intersectionBy
3
- } from "../chunk-O6UXZR3U.mjs";
4
- import "../chunk-J5LGTIGS.mjs";
5
- export {
6
- intersectionBy
7
- };
8
- //# sourceMappingURL=intersectionBy.mjs.map
1
+ function intersectionBy(firstArr, secondArr, mapper) {
2
+ const mappedSecondSet = new Set(secondArr.map(mapper));
3
+ return firstArr.filter(item => mappedSecondSet.has(mapper(item)));
4
+ }
5
+
6
+ export { intersectionBy };
7
+ //# sourceMappingURL=intersectionBy.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
1
+ {"version":3,"file":"intersectionBy.mjs","sources":["../../src/array/intersectionBy.ts"],"sourcesContent":["/**\n * Returns the intersection of two arrays based on a mapping function.\n *\n * This function takes two arrays and a mapping function. It returns a new array containing\n * the elements from the first array that, when mapped using the provided function, have matching\n * mapped elements in the second array. It effectively filters out any elements from the first array\n * that do not have corresponding mapped values in the second array.\n *\n * @template T - The type of elements in the array.\n * @template U - The type of mapped elements.\n * @param {T[]} firstArr - The first array to compare.\n * @param {T[]} secondArr - The second array to compare.\n * @param {(item: T) => U} mapper - A function to map the elements of both arrays for comparison.\n * @returns {T[]} A new array containing the elements from the first array that have corresponding mapped values in the second array.\n *\n * @example\n * const array1 = [{ id: 1 }, { id: 2 }, { id: 3 }];\n * const array2 = [{ id: 2 }, { id: 4 }];\n * const mapper = item => item.id;\n * const result = intersectionBy(array1, array2, mapper);\n * // result will be [{ id: 2 }] since only this element has a matching id in both arrays.\n */\nexport function intersectionBy<T, U>(firstArr: readonly T[], secondArr: readonly T[], mapper: (item: T) => U): T[] {\n const mappedSecondSet = new Set(secondArr.map(mapper));\n return firstArr.filter(item => mappedSecondSet.has(mapper(item)));\n}\n"],"names":[],"mappings":"SAsBgB,cAAc,CAAO,QAAsB,EAAE,SAAuB,EAAE,MAAsB,EAAA;AAC1G,IAAA,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;AACvD,IAAA,OAAO,QAAQ,CAAC,MAAM,CAAC,IAAI,IAAI,eAAe,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpE;;;;"}
@@ -1,8 +1,10 @@
1
- import {
2
- intersectionWith
3
- } from "../chunk-XI7KRD2C.mjs";
4
- import "../chunk-J5LGTIGS.mjs";
5
- export {
6
- intersectionWith
7
- };
8
- //# sourceMappingURL=intersectionWith.mjs.map
1
+ function intersectionWith(firstArr, secondArr, areItemsEqual) {
2
+ return firstArr.filter(firstItem => {
3
+ return secondArr.some(secondItem => {
4
+ return areItemsEqual(firstItem, secondItem);
5
+ });
6
+ });
7
+ }
8
+
9
+ export { intersectionWith };
10
+ //# sourceMappingURL=intersectionWith.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
1
+ {"version":3,"file":"intersectionWith.mjs","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 * @template T - The type of elements in the array.\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>(\n firstArr: readonly T[],\n secondArr: readonly T[],\n areItemsEqual: (x: T, y: T) => boolean\n): T[] {\n return firstArr.filter(firstItem => {\n return secondArr.some(secondItem => {\n return areItemsEqual(firstItem, secondItem);\n });\n });\n}\n"],"names":[],"mappings":"SAsBgB,gBAAgB,CAC9B,QAAsB,EACtB,SAAuB,EACvB,aAAsC,EAAA;AAEtC,IAAA,OAAO,QAAQ,CAAC,MAAM,CAAC,SAAS,IAAG;AACjC,QAAA,OAAO,SAAS,CAAC,IAAI,CAAC,UAAU,IAAG;AACjC,YAAA,OAAO,aAAa,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;AAC9C,SAAC,CAAC,CAAC;AACL,KAAC,CAAC,CAAC;AACL;;;;"}
@@ -1,8 +1,11 @@
1
- import {
2
- keyBy
3
- } from "../chunk-AJKZMN2V.mjs";
4
- import "../chunk-J5LGTIGS.mjs";
5
- export {
6
- keyBy
7
- };
8
- //# sourceMappingURL=keyBy.mjs.map
1
+ function keyBy(arr, getKeyFromItem) {
2
+ const result = {};
3
+ for (const item of arr) {
4
+ const key = getKeyFromItem(item);
5
+ result[key] = item;
6
+ }
7
+ return result;
8
+ }
9
+
10
+ export { keyBy };
11
+ //# sourceMappingURL=keyBy.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
1
+ {"version":3,"file":"keyBy.mjs","sources":["../../src/array/keyBy.ts"],"sourcesContent":["/**\n * Maps each element of an array based on a provided key-generating function.\n *\n * This function takes an array and a function that generates a key from each element. It returns\n * an object where the keys are the generated keys and the values are the corresponding elements.\n * If there are multiple elements generating the same key, the last element among them is used\n * as the value.\n *\n * @template T - The type of elements in the array.\n * @template K - The type of keys.\n * @param {T[]} arr - The array of elements to be mapped.\n * @param {(item: T) => K} getKeyFromItem - A function that generates a key from an element.\n * @returns {Record<K, T>} An object where keys are mapped to each element of an array.\n *\n * @example\n * const array = [\n * { category: 'fruit', name: 'apple' },\n * { category: 'fruit', name: 'banana' },\n * { category: 'vegetable', name: 'carrot' }\n * ];\n * const result = keyBy(array, item => item.category);\n * // result will be:\n * // {\n * // fruit: { category: 'fruit', name: 'banana' },\n * // vegetable: { category: 'vegetable', name: 'carrot' }\n * // }\n */\nexport function keyBy<T, K extends PropertyKey>(arr: readonly T[], getKeyFromItem: (item: T) => K): Record<K, T> {\n const result = {} as Record<K, T>;\n\n for (const item of arr) {\n const key = getKeyFromItem(item);\n result[key] = item;\n }\n\n return result;\n}\n"],"names":[],"mappings":"AA2BgB,SAAA,KAAK,CAA2B,GAAiB,EAAE,cAA8B,EAAA;IAC/F,MAAM,MAAM,GAAG,EAAkB,CAAC;AAElC,IAAA,KAAK,MAAM,IAAI,IAAI,GAAG,EAAE;AACtB,QAAA,MAAM,GAAG,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;AACjC,QAAA,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;KACpB;AAED,IAAA,OAAO,MAAM,CAAC;AAChB;;;;"}
@@ -1,8 +1,6 @@
1
- import {
2
- last
3
- } from "../chunk-DTTKJ3VC.mjs";
4
- import "../chunk-J5LGTIGS.mjs";
5
- export {
6
- last
7
- };
8
- //# sourceMappingURL=last.mjs.map
1
+ function last(arr) {
2
+ return arr[arr.length - 1];
3
+ }
4
+
5
+ export { last };
6
+ //# sourceMappingURL=last.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
1
+ {"version":3,"file":"last.mjs","sources":["../../src/array/last.ts"],"sourcesContent":["/**\n * Returns the last element of an array.\n *\n * This function takes an array and returns the last element of the array.\n * If the array is empty, the function returns `undefined`.\n *\n * Unlike some implementations, this function is optimized for performance\n * by directly accessing the last index of the array.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} arr - The array from which to get the last element.\n * @returns {T | undefined} The last element of the array, or `undefined` if the array is empty.\n *\n * @example\n * const arr = [1, 2, 3];\n * const lastElement = last(arr);\n * // lastElement will be 3\n *\n * const emptyArr: number[] = [];\n * const noElement = last(emptyArr);\n * // noElement will be undefined\n */\n\nexport function last<T>(arr: readonly [...T[], T]): T;\nexport function last<T>(arr: readonly T[]): T | undefined;\nexport function last<T>(arr: readonly T[]): T | undefined {\n return arr[arr.length - 1];\n}\n"],"names":[],"mappings":"AAyBM,SAAU,IAAI,CAAI,GAAiB,EAAA;IACvC,OAAO,GAAG,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAC7B;;;;"}
@@ -1,8 +1,15 @@
1
- import {
2
- maxBy
3
- } from "../chunk-OOKNBU4V.mjs";
4
- import "../chunk-J5LGTIGS.mjs";
5
- export {
6
- maxBy
7
- };
8
- //# sourceMappingURL=maxBy.mjs.map
1
+ function maxBy(items, getValue) {
2
+ let maxElement = items[0];
3
+ let max = -Infinity;
4
+ for (const element of items) {
5
+ const value = getValue(element);
6
+ if (value > max) {
7
+ max = value;
8
+ maxElement = element;
9
+ }
10
+ }
11
+ return maxElement;
12
+ }
13
+
14
+ export { maxBy };
15
+ //# sourceMappingURL=maxBy.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
1
+ {"version":3,"file":"maxBy.mjs","sources":["../../src/array/maxBy.ts"],"sourcesContent":["/**\n * Finds the element in an array that has the maximum value when applying\n * the `getValue` function to each element.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} items The array of elements to search.\n * @param {(element: T) => number} getValue A function that selects a numeric value from each element.\n * @returns {T} The element with the maximum value as determined by the `getValue` function.\n * @example\n * maxBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // Returns: { a: 3 }\n * maxBy([], x => x.a); // Returns: undefined\n */\nexport function maxBy<T>(items: T[], getValue: (element: T) => number): T {\n let maxElement = items[0];\n let max = -Infinity;\n\n for (const element of items) {\n const value = getValue(element);\n if (value > max) {\n max = value;\n maxElement = element;\n }\n }\n\n return maxElement;\n}\n"],"names":[],"mappings":"AAYgB,SAAA,KAAK,CAAI,KAAU,EAAE,QAAgC,EAAA;AACnE,IAAA,IAAI,UAAU,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;AAC1B,IAAA,IAAI,GAAG,GAAG,CAAC,QAAQ,CAAC;AAEpB,IAAA,KAAK,MAAM,OAAO,IAAI,KAAK,EAAE;AAC3B,QAAA,MAAM,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;AAChC,QAAA,IAAI,KAAK,GAAG,GAAG,EAAE;YACf,GAAG,GAAG,KAAK,CAAC;YACZ,UAAU,GAAG,OAAO,CAAC;SACtB;KACF;AAED,IAAA,OAAO,UAAU,CAAC;AACpB;;;;"}
@@ -1,8 +1,15 @@
1
- import {
2
- minBy
3
- } from "../chunk-IJD7FE2Z.mjs";
4
- import "../chunk-J5LGTIGS.mjs";
5
- export {
6
- minBy
7
- };
8
- //# sourceMappingURL=minBy.mjs.map
1
+ function minBy(items, getValue) {
2
+ let minElement = items[0];
3
+ let min = Infinity;
4
+ for (const element of items) {
5
+ const value = getValue(element);
6
+ if (value < min) {
7
+ min = value;
8
+ minElement = element;
9
+ }
10
+ }
11
+ return minElement;
12
+ }
13
+
14
+ export { minBy };
15
+ //# sourceMappingURL=minBy.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
1
+ {"version":3,"file":"minBy.mjs","sources":["../../src/array/minBy.ts"],"sourcesContent":["/**\n * Finds the element in an array that has the minimum value when applying\n * the `getValue` function to each element.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} items The array of elements to search.\n * @param {(element: T) => number} getValue A function that selects a numeric value from each element.\n * @returns {T} The element with the minimum value as determined by the `getValue` function.\n * @example\n * minBy([{ a: 1 }, { a: 2 }, { a: 3 }], x => x.a); // Returns: { a: 1 }\n * minBy([], x => x.a); // Returns: undefined\n */\nexport function minBy<T>(items: T[], getValue: (element: T) => number): T {\n let minElement = items[0];\n let min = Infinity;\n\n for (const element of items) {\n const value = getValue(element);\n if (value < min) {\n min = value;\n minElement = element;\n }\n }\n\n return minElement;\n}\n"],"names":[],"mappings":"AAYgB,SAAA,KAAK,CAAI,KAAU,EAAE,QAAgC,EAAA;AACnE,IAAA,IAAI,UAAU,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IAC1B,IAAI,GAAG,GAAG,QAAQ,CAAC;AAEnB,IAAA,KAAK,MAAM,OAAO,IAAI,KAAK,EAAE;AAC3B,QAAA,MAAM,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;AAChC,QAAA,IAAI,KAAK,GAAG,GAAG,EAAE;YACf,GAAG,GAAG,KAAK,CAAC;YACZ,UAAU,GAAG,OAAO,CAAC;SACtB;KACF;AAED,IAAA,OAAO,UAAU,CAAC;AACpB;;;;"}
@@ -1,8 +1,26 @@
1
- import {
2
- orderBy
3
- } from "../chunk-7B7W36UP.mjs";
4
- import "../chunk-J5LGTIGS.mjs";
5
- export {
6
- orderBy
7
- };
8
- //# sourceMappingURL=orderBy.mjs.map
1
+ function orderBy(collection, keys, orders) {
2
+ const compareValues = (a, b, order) => {
3
+ if (a < b) {
4
+ return order === 'asc' ? -1 : 1;
5
+ }
6
+ if (a > b) {
7
+ return order === 'asc' ? 1 : -1;
8
+ }
9
+ return 0;
10
+ };
11
+ const effectiveOrders = keys.map((_, index) => orders[index] || orders[orders.length - 1]);
12
+ return collection.slice().sort((a, b) => {
13
+ for (let i = 0; i < keys.length; i++) {
14
+ const key = keys[i];
15
+ const order = effectiveOrders[i];
16
+ const result = compareValues(a[key], b[key], order);
17
+ if (result !== 0) {
18
+ return result;
19
+ }
20
+ }
21
+ return 0;
22
+ });
23
+ }
24
+
25
+ export { orderBy };
26
+ //# sourceMappingURL=orderBy.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
1
+ {"version":3,"file":"orderBy.mjs","sources":["../../src/array/orderBy.ts"],"sourcesContent":["type Order = 'asc' | 'desc';\n\n/**\n * Sorts an array of objects based on multiple properties and their corresponding order directions.\n *\n * This function takes an array of objects, an array of keys to sort by, and an array of order directions.\n * It returns the sorted array, ordering by each key according to its corresponding direction\n * ('asc' for ascending or 'desc' for descending). If values for a key are equal,\n * it moves to the next key to determine the order.\n *\n * @template T - The type of elements in the array.\n * @param {T[]} collection - The array of objects to be sorted.\n * @param {Array<keyof T>} keys - An array of keys (properties) by which to sort.\n * @param {Order[]} orders - An array of order directions ('asc' for ascending or 'desc' for descending).\n * @returns {T[]} - The sorted array.\n *\n * @example\n * // Sort an array of objects by 'user' in ascending order and 'age' in descending order.\n * const users = [\n * { user: 'fred', age: 48 },\n * { user: 'barney', age: 34 },\n * { user: 'fred', age: 40 },\n * { user: 'barney', age: 36 },\n * ];\n * const result = orderBy(users, ['user', 'age'], ['asc', 'desc']);\n * // result will be:\n * // [\n * // { user: 'barney', age: 36 },\n * // { user: 'barney', age: 34 },\n * // { user: 'fred', age: 48 },\n * // { user: 'fred', age: 40 },\n * // ]\n */\nexport function orderBy<T>(collection: T[], keys: Array<keyof T>, orders: Order[]): T[] {\n const compareValues = (a: T[keyof T], b: T[keyof T], order: Order) => {\n if (a < b) {\n return order === 'asc' ? -1 : 1;\n }\n if (a > b) {\n return order === 'asc' ? 1 : -1;\n }\n return 0;\n };\n\n const effectiveOrders = keys.map((_, index) => orders[index] || orders[orders.length - 1]);\n\n return collection.slice().sort((a, b) => {\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n const order = effectiveOrders[i];\n const result = compareValues(a[key], b[key], order);\n if (result !== 0) {\n return result;\n }\n }\n return 0;\n });\n}\n"],"names":[],"mappings":"SAiCgB,OAAO,CAAI,UAAe,EAAE,IAAoB,EAAE,MAAe,EAAA;IAC/E,MAAM,aAAa,GAAG,CAAC,CAAa,EAAE,CAAa,EAAE,KAAY,KAAI;AACnE,QAAA,IAAI,CAAC,GAAG,CAAC,EAAE;AACT,YAAA,OAAO,KAAK,KAAK,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;SACjC;AACD,QAAA,IAAI,CAAC,GAAG,CAAC,EAAE;AACT,YAAA,OAAO,KAAK,KAAK,KAAK,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;SACjC;AACD,QAAA,OAAO,CAAC,CAAC;AACX,KAAC,CAAC;IAEF,MAAM,eAAe,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,KAAK,MAAM,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;AAE3F,IAAA,OAAO,UAAU,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAI;AACtC,QAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AACpC,YAAA,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,YAAA,MAAM,KAAK,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;AACjC,YAAA,MAAM,MAAM,GAAG,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC;AACpD,YAAA,IAAI,MAAM,KAAK,CAAC,EAAE;AAChB,gBAAA,OAAO,MAAM,CAAC;aACf;SACF;AACD,QAAA,OAAO,CAAC,CAAC;AACX,KAAC,CAAC,CAAC;AACL;;;;"}
@@ -1,8 +1,16 @@
1
- import {
2
- partition
3
- } from "../chunk-DN3NOZ3H.mjs";
4
- import "../chunk-J5LGTIGS.mjs";
5
- export {
6
- partition
7
- };
8
- //# sourceMappingURL=partition.mjs.map
1
+ function partition(arr, isInTruthy) {
2
+ const truthy = [];
3
+ const falsy = [];
4
+ for (const item of arr) {
5
+ if (isInTruthy(item)) {
6
+ truthy.push(item);
7
+ }
8
+ else {
9
+ falsy.push(item);
10
+ }
11
+ }
12
+ return [truthy, falsy];
13
+ }
14
+
15
+ export { partition };
16
+ //# sourceMappingURL=partition.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
1
+ {"version":3,"file":"partition.mjs","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 * @template T - The type of elements in the array.\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: readonly 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"],"names":[],"mappings":"AAsBgB,SAAA,SAAS,CAAI,GAAiB,EAAE,UAAiC,EAAA;IAC/E,MAAM,MAAM,GAAQ,EAAE,CAAC;IACvB,MAAM,KAAK,GAAQ,EAAE,CAAC;AAEtB,IAAA,KAAK,MAAM,IAAI,IAAI,GAAG,EAAE;AACtB,QAAA,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE;AACpB,YAAA,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SACnB;aAAM;AACL,YAAA,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SAClB;KACF;AAED,IAAA,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AACzB;;;;"}
@@ -1,8 +1,7 @@
1
- import {
2
- sample
3
- } from "../chunk-2KNLZB7V.mjs";
4
- import "../chunk-J5LGTIGS.mjs";
5
- export {
6
- sample
7
- };
8
- //# sourceMappingURL=sample.mjs.map
1
+ function sample(arr) {
2
+ const randomIndex = Math.floor(Math.random() * arr.length);
3
+ return arr[randomIndex];
4
+ }
5
+
6
+ export { sample };
7
+ //# sourceMappingURL=sample.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
1
+ {"version":3,"file":"sample.mjs","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 * @template T - The type of elements in the array.\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: readonly T[]): T {\n const randomIndex = Math.floor(Math.random() * arr.length);\n return arr[randomIndex];\n}\n"],"names":[],"mappings":"AAcM,SAAU,MAAM,CAAI,GAAiB,EAAA;AACzC,IAAA,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC;AAC3D,IAAA,OAAO,GAAG,CAAC,WAAW,CAAC,CAAC;AAC1B;;;;"}
@@ -1,10 +1,21 @@
1
- import {
2
- sampleSize
3
- } from "../chunk-EHSKB6DF.mjs";
4
- import "../chunk-GIWAOOFY.mjs";
5
- import "../chunk-SYWMYQYJ.mjs";
6
- import "../chunk-J5LGTIGS.mjs";
7
- export {
8
- sampleSize
9
- };
10
- //# sourceMappingURL=sampleSize.mjs.map
1
+ import { randomInt } from '../math/randomInt.mjs';
2
+
3
+ function sampleSize(array, size) {
4
+ if (size > array.length) {
5
+ throw new Error('Size must be less than or equal to the length of array.');
6
+ }
7
+ const result = new Array(size);
8
+ const selected = new Set();
9
+ for (let step = array.length - size, resultIndex = 0; step < array.length; step++, resultIndex++) {
10
+ let index = randomInt(0, step + 1);
11
+ if (selected.has(index)) {
12
+ index = step;
13
+ }
14
+ selected.add(index);
15
+ result[resultIndex] = array[index];
16
+ }
17
+ return result;
18
+ }
19
+
20
+ export { sampleSize };
21
+ //# sourceMappingURL=sampleSize.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
1
+ {"version":3,"file":"sampleSize.mjs","sources":["../../src/array/sampleSize.ts"],"sourcesContent":["import { randomInt } from '../math/randomInt.ts';\n\n/**\n * Returns a sample element array of a specified `size`.\n *\n * This function takes an array and a number, and returns an array containing the sampled elements using Floyd's algorithm.\n *\n * {@link https://www.nowherenearithaca.com/2013/05/robert-floyds-tiny-and-beautiful.html Floyd's algoritm}\n *\n * @template T - The type of elements in the array.\n * @param {T[]} array - The array to sample from.\n * @param {number} size - The size of sample.\n * @returns {T[]} A new array with sample size applied.\n * @throws {Error} Throws an error if `size` is greater than the length of `array`.\n *\n * @example\n * const result = sampleSize([1, 2, 3], 2)\n * // result will be an array containing two of the elements from the array.\n * // [1, 2] or [1, 3] or [2, 3]\n */\nexport function sampleSize<T>(array: readonly T[], size: number): T[] {\n if (size > array.length) {\n throw new Error('Size must be less than or equal to the length of array.');\n }\n\n const result = new Array(size);\n const selected = new Set();\n\n for (let step = array.length - size, resultIndex = 0; step < array.length; step++, resultIndex++) {\n let index = randomInt(0, step + 1);\n\n if (selected.has(index)) {\n index = step;\n }\n\n selected.add(index);\n\n result[resultIndex] = array[index];\n }\n\n return result;\n}\n"],"names":[],"mappings":";;AAoBgB,SAAA,UAAU,CAAI,KAAmB,EAAE,IAAY,EAAA;AAC7D,IAAA,IAAI,IAAI,GAAG,KAAK,CAAC,MAAM,EAAE;AACvB,QAAA,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;KAC5E;AAED,IAAA,MAAM,MAAM,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC;AAC/B,IAAA,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAE,CAAC;IAE3B,KAAK,IAAI,IAAI,GAAG,KAAK,CAAC,MAAM,GAAG,IAAI,EAAE,WAAW,GAAG,CAAC,EAAE,IAAI,GAAG,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,WAAW,EAAE,EAAE;QAChG,IAAI,KAAK,GAAG,SAAS,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC;AAEnC,QAAA,IAAI,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;YACvB,KAAK,GAAG,IAAI,CAAC;SACd;AAED,QAAA,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAEpB,MAAM,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;KACpC;AAED,IAAA,OAAO,MAAM,CAAC;AAChB;;;;"}