@vinicunca/perkakas 1.9.0 → 1.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2572) hide show
  1. package/dist/add-prop.cjs +1 -1
  2. package/dist/add-prop.d.cts +46 -4
  3. package/dist/add-prop.d.cts.map +1 -0
  4. package/dist/add-prop.d.ts +46 -4
  5. package/dist/add-prop.d.ts.map +1 -0
  6. package/dist/add-prop.js +2 -1
  7. package/dist/add-prop.js.map +1 -0
  8. package/dist/add.cjs +1 -1
  9. package/dist/add.d.cts +34 -2
  10. package/dist/add.d.cts.map +1 -0
  11. package/dist/add.d.ts +34 -2
  12. package/dist/add.d.ts.map +1 -0
  13. package/dist/add.js +2 -1
  14. package/dist/add.js.map +1 -0
  15. package/dist/all-pass.cjs +1 -1
  16. package/dist/all-pass.d.cts +37 -2
  17. package/dist/all-pass.d.cts.map +1 -0
  18. package/dist/all-pass.d.ts +37 -2
  19. package/dist/all-pass.d.ts.map +1 -0
  20. package/dist/all-pass.js +2 -1
  21. package/dist/all-pass.js.map +1 -0
  22. package/dist/any-pass.cjs +1 -1
  23. package/dist/any-pass.d.cts +37 -2
  24. package/dist/any-pass.d.cts.map +1 -0
  25. package/dist/any-pass.d.ts +37 -2
  26. package/dist/any-pass.d.ts.map +1 -0
  27. package/dist/any-pass.js +2 -1
  28. package/dist/any-pass.js.map +1 -0
  29. package/dist/array-required-prefix-BFDM7eSS.d.cts +26 -0
  30. package/dist/array-required-prefix-BFDM7eSS.d.cts.map +1 -0
  31. package/dist/array-required-prefix-DwpaLy0D.d.ts +26 -0
  32. package/dist/array-required-prefix-DwpaLy0D.d.ts.map +1 -0
  33. package/dist/binary-search-cutoff-index-CN25H71A.js +2 -0
  34. package/dist/binary-search-cutoff-index-CN25H71A.js.map +1 -0
  35. package/dist/binary-search-cutoff-index-ClkmTCR5.cjs +1 -0
  36. package/dist/bounded-partial-CPc1XU57.d.ts +17 -0
  37. package/dist/bounded-partial-CPc1XU57.d.ts.map +1 -0
  38. package/dist/bounded-partial-CtOsGqxa.d.cts +17 -0
  39. package/dist/bounded-partial-CtOsGqxa.d.cts.map +1 -0
  40. package/dist/capitalize.cjs +1 -0
  41. package/dist/capitalize.d.cts +53 -0
  42. package/dist/capitalize.d.cts.map +1 -0
  43. package/dist/capitalize.d.ts +53 -0
  44. package/dist/capitalize.d.ts.map +1 -0
  45. package/dist/capitalize.js +2 -0
  46. package/dist/capitalize.js.map +1 -0
  47. package/dist/ceil.cjs +1 -1
  48. package/dist/ceil.d.cts +39 -2
  49. package/dist/ceil.d.cts.map +1 -0
  50. package/dist/ceil.d.ts +39 -2
  51. package/dist/ceil.d.ts.map +1 -0
  52. package/dist/ceil.js +2 -1
  53. package/dist/ceil.js.map +1 -0
  54. package/dist/chunk.cjs +1 -1
  55. package/dist/chunk.d.cts +76 -9
  56. package/dist/chunk.d.cts.map +1 -0
  57. package/dist/chunk.d.ts +76 -9
  58. package/dist/chunk.d.ts.map +1 -0
  59. package/dist/chunk.js +2 -1
  60. package/dist/chunk.js.map +1 -0
  61. package/dist/clamp.cjs +1 -1
  62. package/dist/clamp.d.cts +37 -2
  63. package/dist/clamp.d.cts.map +1 -0
  64. package/dist/clamp.d.ts +37 -2
  65. package/dist/clamp.d.ts.map +1 -0
  66. package/dist/clamp.js +2 -1
  67. package/dist/clamp.js.map +1 -0
  68. package/dist/clamped-integer-subtract-C-AIuFhk.d.ts +11 -0
  69. package/dist/clamped-integer-subtract-C-AIuFhk.d.ts.map +1 -0
  70. package/dist/clamped-integer-subtract-DueGS_u_.d.cts +11 -0
  71. package/dist/clamped-integer-subtract-DueGS_u_.d.cts.map +1 -0
  72. package/dist/clone.cjs +1 -1
  73. package/dist/clone.d.cts +35 -2
  74. package/dist/clone.d.cts.map +1 -0
  75. package/dist/clone.d.ts +35 -2
  76. package/dist/clone.d.ts.map +1 -0
  77. package/dist/clone.js +2 -1
  78. package/dist/clone.js.map +1 -0
  79. package/dist/coerced-array-BKR9Bvsl.d.cts +17 -0
  80. package/dist/coerced-array-BKR9Bvsl.d.cts.map +1 -0
  81. package/dist/coerced-array-BfTLxqLo.d.ts +17 -0
  82. package/dist/coerced-array-BfTLxqLo.d.ts.map +1 -0
  83. package/dist/concat.cjs +1 -1
  84. package/dist/concat.d.cts +41 -3
  85. package/dist/concat.d.cts.map +1 -0
  86. package/dist/concat.d.ts +41 -3
  87. package/dist/concat.d.ts.map +1 -0
  88. package/dist/concat.js +2 -1
  89. package/dist/concat.js.map +1 -0
  90. package/dist/conditional-6ff4g8Sy.cjs +1 -0
  91. package/dist/conditional-Br0uqqc9.d.cts +221 -0
  92. package/dist/conditional-Br0uqqc9.d.cts.map +1 -0
  93. package/dist/conditional-CDez6uXp.d.ts +221 -0
  94. package/dist/conditional-CDez6uXp.d.ts.map +1 -0
  95. package/dist/conditional-WbmvQs8H.js +2 -0
  96. package/dist/conditional-WbmvQs8H.js.map +1 -0
  97. package/dist/conditional.cjs +1 -1
  98. package/dist/conditional.d.cts +1 -1
  99. package/dist/conditional.d.ts +1 -1
  100. package/dist/conditional.js +1 -1
  101. package/dist/constant.cjs +1 -1
  102. package/dist/constant.d.cts +32 -2
  103. package/dist/constant.d.cts.map +1 -0
  104. package/dist/constant.d.ts +32 -2
  105. package/dist/constant.d.ts.map +1 -0
  106. package/dist/constant.js +2 -1
  107. package/dist/constant.js.map +1 -0
  108. package/dist/count-by.cjs +1 -1
  109. package/dist/count-by.d.cts +42 -4
  110. package/dist/count-by.d.cts.map +1 -0
  111. package/dist/count-by.d.ts +42 -4
  112. package/dist/count-by.d.ts.map +1 -0
  113. package/dist/count-by.js +2 -1
  114. package/dist/count-by.js.map +1 -0
  115. package/dist/curry-BsY0Z8jH.cjs +1 -0
  116. package/dist/curry-CKDQ1osk.d.ts +70 -0
  117. package/dist/curry-CKDQ1osk.d.ts.map +1 -0
  118. package/dist/curry-NmniqyJ0.js +2 -0
  119. package/dist/curry-NmniqyJ0.js.map +1 -0
  120. package/dist/curry-from-lazy-BCGvmhyS.cjs +1 -0
  121. package/dist/curry-from-lazy-PQ0BbG-7.js +2 -0
  122. package/dist/curry-from-lazy-PQ0BbG-7.js.map +1 -0
  123. package/dist/curry-mh6BKSIA.d.cts +70 -0
  124. package/dist/curry-mh6BKSIA.d.cts.map +1 -0
  125. package/dist/curry-order-rules-BoF09Dq2.d.cts +48 -0
  126. package/dist/curry-order-rules-BoF09Dq2.d.cts.map +1 -0
  127. package/dist/curry-order-rules-ClqHrs8_.cjs +1 -0
  128. package/dist/curry-order-rules-CoO4bk5I.d.ts +48 -0
  129. package/dist/curry-order-rules-CoO4bk5I.d.ts.map +1 -0
  130. package/dist/curry-order-rules-DwrF-_P1.js +2 -0
  131. package/dist/curry-order-rules-DwrF-_P1.js.map +1 -0
  132. package/dist/curry.cjs +1 -1
  133. package/dist/curry.d.cts +1 -1
  134. package/dist/curry.d.ts +1 -1
  135. package/dist/curry.js +1 -1
  136. package/dist/debounce.cjs +1 -1
  137. package/dist/debounce.d.cts +98 -2
  138. package/dist/debounce.d.cts.map +1 -0
  139. package/dist/debounce.d.ts +98 -2
  140. package/dist/debounce.d.ts.map +1 -0
  141. package/dist/debounce.js +2 -1
  142. package/dist/debounce.js.map +1 -0
  143. package/dist/deduped-DdwAYzXs.d.cts +23 -0
  144. package/dist/deduped-DdwAYzXs.d.cts.map +1 -0
  145. package/dist/deduped-RY-1u-ns.d.ts +23 -0
  146. package/dist/deduped-RY-1u-ns.d.ts.map +1 -0
  147. package/dist/difference-with.cjs +1 -1
  148. package/dist/difference-with.d.cts +48 -2
  149. package/dist/difference-with.d.cts.map +1 -0
  150. package/dist/difference-with.d.ts +48 -2
  151. package/dist/difference-with.d.ts.map +1 -0
  152. package/dist/difference-with.js +2 -1
  153. package/dist/difference-with.js.map +1 -0
  154. package/dist/difference.cjs +1 -1
  155. package/dist/difference.d.cts +37 -2
  156. package/dist/difference.d.cts.map +1 -0
  157. package/dist/difference.d.ts +37 -2
  158. package/dist/difference.d.ts.map +1 -0
  159. package/dist/difference.js +2 -1
  160. package/dist/difference.js.map +1 -0
  161. package/dist/dist-8XtUY3ad.cjs +114 -0
  162. package/dist/dist-Bd1vawFi.js +103 -0
  163. package/dist/dist-Bd1vawFi.js.map +1 -0
  164. package/dist/divide.cjs +1 -1
  165. package/dist/divide.d.cts +33 -2
  166. package/dist/divide.d.cts.map +1 -0
  167. package/dist/divide.d.ts +33 -2
  168. package/dist/divide.d.ts.map +1 -0
  169. package/dist/divide.js +2 -1
  170. package/dist/divide.js.map +1 -0
  171. package/dist/do-nothing.cjs +1 -1
  172. package/dist/do-nothing.d.cts +28 -2
  173. package/dist/do-nothing.d.cts.map +1 -0
  174. package/dist/do-nothing.d.ts +28 -2
  175. package/dist/do-nothing.d.ts.map +1 -0
  176. package/dist/do-nothing.js +2 -1
  177. package/dist/do-nothing.js.map +1 -0
  178. package/dist/drop-first-by.cjs +1 -1
  179. package/dist/drop-first-by.d.cts +41 -4
  180. package/dist/drop-first-by.d.cts.map +1 -0
  181. package/dist/drop-first-by.d.ts +41 -4
  182. package/dist/drop-first-by.d.ts.map +1 -0
  183. package/dist/drop-first-by.js +2 -1
  184. package/dist/drop-first-by.js.map +1 -0
  185. package/dist/drop-last-while.cjs +1 -1
  186. package/dist/drop-last-while.d.cts +36 -3
  187. package/dist/drop-last-while.d.cts.map +1 -0
  188. package/dist/drop-last-while.d.ts +36 -3
  189. package/dist/drop-last-while.d.ts.map +1 -0
  190. package/dist/drop-last-while.js +2 -1
  191. package/dist/drop-last-while.js.map +1 -0
  192. package/dist/drop-last.cjs +1 -1
  193. package/dist/drop-last.d.cts +32 -3
  194. package/dist/drop-last.d.cts.map +1 -0
  195. package/dist/drop-last.d.ts +32 -3
  196. package/dist/drop-last.d.ts.map +1 -0
  197. package/dist/drop-last.js +2 -1
  198. package/dist/drop-last.js.map +1 -0
  199. package/dist/drop-while.cjs +1 -1
  200. package/dist/drop-while.d.cts +36 -3
  201. package/dist/drop-while.d.cts.map +1 -0
  202. package/dist/drop-while.d.ts +36 -3
  203. package/dist/drop-while.d.ts.map +1 -0
  204. package/dist/drop-while.js +2 -1
  205. package/dist/drop-while.js.map +1 -0
  206. package/dist/drop.cjs +1 -1
  207. package/dist/drop.d.cts +40 -8
  208. package/dist/drop.d.cts.map +1 -0
  209. package/dist/drop.d.ts +40 -8
  210. package/dist/drop.d.ts.map +1 -0
  211. package/dist/drop.js +2 -1
  212. package/dist/drop.js.map +1 -0
  213. package/dist/entries.cjs +1 -1
  214. package/dist/entries.d.cts +31 -3
  215. package/dist/entries.d.cts.map +1 -0
  216. package/dist/entries.d.ts +31 -3
  217. package/dist/entries.d.ts.map +1 -0
  218. package/dist/entries.js +2 -1
  219. package/dist/entries.js.map +1 -0
  220. package/dist/enumerable-string-key-of-CZQf3ld_.d.ts +17 -0
  221. package/dist/enumerable-string-key-of-CZQf3ld_.d.ts.map +1 -0
  222. package/dist/enumerable-string-key-of-DhcNc5iz.d.cts +17 -0
  223. package/dist/enumerable-string-key-of-DhcNc5iz.d.cts.map +1 -0
  224. package/dist/enumerable-string-keyed-value-of-CRlVAvdp.d.ts +12 -0
  225. package/dist/enumerable-string-keyed-value-of-CRlVAvdp.d.ts.map +1 -0
  226. package/dist/enumerable-string-keyed-value-of-icm2q60J.d.cts +12 -0
  227. package/dist/enumerable-string-keyed-value-of-icm2q60J.d.cts.map +1 -0
  228. package/dist/evolve.cjs +1 -1
  229. package/dist/evolve.d.cts +101 -3
  230. package/dist/evolve.d.cts.map +1 -0
  231. package/dist/evolve.d.ts +101 -3
  232. package/dist/evolve.d.ts.map +1 -0
  233. package/dist/evolve.js +2 -1
  234. package/dist/evolve.js.map +1 -0
  235. package/dist/filter.cjs +1 -1
  236. package/dist/filter.d.cts +50 -7
  237. package/dist/filter.d.cts.map +1 -0
  238. package/dist/filter.d.ts +50 -7
  239. package/dist/filter.d.ts.map +1 -0
  240. package/dist/filter.js +2 -1
  241. package/dist/filter.js.map +1 -0
  242. package/dist/filtered-array-C--8loav.d.cts +22 -0
  243. package/dist/filtered-array-C--8loav.d.cts.map +1 -0
  244. package/dist/filtered-array-wtIEwdU7.d.ts +22 -0
  245. package/dist/filtered-array-wtIEwdU7.d.ts.map +1 -0
  246. package/dist/find-index.cjs +1 -1
  247. package/dist/find-index.d.cts +50 -2
  248. package/dist/find-index.d.cts.map +1 -0
  249. package/dist/find-index.d.ts +50 -2
  250. package/dist/find-index.d.ts.map +1 -0
  251. package/dist/find-index.js +2 -1
  252. package/dist/find-index.js.map +1 -0
  253. package/dist/find-last-index.cjs +1 -1
  254. package/dist/find-last-index.d.cts +50 -2
  255. package/dist/find-last-index.d.cts.map +1 -0
  256. package/dist/find-last-index.d.ts +50 -2
  257. package/dist/find-last-index.d.ts.map +1 -0
  258. package/dist/find-last-index.js +2 -1
  259. package/dist/find-last-index.js.map +1 -0
  260. package/dist/find-last.cjs +1 -1
  261. package/dist/find-last.d.cts +62 -2
  262. package/dist/find-last.d.cts.map +1 -0
  263. package/dist/find-last.d.ts +62 -2
  264. package/dist/find-last.d.ts.map +1 -0
  265. package/dist/find-last.js +2 -1
  266. package/dist/find-last.js.map +1 -0
  267. package/dist/find.cjs +1 -1
  268. package/dist/find.d.cts +64 -2
  269. package/dist/find.d.cts.map +1 -0
  270. package/dist/find.d.ts +64 -2
  271. package/dist/find.d.ts.map +1 -0
  272. package/dist/find.js +2 -1
  273. package/dist/find.js.map +1 -0
  274. package/dist/first-by.cjs +1 -1
  275. package/dist/first-by.d.cts +60 -5
  276. package/dist/first-by.d.cts.map +1 -0
  277. package/dist/first-by.d.ts +60 -5
  278. package/dist/first-by.d.ts.map +1 -0
  279. package/dist/first-by.js +2 -1
  280. package/dist/first-by.js.map +1 -0
  281. package/dist/first.cjs +1 -1
  282. package/dist/first.d.cts +40 -3
  283. package/dist/first.d.cts.map +1 -0
  284. package/dist/first.d.ts +40 -3
  285. package/dist/first.d.ts.map +1 -0
  286. package/dist/first.js +2 -1
  287. package/dist/first.js.map +1 -0
  288. package/dist/flat-map.cjs +1 -1
  289. package/dist/flat-map.d.cts +47 -2
  290. package/dist/flat-map.d.cts.map +1 -0
  291. package/dist/flat-map.d.ts +47 -2
  292. package/dist/flat-map.d.ts.map +1 -0
  293. package/dist/flat-map.js +2 -1
  294. package/dist/flat-map.js.map +1 -0
  295. package/dist/flat.cjs +1 -1
  296. package/dist/flat.d.cts +53 -3
  297. package/dist/flat.d.cts.map +1 -0
  298. package/dist/flat.d.ts +53 -3
  299. package/dist/flat.d.ts.map +1 -0
  300. package/dist/flat.js +2 -1
  301. package/dist/flat.js.map +1 -0
  302. package/dist/floor.cjs +1 -1
  303. package/dist/floor.d.cts +39 -2
  304. package/dist/floor.d.cts.map +1 -0
  305. package/dist/floor.d.ts +39 -2
  306. package/dist/floor.d.ts.map +1 -0
  307. package/dist/floor.js +2 -1
  308. package/dist/floor.js.map +1 -0
  309. package/dist/for-each-obj.cjs +1 -1
  310. package/dist/for-each-obj.d.cts +47 -5
  311. package/dist/for-each-obj.d.cts.map +1 -0
  312. package/dist/for-each-obj.d.ts +47 -5
  313. package/dist/for-each-obj.d.ts.map +1 -0
  314. package/dist/for-each-obj.js +2 -1
  315. package/dist/for-each-obj.js.map +1 -0
  316. package/dist/for-each.cjs +1 -1
  317. package/dist/for-each.d.cts +54 -3
  318. package/dist/for-each.d.cts.map +1 -0
  319. package/dist/for-each.d.ts +54 -3
  320. package/dist/for-each.d.ts.map +1 -0
  321. package/dist/for-each.js +2 -1
  322. package/dist/for-each.js.map +1 -0
  323. package/dist/from-entries.cjs +1 -1
  324. package/dist/from-entries.d.cts +68 -4
  325. package/dist/from-entries.d.cts.map +1 -0
  326. package/dist/from-entries.d.ts +68 -4
  327. package/dist/from-entries.d.ts.map +1 -0
  328. package/dist/from-entries.js +2 -1
  329. package/dist/from-entries.js.map +1 -0
  330. package/dist/from-keys.cjs +1 -1
  331. package/dist/from-keys.d.cts +60 -5
  332. package/dist/from-keys.d.cts.map +1 -0
  333. package/dist/from-keys.d.ts +60 -5
  334. package/dist/from-keys.d.ts.map +1 -0
  335. package/dist/from-keys.js +2 -1
  336. package/dist/from-keys.js.map +1 -0
  337. package/dist/funnel.cjs +1 -1
  338. package/dist/funnel.d.cts +155 -2
  339. package/dist/funnel.d.cts.map +1 -0
  340. package/dist/funnel.d.ts +155 -2
  341. package/dist/funnel.d.ts.map +1 -0
  342. package/dist/funnel.js +2 -1
  343. package/dist/funnel.js.map +1 -0
  344. package/dist/funnel.lodash-debounce-with-cached-value.test.cjs +1 -1
  345. package/dist/funnel.lodash-debounce-with-cached-value.test.js +1 -1
  346. package/dist/funnel.lodash-debounce-with-cached-value.test.js.map +1 -1
  347. package/dist/funnel.lodash-debounce.test.cjs +1 -1
  348. package/dist/funnel.lodash-debounce.test.js +1 -1
  349. package/dist/funnel.lodash-debounce.test.js.map +1 -1
  350. package/dist/funnel.lodash-throttle-with-cached-value.test.cjs +1 -1
  351. package/dist/funnel.lodash-throttle-with-cached-value.test.js +1 -1
  352. package/dist/funnel.lodash-throttle-with-cached-value.test.js.map +1 -1
  353. package/dist/funnel.lodash-throttle.test.cjs +1 -1
  354. package/dist/funnel.lodash-throttle.test.js +1 -1
  355. package/dist/funnel.lodash-throttle.test.js.map +1 -1
  356. package/dist/funnel.perkakas-debounce.test.cjs +1 -1
  357. package/dist/funnel.perkakas-debounce.test.js +1 -1
  358. package/dist/funnel.perkakas-debounce.test.js.map +1 -1
  359. package/dist/funnel.reference-batch.test.cjs +1 -1
  360. package/dist/funnel.reference-batch.test.js +1 -1
  361. package/dist/funnel.reference-batch.test.js.map +1 -1
  362. package/dist/funnel.test-d.cjs +1 -1
  363. package/dist/funnel.test-d.js +1 -1
  364. package/dist/funnel.test-d.js.map +1 -1
  365. package/dist/funnel.test.cjs +1 -1
  366. package/dist/funnel.test.js +1 -1
  367. package/dist/funnel.test.js.map +1 -1
  368. package/dist/group-by-prop.cjs +1 -1
  369. package/dist/group-by-prop.d.cts +89 -11
  370. package/dist/group-by-prop.d.cts.map +1 -0
  371. package/dist/group-by-prop.d.ts +89 -11
  372. package/dist/group-by-prop.d.ts.map +1 -0
  373. package/dist/group-by-prop.js +2 -1
  374. package/dist/group-by-prop.js.map +1 -0
  375. package/dist/group-by.cjs +1 -1
  376. package/dist/group-by.d.cts +69 -5
  377. package/dist/group-by.d.cts.map +1 -0
  378. package/dist/group-by.d.ts +69 -5
  379. package/dist/group-by.d.ts.map +1 -0
  380. package/dist/group-by.js +2 -1
  381. package/dist/group-by.js.map +1 -0
  382. package/dist/has-at-least-BXwOPLQK.cjs +1 -0
  383. package/dist/has-at-least-Coy9sM-B.js +2 -0
  384. package/dist/has-at-least-Coy9sM-B.js.map +1 -0
  385. package/dist/has-at-least.cjs +1 -1
  386. package/dist/has-at-least.d.cts +59 -8
  387. package/dist/has-at-least.d.cts.map +1 -0
  388. package/dist/has-at-least.d.ts +59 -8
  389. package/dist/has-at-least.d.ts.map +1 -0
  390. package/dist/has-at-least.js +1 -1
  391. package/dist/has-sub-object.cjs +1 -1
  392. package/dist/has-sub-object.d.cts +44 -2
  393. package/dist/has-sub-object.d.cts.map +1 -0
  394. package/dist/has-sub-object.d.ts +44 -2
  395. package/dist/has-sub-object.d.ts.map +1 -0
  396. package/dist/has-sub-object.js +2 -1
  397. package/dist/has-sub-object.js.map +1 -0
  398. package/dist/heap-BhpfhYWj.js +2 -0
  399. package/dist/heap-BhpfhYWj.js.map +1 -0
  400. package/dist/heap-DWDhbxfx.cjs +1 -0
  401. package/dist/human-readable-file-size.cjs +1 -1
  402. package/dist/human-readable-file-size.d.cts +17 -2
  403. package/dist/human-readable-file-size.d.cts.map +1 -0
  404. package/dist/human-readable-file-size.d.ts +17 -2
  405. package/dist/human-readable-file-size.d.ts.map +1 -0
  406. package/dist/human-readable-file-size.js +2 -1
  407. package/dist/human-readable-file-size.js.map +1 -0
  408. package/dist/identity.cjs +1 -1
  409. package/dist/identity.d.cts +22 -2
  410. package/dist/identity.d.cts.map +1 -0
  411. package/dist/identity.d.ts +22 -2
  412. package/dist/identity.d.ts.map +1 -0
  413. package/dist/identity.js +2 -1
  414. package/dist/identity.js.map +1 -0
  415. package/dist/index-by.cjs +1 -1
  416. package/dist/index-by.d.cts +53 -4
  417. package/dist/index-by.d.cts.map +1 -0
  418. package/dist/index-by.d.ts +53 -4
  419. package/dist/index-by.d.ts.map +1 -0
  420. package/dist/index-by.js +2 -1
  421. package/dist/index-by.js.map +1 -0
  422. package/dist/index.cjs +1 -1
  423. package/dist/index.d.cts +158 -185
  424. package/dist/index.d.cts.map +1 -1
  425. package/dist/index.d.ts +158 -185
  426. package/dist/index.d.ts.map +1 -1
  427. package/dist/index.js +1 -1
  428. package/dist/index.js.map +1 -1
  429. package/dist/int-range-inclusive-BlGXX6Cz.d.ts +15 -0
  430. package/dist/int-range-inclusive-BlGXX6Cz.d.ts.map +1 -0
  431. package/dist/int-range-inclusive-KocNpK0p.d.cts +15 -0
  432. package/dist/int-range-inclusive-KocNpK0p.d.cts.map +1 -0
  433. package/dist/intersection-with.cjs +1 -1
  434. package/dist/intersection-with.d.cts +54 -2
  435. package/dist/intersection-with.d.cts.map +1 -0
  436. package/dist/intersection-with.d.ts +54 -2
  437. package/dist/intersection-with.d.ts.map +1 -0
  438. package/dist/intersection-with.js +2 -1
  439. package/dist/intersection-with.js.map +1 -0
  440. package/dist/intersection.cjs +1 -1
  441. package/dist/intersection.d.cts +37 -2
  442. package/dist/intersection.d.cts.map +1 -0
  443. package/dist/intersection.d.ts +37 -2
  444. package/dist/intersection.d.ts.map +1 -0
  445. package/dist/intersection.js +2 -1
  446. package/dist/intersection.js.map +1 -0
  447. package/dist/invert.cjs +1 -1
  448. package/dist/invert.d.cts +33 -3
  449. package/dist/invert.d.cts.map +1 -0
  450. package/dist/invert.d.ts +33 -3
  451. package/dist/invert.d.ts.map +1 -0
  452. package/dist/invert.js +2 -1
  453. package/dist/invert.js.map +1 -0
  454. package/dist/is-array.cjs +1 -1
  455. package/dist/is-array.d.cts +21 -3
  456. package/dist/is-array.d.cts.map +1 -0
  457. package/dist/is-array.d.ts +21 -3
  458. package/dist/is-array.d.ts.map +1 -0
  459. package/dist/is-array.js +2 -1
  460. package/dist/is-array.js.map +1 -0
  461. package/dist/is-big-int.cjs +1 -1
  462. package/dist/is-big-int.d.cts +22 -3
  463. package/dist/is-big-int.d.cts.map +1 -0
  464. package/dist/is-big-int.d.ts +22 -3
  465. package/dist/is-big-int.d.ts.map +1 -0
  466. package/dist/is-big-int.js +2 -1
  467. package/dist/is-big-int.js.map +1 -0
  468. package/dist/is-boolean.cjs +1 -1
  469. package/dist/is-boolean.d.cts +21 -3
  470. package/dist/is-boolean.d.cts.map +1 -0
  471. package/dist/is-boolean.d.ts +21 -3
  472. package/dist/is-boolean.d.ts.map +1 -0
  473. package/dist/is-boolean.js +2 -1
  474. package/dist/is-boolean.js.map +1 -0
  475. package/dist/is-bounded-record-Bx4n8QB0.d.ts +34 -0
  476. package/dist/is-bounded-record-Bx4n8QB0.d.ts.map +1 -0
  477. package/dist/is-bounded-record-DV6ZQk9H.d.cts +34 -0
  478. package/dist/is-bounded-record-DV6ZQk9H.d.cts.map +1 -0
  479. package/dist/is-date.cjs +1 -1
  480. package/dist/is-date.d.cts +17 -2
  481. package/dist/is-date.d.cts.map +1 -0
  482. package/dist/is-date.d.ts +17 -2
  483. package/dist/is-date.d.ts.map +1 -0
  484. package/dist/is-date.js +2 -1
  485. package/dist/is-date.js.map +1 -0
  486. package/dist/is-deep-equal.cjs +1 -1
  487. package/dist/is-deep-equal.d.cts +71 -2
  488. package/dist/is-deep-equal.d.cts.map +1 -0
  489. package/dist/is-deep-equal.d.ts +71 -2
  490. package/dist/is-deep-equal.d.ts.map +1 -0
  491. package/dist/is-deep-equal.js +2 -1
  492. package/dist/is-deep-equal.js.map +1 -0
  493. package/dist/is-defined.cjs +1 -1
  494. package/dist/is-defined.d.cts +19 -2
  495. package/dist/is-defined.d.cts.map +1 -0
  496. package/dist/is-defined.d.ts +19 -2
  497. package/dist/is-defined.d.ts.map +1 -0
  498. package/dist/is-defined.js +2 -1
  499. package/dist/is-defined.js.map +1 -0
  500. package/dist/is-empty.cjs +1 -1
  501. package/dist/is-empty.d.cts +35 -3
  502. package/dist/is-empty.d.cts.map +1 -0
  503. package/dist/is-empty.d.ts +35 -3
  504. package/dist/is-empty.d.ts.map +1 -0
  505. package/dist/is-empty.js +2 -1
  506. package/dist/is-empty.js.map +1 -0
  507. package/dist/is-emptyish-9tX94IVx.d.cts +73 -0
  508. package/dist/is-emptyish-9tX94IVx.d.cts.map +1 -0
  509. package/dist/is-emptyish-DVFGJe-T.d.ts +73 -0
  510. package/dist/is-emptyish-DVFGJe-T.d.ts.map +1 -0
  511. package/dist/is-emptyish.cjs +1 -1
  512. package/dist/is-emptyish.d.cts +1 -5
  513. package/dist/is-emptyish.d.ts +1 -5
  514. package/dist/is-emptyish.js +2 -1
  515. package/dist/is-emptyish.js.map +1 -0
  516. package/dist/is-emptyish.test-d.cjs +1 -1
  517. package/dist/is-emptyish.test-d.d.cts.map +1 -1
  518. package/dist/is-emptyish.test-d.d.ts.map +1 -1
  519. package/dist/is-emptyish.test-d.js +1 -1
  520. package/dist/is-emptyish.test-d.js.map +1 -1
  521. package/dist/is-emptyish.test.cjs +1 -1
  522. package/dist/is-emptyish.test.js +1 -1
  523. package/dist/is-emptyish.test.js.map +1 -1
  524. package/dist/is-error.cjs +1 -1
  525. package/dist/is-error.d.cts +18 -2
  526. package/dist/is-error.d.cts.map +1 -0
  527. package/dist/is-error.d.ts +18 -2
  528. package/dist/is-error.d.ts.map +1 -0
  529. package/dist/is-error.js +2 -1
  530. package/dist/is-error.js.map +1 -0
  531. package/dist/is-function.cjs +1 -1
  532. package/dist/is-function.d.cts +21 -2
  533. package/dist/is-function.d.cts.map +1 -0
  534. package/dist/is-function.d.ts +21 -2
  535. package/dist/is-function.d.ts.map +1 -0
  536. package/dist/is-function.js +2 -1
  537. package/dist/is-function.js.map +1 -0
  538. package/dist/is-included-in.cjs +1 -1
  539. package/dist/is-included-in.d.cts +109 -4
  540. package/dist/is-included-in.d.cts.map +1 -0
  541. package/dist/is-included-in.d.ts +109 -4
  542. package/dist/is-included-in.d.ts.map +1 -0
  543. package/dist/is-included-in.js +2 -1
  544. package/dist/is-included-in.js.map +1 -0
  545. package/dist/is-non-null.cjs +1 -1
  546. package/dist/is-non-null.d.cts +19 -2
  547. package/dist/is-non-null.d.cts.map +1 -0
  548. package/dist/is-non-null.d.ts +19 -2
  549. package/dist/is-non-null.d.ts.map +1 -0
  550. package/dist/is-non-null.js +2 -1
  551. package/dist/is-non-null.js.map +1 -0
  552. package/dist/is-non-nullish.cjs +1 -1
  553. package/dist/is-non-nullish.d.cts +20 -2
  554. package/dist/is-non-nullish.d.cts.map +1 -0
  555. package/dist/is-non-nullish.d.ts +20 -2
  556. package/dist/is-non-nullish.d.ts.map +1 -0
  557. package/dist/is-non-nullish.js +2 -1
  558. package/dist/is-non-nullish.js.map +1 -0
  559. package/dist/is-not.cjs +1 -1
  560. package/dist/is-not.d.cts +19 -2
  561. package/dist/is-not.d.cts.map +1 -0
  562. package/dist/is-not.d.ts +19 -2
  563. package/dist/is-not.d.ts.map +1 -0
  564. package/dist/is-not.js +2 -1
  565. package/dist/is-not.js.map +1 -0
  566. package/dist/is-nullish.cjs +1 -1
  567. package/dist/is-nullish.d.cts +23 -3
  568. package/dist/is-nullish.d.cts.map +1 -0
  569. package/dist/is-nullish.d.ts +23 -3
  570. package/dist/is-nullish.d.ts.map +1 -0
  571. package/dist/is-nullish.js +2 -1
  572. package/dist/is-nullish.js.map +1 -0
  573. package/dist/is-number.cjs +1 -1
  574. package/dist/is-number.d.cts +22 -3
  575. package/dist/is-number.d.cts.map +1 -0
  576. package/dist/is-number.d.ts +22 -3
  577. package/dist/is-number.d.ts.map +1 -0
  578. package/dist/is-number.js +2 -1
  579. package/dist/is-number.js.map +1 -0
  580. package/dist/is-object-type.cjs +1 -1
  581. package/dist/is-object-type.d.cts +35 -3
  582. package/dist/is-object-type.d.cts.map +1 -0
  583. package/dist/is-object-type.d.ts +35 -3
  584. package/dist/is-object-type.d.ts.map +1 -0
  585. package/dist/is-object-type.js +2 -1
  586. package/dist/is-object-type.js.map +1 -0
  587. package/dist/is-plain-object.cjs +1 -1
  588. package/dist/is-plain-object.d.cts +33 -3
  589. package/dist/is-plain-object.d.cts.map +1 -0
  590. package/dist/is-plain-object.d.ts +33 -3
  591. package/dist/is-plain-object.d.ts.map +1 -0
  592. package/dist/is-plain-object.js +2 -1
  593. package/dist/is-plain-object.js.map +1 -0
  594. package/dist/is-promise.cjs +1 -1
  595. package/dist/is-promise.d.cts +18 -2
  596. package/dist/is-promise.d.cts.map +1 -0
  597. package/dist/is-promise.d.ts +18 -2
  598. package/dist/is-promise.d.ts.map +1 -0
  599. package/dist/is-promise.js +2 -1
  600. package/dist/is-promise.js.map +1 -0
  601. package/dist/is-shallow-equal.cjs +1 -1
  602. package/dist/is-shallow-equal.d.cts +71 -2
  603. package/dist/is-shallow-equal.d.cts.map +1 -0
  604. package/dist/is-shallow-equal.d.ts +71 -2
  605. package/dist/is-shallow-equal.d.ts.map +1 -0
  606. package/dist/is-shallow-equal.js +2 -1
  607. package/dist/is-shallow-equal.js.map +1 -0
  608. package/dist/is-strict-equal.cjs +1 -1
  609. package/dist/is-strict-equal.d.cts +67 -2
  610. package/dist/is-strict-equal.d.cts.map +1 -0
  611. package/dist/is-strict-equal.d.ts +67 -2
  612. package/dist/is-strict-equal.d.ts.map +1 -0
  613. package/dist/is-strict-equal.js +2 -1
  614. package/dist/is-strict-equal.js.map +1 -0
  615. package/dist/is-string.cjs +1 -1
  616. package/dist/is-string.d.cts +20 -3
  617. package/dist/is-string.d.cts.map +1 -0
  618. package/dist/is-string.d.ts +20 -3
  619. package/dist/is-string.d.ts.map +1 -0
  620. package/dist/is-string.js +2 -1
  621. package/dist/is-string.js.map +1 -0
  622. package/dist/is-symbol.cjs +1 -1
  623. package/dist/is-symbol.d.cts +20 -3
  624. package/dist/is-symbol.d.cts.map +1 -0
  625. package/dist/is-symbol.d.ts +20 -3
  626. package/dist/is-symbol.d.ts.map +1 -0
  627. package/dist/is-symbol.js +2 -1
  628. package/dist/is-symbol.js.map +1 -0
  629. package/dist/is-truthy.cjs +1 -1
  630. package/dist/is-truthy.d.cts +21 -2
  631. package/dist/is-truthy.d.cts.map +1 -0
  632. package/dist/is-truthy.d.ts +21 -2
  633. package/dist/is-truthy.d.ts.map +1 -0
  634. package/dist/is-truthy.js +2 -1
  635. package/dist/is-truthy.js.map +1 -0
  636. package/dist/iterable-container-1TN3AJ3s.d.cts +17 -0
  637. package/dist/iterable-container-1TN3AJ3s.d.cts.map +1 -0
  638. package/dist/iterable-container-Dv5vSKht.d.ts +17 -0
  639. package/dist/iterable-container-Dv5vSKht.d.ts.map +1 -0
  640. package/dist/join.cjs +1 -1
  641. package/dist/join.d.cts +46 -2
  642. package/dist/join.d.cts.map +1 -0
  643. package/dist/join.d.ts +46 -2
  644. package/dist/join.d.ts.map +1 -0
  645. package/dist/join.js +2 -1
  646. package/dist/join.js.map +1 -0
  647. package/dist/key-codes.cjs +1 -1
  648. package/dist/key-codes.d.cts +29 -2
  649. package/dist/key-codes.d.cts.map +1 -0
  650. package/dist/key-codes.d.ts +29 -2
  651. package/dist/key-codes.d.ts.map +1 -0
  652. package/dist/key-codes.js +2 -1
  653. package/dist/key-codes.js.map +1 -0
  654. package/dist/keys.cjs +1 -1
  655. package/dist/keys.d.cts +38 -5
  656. package/dist/keys.d.cts.map +1 -0
  657. package/dist/keys.d.ts +38 -5
  658. package/dist/keys.d.ts.map +1 -0
  659. package/dist/keys.js +2 -1
  660. package/dist/keys.js.map +1 -0
  661. package/dist/last.cjs +1 -1
  662. package/dist/last.d.cts +37 -3
  663. package/dist/last.d.cts.map +1 -0
  664. package/dist/last.d.ts +37 -3
  665. package/dist/last.d.ts.map +1 -0
  666. package/dist/last.js +2 -1
  667. package/dist/last.js.map +1 -0
  668. package/dist/lazy-data-last-impl-D4kLybyP.cjs +1 -0
  669. package/dist/lazy-data-last-impl-R05wr4K6.js +2 -0
  670. package/dist/lazy-data-last-impl-R05wr4K6.js.map +1 -0
  671. package/dist/length.cjs +1 -1
  672. package/dist/length.d.cts +28 -2
  673. package/dist/length.d.cts.map +1 -0
  674. package/dist/length.d.ts +28 -2
  675. package/dist/length.d.ts.map +1 -0
  676. package/dist/length.js +2 -1
  677. package/dist/length.js.map +1 -0
  678. package/dist/magic-string.es-94aXgwpn.js +15 -0
  679. package/dist/magic-string.es-94aXgwpn.js.map +1 -0
  680. package/dist/magic-string.es-CGYIWauW.cjs +15 -0
  681. package/dist/map-keys.cjs +1 -1
  682. package/dist/map-keys.d.cts +34 -7
  683. package/dist/map-keys.d.cts.map +1 -0
  684. package/dist/map-keys.d.ts +34 -7
  685. package/dist/map-keys.d.ts.map +1 -0
  686. package/dist/map-keys.js +2 -1
  687. package/dist/map-keys.js.map +1 -0
  688. package/dist/map-to-obj.cjs +1 -1
  689. package/dist/map-to-obj.d.cts +68 -2
  690. package/dist/map-to-obj.d.cts.map +1 -0
  691. package/dist/map-to-obj.d.ts +68 -2
  692. package/dist/map-to-obj.d.ts.map +1 -0
  693. package/dist/map-to-obj.js +2 -1
  694. package/dist/map-to-obj.js.map +1 -0
  695. package/dist/map-values.cjs +1 -1
  696. package/dist/map-values.d.cts +42 -5
  697. package/dist/map-values.d.cts.map +1 -0
  698. package/dist/map-values.d.ts +42 -5
  699. package/dist/map-values.d.ts.map +1 -0
  700. package/dist/map-values.js +2 -1
  701. package/dist/map-values.js.map +1 -0
  702. package/dist/map-with-feedback.cjs +1 -1
  703. package/dist/map-with-feedback.d.cts +54 -4
  704. package/dist/map-with-feedback.d.cts.map +1 -0
  705. package/dist/map-with-feedback.d.ts +54 -4
  706. package/dist/map-with-feedback.d.ts.map +1 -0
  707. package/dist/map-with-feedback.js +2 -1
  708. package/dist/map-with-feedback.js.map +1 -0
  709. package/dist/map.cjs +1 -1
  710. package/dist/map.d.cts +47 -4
  711. package/dist/map.d.cts.map +1 -0
  712. package/dist/map.d.ts +47 -4
  713. package/dist/map.d.ts.map +1 -0
  714. package/dist/map.js +2 -1
  715. package/dist/map.js.map +1 -0
  716. package/dist/mapped-BbrC9t3s.d.ts +7 -0
  717. package/dist/mapped-BbrC9t3s.d.ts.map +1 -0
  718. package/dist/mapped-CkRNfTnY.d.cts +7 -0
  719. package/dist/mapped-CkRNfTnY.d.cts.map +1 -0
  720. package/dist/mean-by.cjs +1 -1
  721. package/dist/mean-by.d.cts +35 -2
  722. package/dist/mean-by.d.cts.map +1 -0
  723. package/dist/mean-by.d.ts +35 -2
  724. package/dist/mean-by.d.ts.map +1 -0
  725. package/dist/mean-by.js +2 -1
  726. package/dist/mean-by.js.map +1 -0
  727. package/dist/merge-all-CISawx-J.d.cts +42 -0
  728. package/dist/merge-all-CISawx-J.d.cts.map +1 -0
  729. package/dist/merge-all-DJ6n7R1b.d.ts +42 -0
  730. package/dist/merge-all-DJ6n7R1b.d.ts.map +1 -0
  731. package/dist/merge-all.cjs +1 -1
  732. package/dist/merge-all.d.cts +1 -5
  733. package/dist/merge-all.d.ts +1 -5
  734. package/dist/merge-all.js +2 -1
  735. package/dist/merge-all.js.map +1 -0
  736. package/dist/merge-deep.cjs +1 -1
  737. package/dist/merge-deep.d.cts +37 -2
  738. package/dist/merge-deep.d.cts.map +1 -0
  739. package/dist/merge-deep.d.ts +37 -2
  740. package/dist/merge-deep.d.ts.map +1 -0
  741. package/dist/merge-deep.js +2 -1
  742. package/dist/merge-deep.js.map +1 -0
  743. package/dist/merge.cjs +1 -1
  744. package/dist/merge.d.cts +57 -2
  745. package/dist/merge.d.cts.map +1 -0
  746. package/dist/merge.d.ts +57 -2
  747. package/dist/merge.d.ts.map +1 -0
  748. package/dist/merge.js +2 -1
  749. package/dist/merge.js.map +1 -0
  750. package/dist/multiply.cjs +1 -1
  751. package/dist/multiply.d.cts +33 -2
  752. package/dist/multiply.d.cts.map +1 -0
  753. package/dist/multiply.d.ts +33 -2
  754. package/dist/multiply.d.ts.map +1 -0
  755. package/dist/multiply.js +2 -1
  756. package/dist/multiply.js.map +1 -0
  757. package/dist/n-tuple-BkMobYQ9.d.cts +12 -0
  758. package/dist/n-tuple-BkMobYQ9.d.cts.map +1 -0
  759. package/dist/n-tuple-zo5g_mSL.d.ts +12 -0
  760. package/dist/n-tuple-zo5g_mSL.d.ts.map +1 -0
  761. package/dist/narrowed-to-B7tkuY2k.d.ts +15 -0
  762. package/dist/narrowed-to-B7tkuY2k.d.ts.map +1 -0
  763. package/dist/narrowed-to-D_6H-aZW.d.cts +15 -0
  764. package/dist/narrowed-to-D_6H-aZW.d.cts.map +1 -0
  765. package/dist/non-empty-array-DHAKSw6t.d.ts +5 -0
  766. package/dist/non-empty-array-DHAKSw6t.d.ts.map +1 -0
  767. package/dist/non-empty-array-NDjbHRjk.d.cts +5 -0
  768. package/dist/non-empty-array-NDjbHRjk.d.cts.map +1 -0
  769. package/dist/nth-by-Bby4vIbZ.cjs +1 -0
  770. package/dist/nth-by-JP3-Htbo.js +2 -0
  771. package/dist/nth-by-JP3-Htbo.js.map +1 -0
  772. package/dist/nth-by.cjs +1 -1
  773. package/dist/nth-by.d.cts +42 -5
  774. package/dist/nth-by.d.cts.map +1 -0
  775. package/dist/nth-by.d.ts +42 -5
  776. package/dist/nth-by.d.ts.map +1 -0
  777. package/dist/nth-by.js +1 -1
  778. package/dist/obj-of.cjs +1 -1
  779. package/dist/obj-of.d.cts +27 -2
  780. package/dist/obj-of.d.cts.map +1 -0
  781. package/dist/obj-of.d.ts +27 -2
  782. package/dist/obj-of.d.ts.map +1 -0
  783. package/dist/obj-of.js +2 -1
  784. package/dist/obj-of.js.map +1 -0
  785. package/dist/omit-DI8DRDHj.d.ts +71 -0
  786. package/dist/omit-DI8DRDHj.d.ts.map +1 -0
  787. package/dist/omit-DQiCiWAg.d.cts +71 -0
  788. package/dist/omit-DQiCiWAg.d.cts.map +1 -0
  789. package/dist/omit-by.cjs +1 -1
  790. package/dist/omit-by.d.cts +52 -6
  791. package/dist/omit-by.d.cts.map +1 -0
  792. package/dist/omit-by.d.ts +52 -6
  793. package/dist/omit-by.d.ts.map +1 -0
  794. package/dist/omit-by.js +2 -1
  795. package/dist/omit-by.js.map +1 -0
  796. package/dist/omit.cjs +1 -1
  797. package/dist/omit.d.cts +1 -1
  798. package/dist/omit.d.ts +1 -1
  799. package/dist/omit.js +2 -1
  800. package/dist/omit.js.map +1 -0
  801. package/dist/once.cjs +1 -1
  802. package/dist/once.d.cts +17 -2
  803. package/dist/once.d.cts.map +1 -0
  804. package/dist/once.d.ts +17 -2
  805. package/dist/once.d.ts.map +1 -0
  806. package/dist/once.js +2 -1
  807. package/dist/once.js.map +1 -0
  808. package/dist/only.cjs +1 -1
  809. package/dist/only.d.cts +34 -3
  810. package/dist/only.d.cts.map +1 -0
  811. package/dist/only.d.ts +34 -3
  812. package/dist/only.d.ts.map +1 -0
  813. package/dist/only.js +2 -1
  814. package/dist/only.js.map +1 -0
  815. package/dist/optional-options-with-defaults-BFaBSKkF.d.ts +12 -0
  816. package/dist/optional-options-with-defaults-BFaBSKkF.d.ts.map +1 -0
  817. package/dist/optional-options-with-defaults-BZVW8GfC.d.cts +12 -0
  818. package/dist/optional-options-with-defaults-BZVW8GfC.d.cts.map +1 -0
  819. package/dist/partial-array-CQF5oggb.d.cts +12 -0
  820. package/dist/partial-array-CQF5oggb.d.cts.map +1 -0
  821. package/dist/partial-array-DU-2Vkyx.d.ts +12 -0
  822. package/dist/partial-array-DU-2Vkyx.d.ts.map +1 -0
  823. package/dist/partition-by-union-BztEpKVh.d.cts +20 -0
  824. package/dist/partition-by-union-BztEpKVh.d.cts.map +1 -0
  825. package/dist/partition-by-union-DnfiiEMU.d.ts +20 -0
  826. package/dist/partition-by-union-DnfiiEMU.d.ts.map +1 -0
  827. package/dist/partition.cjs +1 -1
  828. package/dist/partition.d.cts +51 -2
  829. package/dist/partition.d.cts.map +1 -0
  830. package/dist/partition.d.ts +51 -2
  831. package/dist/partition.d.ts.map +1 -0
  832. package/dist/partition.js +2 -1
  833. package/dist/partition.js.map +1 -0
  834. package/dist/path-or.cjs +1 -1
  835. package/dist/path-or.d.cts +87 -2
  836. package/dist/path-or.d.cts.map +1 -0
  837. package/dist/path-or.d.ts +87 -2
  838. package/dist/path-or.d.ts.map +1 -0
  839. package/dist/path-or.js +2 -1
  840. package/dist/path-or.js.map +1 -0
  841. package/dist/perkakas-type-error-B9ULNhW0.d.ts +19 -0
  842. package/dist/perkakas-type-error-B9ULNhW0.d.ts.map +1 -0
  843. package/dist/perkakas-type-error-ClCCHBW1.d.cts +19 -0
  844. package/dist/perkakas-type-error-ClCCHBW1.d.cts.map +1 -0
  845. package/dist/pick-by.cjs +1 -1
  846. package/dist/pick-by.d.cts +68 -6
  847. package/dist/pick-by.d.cts.map +1 -0
  848. package/dist/pick-by.d.ts +68 -6
  849. package/dist/pick-by.d.ts.map +1 -0
  850. package/dist/pick-by.js +2 -1
  851. package/dist/pick-by.js.map +1 -0
  852. package/dist/pick.cjs +1 -1
  853. package/dist/pick.d.cts +55 -7
  854. package/dist/pick.d.cts.map +1 -0
  855. package/dist/pick.d.ts +55 -7
  856. package/dist/pick.d.ts.map +1 -0
  857. package/dist/pick.js +2 -1
  858. package/dist/pick.js.map +1 -0
  859. package/dist/pipe-CB7Lufqv.cjs +1 -0
  860. package/dist/pipe-CZKusDA-.js +2 -0
  861. package/dist/pipe-CZKusDA-.js.map +1 -0
  862. package/dist/pipe.cjs +1 -1
  863. package/dist/pipe.d.cts +106 -2
  864. package/dist/pipe.d.cts.map +1 -0
  865. package/dist/pipe.d.ts +106 -2
  866. package/dist/pipe.d.ts.map +1 -0
  867. package/dist/pipe.js +1 -1
  868. package/dist/piped.cjs +1 -1
  869. package/dist/piped.d.cts +31 -2
  870. package/dist/piped.d.cts.map +1 -0
  871. package/dist/piped.d.ts +31 -2
  872. package/dist/piped.d.ts.map +1 -0
  873. package/dist/piped.js +2 -1
  874. package/dist/piped.js.map +1 -0
  875. package/dist/product.cjs +1 -1
  876. package/dist/product.d.cts +52 -3
  877. package/dist/product.d.cts.map +1 -0
  878. package/dist/product.d.ts +52 -3
  879. package/dist/product.d.ts.map +1 -0
  880. package/dist/product.js +2 -1
  881. package/dist/product.js.map +1 -0
  882. package/dist/prop-D-4cFXSd.d.cts +85 -0
  883. package/dist/prop-D-4cFXSd.d.cts.map +1 -0
  884. package/dist/prop-DL-oRBeN.d.ts +85 -0
  885. package/dist/prop-DL-oRBeN.d.ts.map +1 -0
  886. package/dist/prop.cjs +1 -1
  887. package/dist/prop.d.cts +1 -7
  888. package/dist/prop.d.ts +1 -7
  889. package/dist/prop.js +2 -1
  890. package/dist/prop.js.map +1 -0
  891. package/dist/pull-object.cjs +1 -1
  892. package/dist/pull-object.d.cts +70 -5
  893. package/dist/pull-object.d.cts.map +1 -0
  894. package/dist/pull-object.d.ts +70 -5
  895. package/dist/pull-object.d.ts.map +1 -0
  896. package/dist/pull-object.js +2 -1
  897. package/dist/pull-object.js.map +1 -0
  898. package/dist/random-integer.cjs +1 -1
  899. package/dist/random-integer.d.cts +23 -3
  900. package/dist/random-integer.d.cts.map +1 -0
  901. package/dist/random-integer.d.ts +23 -3
  902. package/dist/random-integer.d.ts.map +1 -0
  903. package/dist/random-integer.js +2 -1
  904. package/dist/random-integer.js.map +1 -0
  905. package/dist/random-string.cjs +1 -1
  906. package/dist/random-string.d.cts +29 -2
  907. package/dist/random-string.d.cts.map +1 -0
  908. package/dist/random-string.d.ts +29 -2
  909. package/dist/random-string.d.ts.map +1 -0
  910. package/dist/random-string.js +2 -1
  911. package/dist/random-string.js.map +1 -0
  912. package/dist/range.cjs +1 -1
  913. package/dist/range.d.cts +27 -2
  914. package/dist/range.d.cts.map +1 -0
  915. package/dist/range.d.ts +27 -2
  916. package/dist/range.d.ts.map +1 -0
  917. package/dist/range.js +2 -1
  918. package/dist/range.js.map +1 -0
  919. package/dist/rank-by.cjs +1 -1
  920. package/dist/rank-by.d.cts +45 -4
  921. package/dist/rank-by.d.cts.map +1 -0
  922. package/dist/rank-by.d.ts +45 -4
  923. package/dist/rank-by.d.ts.map +1 -0
  924. package/dist/rank-by.js +2 -1
  925. package/dist/rank-by.js.map +1 -0
  926. package/dist/reduce.cjs +1 -1
  927. package/dist/reduce.d.cts +53 -2
  928. package/dist/reduce.d.cts.map +1 -0
  929. package/dist/reduce.d.ts +53 -2
  930. package/dist/reduce.d.ts.map +1 -0
  931. package/dist/reduce.js +2 -1
  932. package/dist/reduce.js.map +1 -0
  933. package/dist/reordered-array-BWG6tVSK.d.ts +7 -0
  934. package/dist/reordered-array-BWG6tVSK.d.ts.map +1 -0
  935. package/dist/reordered-array-CmReuxDi.d.cts +7 -0
  936. package/dist/reordered-array-CmReuxDi.d.cts.map +1 -0
  937. package/dist/reverse.cjs +1 -1
  938. package/dist/reverse.d.cts +29 -2
  939. package/dist/reverse.d.cts.map +1 -0
  940. package/dist/reverse.d.ts +29 -2
  941. package/dist/reverse.d.ts.map +1 -0
  942. package/dist/reverse.js +2 -1
  943. package/dist/reverse.js.map +1 -0
  944. package/dist/round.cjs +1 -1
  945. package/dist/round.d.cts +39 -2
  946. package/dist/round.d.cts.map +1 -0
  947. package/dist/round.d.ts +39 -2
  948. package/dist/round.d.ts.map +1 -0
  949. package/dist/round.js +2 -1
  950. package/dist/round.js.map +1 -0
  951. package/dist/sample.cjs +1 -1
  952. package/dist/sample.d.cts +69 -8
  953. package/dist/sample.d.cts.map +1 -0
  954. package/dist/sample.d.ts +69 -8
  955. package/dist/sample.d.ts.map +1 -0
  956. package/dist/sample.js +2 -1
  957. package/dist/sample.js.map +1 -0
  958. package/dist/set-path.cjs +1 -1
  959. package/dist/set-path.d.cts +47 -3
  960. package/dist/set-path.d.cts.map +1 -0
  961. package/dist/set-path.d.ts +47 -3
  962. package/dist/set-path.d.ts.map +1 -0
  963. package/dist/set-path.js +2 -1
  964. package/dist/set-path.js.map +1 -0
  965. package/dist/set.cjs +1 -1
  966. package/dist/set.d.cts +40 -4
  967. package/dist/set.d.cts.map +1 -0
  968. package/dist/set.d.ts +40 -4
  969. package/dist/set.d.ts.map +1 -0
  970. package/dist/set.js +2 -1
  971. package/dist/set.js.map +1 -0
  972. package/dist/shuffle.cjs +1 -1
  973. package/dist/shuffle.d.cts +31 -4
  974. package/dist/shuffle.d.cts.map +1 -0
  975. package/dist/shuffle.d.ts +31 -4
  976. package/dist/shuffle.d.ts.map +1 -0
  977. package/dist/shuffle.js +2 -1
  978. package/dist/shuffle.js.map +1 -0
  979. package/dist/sleep.cjs +1 -1
  980. package/dist/sleep.d.cts +16 -2
  981. package/dist/sleep.d.cts.map +1 -0
  982. package/dist/sleep.d.ts +16 -2
  983. package/dist/sleep.d.ts.map +1 -0
  984. package/dist/sleep.js +2 -1
  985. package/dist/sleep.js.map +1 -0
  986. package/dist/slice-string.cjs +1 -1
  987. package/dist/slice-string.d.cts +41 -2
  988. package/dist/slice-string.d.cts.map +1 -0
  989. package/dist/slice-string.d.ts +41 -2
  990. package/dist/slice-string.d.ts.map +1 -0
  991. package/dist/slice-string.js +2 -1
  992. package/dist/slice-string.js.map +1 -0
  993. package/dist/slugify.cjs +1 -1
  994. package/dist/slugify.d.cts +15 -2
  995. package/dist/slugify.d.cts.map +1 -0
  996. package/dist/slugify.d.ts +15 -2
  997. package/dist/slugify.d.ts.map +1 -0
  998. package/dist/slugify.js +2 -1
  999. package/dist/slugify.js.map +1 -0
  1000. package/dist/sort-by.cjs +1 -1
  1001. package/dist/sort-by.d.cts +88 -6
  1002. package/dist/sort-by.d.cts.map +1 -0
  1003. package/dist/sort-by.d.ts +88 -6
  1004. package/dist/sort-by.d.ts.map +1 -0
  1005. package/dist/sort-by.js +2 -1
  1006. package/dist/sort-by.js.map +1 -0
  1007. package/dist/sort.cjs +1 -1
  1008. package/dist/sort.d.cts +39 -4
  1009. package/dist/sort.d.cts.map +1 -0
  1010. package/dist/sort.d.ts +39 -4
  1011. package/dist/sort.d.ts.map +1 -0
  1012. package/dist/sort.js +2 -1
  1013. package/dist/sort.js.map +1 -0
  1014. package/dist/sorted-index-by.cjs +1 -1
  1015. package/dist/sorted-index-by.d.cts +70 -2
  1016. package/dist/sorted-index-by.d.cts.map +1 -0
  1017. package/dist/sorted-index-by.d.ts +70 -2
  1018. package/dist/sorted-index-by.d.ts.map +1 -0
  1019. package/dist/sorted-index-by.js +2 -1
  1020. package/dist/sorted-index-by.js.map +1 -0
  1021. package/dist/sorted-index-with.cjs +1 -1
  1022. package/dist/sorted-index-with.d.cts +72 -2
  1023. package/dist/sorted-index-with.d.cts.map +1 -0
  1024. package/dist/sorted-index-with.d.ts +72 -2
  1025. package/dist/sorted-index-with.d.ts.map +1 -0
  1026. package/dist/sorted-index-with.js +2 -1
  1027. package/dist/sorted-index-with.js.map +1 -0
  1028. package/dist/sorted-index.cjs +1 -1
  1029. package/dist/sorted-index.d.cts +45 -2
  1030. package/dist/sorted-index.d.cts.map +1 -0
  1031. package/dist/sorted-index.d.ts +45 -2
  1032. package/dist/sorted-index.d.ts.map +1 -0
  1033. package/dist/sorted-index.js +2 -1
  1034. package/dist/sorted-index.js.map +1 -0
  1035. package/dist/sorted-last-index-by.cjs +1 -1
  1036. package/dist/sorted-last-index-by.d.cts +72 -2
  1037. package/dist/sorted-last-index-by.d.cts.map +1 -0
  1038. package/dist/sorted-last-index-by.d.ts +72 -2
  1039. package/dist/sorted-last-index-by.d.ts.map +1 -0
  1040. package/dist/sorted-last-index-by.js +2 -1
  1041. package/dist/sorted-last-index-by.js.map +1 -0
  1042. package/dist/sorted-last-index.cjs +1 -1
  1043. package/dist/sorted-last-index.d.cts +45 -2
  1044. package/dist/sorted-last-index.d.cts.map +1 -0
  1045. package/dist/sorted-last-index.d.ts +45 -2
  1046. package/dist/sorted-last-index.d.ts.map +1 -0
  1047. package/dist/sorted-last-index.js +2 -1
  1048. package/dist/sorted-last-index.js.map +1 -0
  1049. package/dist/splice.cjs +1 -1
  1050. package/dist/splice.d.cts +35 -2
  1051. package/dist/splice.d.cts.map +1 -0
  1052. package/dist/splice.d.ts +35 -2
  1053. package/dist/splice.d.ts.map +1 -0
  1054. package/dist/splice.js +2 -1
  1055. package/dist/splice.js.map +1 -0
  1056. package/dist/split-at.cjs +1 -1
  1057. package/dist/split-at.d.cts +31 -2
  1058. package/dist/split-at.d.cts.map +1 -0
  1059. package/dist/split-at.d.ts +31 -2
  1060. package/dist/split-at.d.ts.map +1 -0
  1061. package/dist/split-at.js +2 -1
  1062. package/dist/split-at.js.map +1 -0
  1063. package/dist/split-when.cjs +1 -1
  1064. package/dist/split-when.d.cts +29 -2
  1065. package/dist/split-when.d.cts.map +1 -0
  1066. package/dist/split-when.d.ts +29 -2
  1067. package/dist/split-when.d.ts.map +1 -0
  1068. package/dist/split-when.js +2 -1
  1069. package/dist/split-when.js.map +1 -0
  1070. package/dist/split.cjs +1 -1
  1071. package/dist/split.d.cts +62 -2
  1072. package/dist/split.d.cts.map +1 -0
  1073. package/dist/split.d.ts +62 -2
  1074. package/dist/split.d.ts.map +1 -0
  1075. package/dist/split.js +2 -1
  1076. package/dist/split.js.map +1 -0
  1077. package/dist/strict-function-BBgKFNUw.d.ts +26 -0
  1078. package/dist/strict-function-BBgKFNUw.d.ts.map +1 -0
  1079. package/dist/strict-function-CPTwDgnZ.d.cts +26 -0
  1080. package/dist/strict-function-CPTwDgnZ.d.cts.map +1 -0
  1081. package/dist/string-to-path.cjs +1 -1
  1082. package/dist/string-to-path.d.cts +39 -2
  1083. package/dist/string-to-path.d.cts.map +1 -0
  1084. package/dist/string-to-path.d.ts +39 -2
  1085. package/dist/string-to-path.d.ts.map +1 -0
  1086. package/dist/string-to-path.js +2 -1
  1087. package/dist/string-to-path.js.map +1 -0
  1088. package/dist/subtract.cjs +1 -1
  1089. package/dist/subtract.d.cts +35 -2
  1090. package/dist/subtract.d.cts.map +1 -0
  1091. package/dist/subtract.d.ts +35 -2
  1092. package/dist/subtract.d.ts.map +1 -0
  1093. package/dist/subtract.js +2 -1
  1094. package/dist/subtract.js.map +1 -0
  1095. package/dist/sum-by.cjs +1 -1
  1096. package/dist/sum-by.d.cts +57 -3
  1097. package/dist/sum-by.d.cts.map +1 -0
  1098. package/dist/sum-by.d.ts +57 -3
  1099. package/dist/sum-by.d.ts.map +1 -0
  1100. package/dist/sum-by.js +2 -1
  1101. package/dist/sum-by.js.map +1 -0
  1102. package/dist/sum.cjs +1 -1
  1103. package/dist/sum.d.cts +50 -3
  1104. package/dist/sum.d.cts.map +1 -0
  1105. package/dist/sum.d.ts +50 -3
  1106. package/dist/sum.d.ts.map +1 -0
  1107. package/dist/sum.js +2 -1
  1108. package/dist/sum.js.map +1 -0
  1109. package/dist/swap-in-place-BHkB_mvV.cjs +1 -0
  1110. package/dist/swap-in-place-C_jXKHuD.js +2 -0
  1111. package/dist/swap-in-place-C_jXKHuD.js.map +1 -0
  1112. package/dist/swap-indices.cjs +1 -1
  1113. package/dist/swap-indices.d.cts +61 -3
  1114. package/dist/swap-indices.d.cts.map +1 -0
  1115. package/dist/swap-indices.d.ts +61 -3
  1116. package/dist/swap-indices.d.ts.map +1 -0
  1117. package/dist/swap-indices.js +2 -1
  1118. package/dist/swap-indices.js.map +1 -0
  1119. package/dist/swap-props.cjs +1 -1
  1120. package/dist/swap-props.d.cts +34 -2
  1121. package/dist/swap-props.d.cts.map +1 -0
  1122. package/dist/swap-props.d.ts +34 -2
  1123. package/dist/swap-props.d.ts.map +1 -0
  1124. package/dist/swap-props.js +2 -1
  1125. package/dist/swap-props.js.map +1 -0
  1126. package/dist/take-first-by.cjs +1 -1
  1127. package/dist/take-first-by.d.cts +41 -4
  1128. package/dist/take-first-by.d.cts.map +1 -0
  1129. package/dist/take-first-by.d.ts +41 -4
  1130. package/dist/take-first-by.d.ts.map +1 -0
  1131. package/dist/take-first-by.js +2 -1
  1132. package/dist/take-first-by.js.map +1 -0
  1133. package/dist/take-last-while.cjs +1 -1
  1134. package/dist/take-last-while.d.cts +36 -3
  1135. package/dist/take-last-while.d.cts.map +1 -0
  1136. package/dist/take-last-while.d.ts +36 -3
  1137. package/dist/take-last-while.d.ts.map +1 -0
  1138. package/dist/take-last-while.js +2 -1
  1139. package/dist/take-last-while.js.map +1 -0
  1140. package/dist/take-last.cjs +1 -1
  1141. package/dist/take-last.d.cts +32 -3
  1142. package/dist/take-last.d.cts.map +1 -0
  1143. package/dist/take-last.d.ts +32 -3
  1144. package/dist/take-last.d.ts.map +1 -0
  1145. package/dist/take-last.js +2 -1
  1146. package/dist/take-last.js.map +1 -0
  1147. package/dist/take-while.cjs +1 -1
  1148. package/dist/take-while.d.cts +34 -3
  1149. package/dist/take-while.d.cts.map +1 -0
  1150. package/dist/take-while.d.ts +34 -3
  1151. package/dist/take-while.d.ts.map +1 -0
  1152. package/dist/take-while.js +2 -1
  1153. package/dist/take-while.js.map +1 -0
  1154. package/dist/take.cjs +1 -1
  1155. package/dist/take.d.cts +34 -3
  1156. package/dist/take.d.cts.map +1 -0
  1157. package/dist/take.d.ts +34 -3
  1158. package/dist/take.d.ts.map +1 -0
  1159. package/dist/take.js +2 -1
  1160. package/dist/take.js.map +1 -0
  1161. package/dist/tap.cjs +1 -1
  1162. package/dist/tap.d.cts +42 -2
  1163. package/dist/tap.d.cts.map +1 -0
  1164. package/dist/tap.d.ts +42 -2
  1165. package/dist/tap.d.ts.map +1 -0
  1166. package/dist/tap.js +2 -1
  1167. package/dist/tap.js.map +1 -0
  1168. package/dist/times.cjs +1 -1
  1169. package/dist/times.d.cts +48 -2
  1170. package/dist/times.d.cts.map +1 -0
  1171. package/dist/times.d.ts +48 -2
  1172. package/dist/times.d.ts.map +1 -0
  1173. package/dist/times.js +2 -1
  1174. package/dist/times.js.map +1 -0
  1175. package/dist/to-camel-case.cjs +1 -1
  1176. package/dist/to-camel-case.d.cts +84 -3
  1177. package/dist/to-camel-case.d.cts.map +1 -0
  1178. package/dist/to-camel-case.d.ts +84 -3
  1179. package/dist/to-camel-case.d.ts.map +1 -0
  1180. package/dist/to-camel-case.js +2 -1
  1181. package/dist/to-camel-case.js.map +1 -0
  1182. package/dist/to-kebab-case.cjs +1 -1
  1183. package/dist/to-kebab-case.d.cts +60 -3
  1184. package/dist/to-kebab-case.d.cts.map +1 -0
  1185. package/dist/to-kebab-case.d.ts +60 -3
  1186. package/dist/to-kebab-case.d.ts.map +1 -0
  1187. package/dist/to-kebab-case.js +2 -1
  1188. package/dist/to-kebab-case.js.map +1 -0
  1189. package/dist/to-lower-case.cjs +1 -0
  1190. package/dist/to-lower-case.d.cts +51 -0
  1191. package/dist/to-lower-case.d.cts.map +1 -0
  1192. package/dist/to-lower-case.d.ts +51 -0
  1193. package/dist/to-lower-case.d.ts.map +1 -0
  1194. package/dist/to-lower-case.js +2 -0
  1195. package/dist/to-lower-case.js.map +1 -0
  1196. package/dist/to-single-BKYbBic-.js +2 -0
  1197. package/dist/to-single-BKYbBic-.js.map +1 -0
  1198. package/dist/to-single-Chq_hKEk.cjs +1 -0
  1199. package/dist/to-snake-case.cjs +1 -1
  1200. package/dist/to-snake-case.d.cts +60 -3
  1201. package/dist/to-snake-case.d.cts.map +1 -0
  1202. package/dist/to-snake-case.d.ts +60 -3
  1203. package/dist/to-snake-case.d.ts.map +1 -0
  1204. package/dist/to-snake-case.js +2 -1
  1205. package/dist/to-snake-case.js.map +1 -0
  1206. package/dist/to-string-DkC3zRUJ.d.cts +13 -0
  1207. package/dist/to-string-DkC3zRUJ.d.cts.map +1 -0
  1208. package/dist/to-string-YIFx2KS6.d.ts +13 -0
  1209. package/dist/to-string-YIFx2KS6.d.ts.map +1 -0
  1210. package/dist/to-title-case.cjs +1 -0
  1211. package/dist/to-title-case.d.cts +86 -0
  1212. package/dist/to-title-case.d.cts.map +1 -0
  1213. package/dist/to-title-case.d.ts +86 -0
  1214. package/dist/to-title-case.d.ts.map +1 -0
  1215. package/dist/to-title-case.js +2 -0
  1216. package/dist/to-title-case.js.map +1 -0
  1217. package/dist/to-upper-case.cjs +1 -0
  1218. package/dist/to-upper-case.d.cts +51 -0
  1219. package/dist/to-upper-case.d.cts.map +1 -0
  1220. package/dist/to-upper-case.d.ts +51 -0
  1221. package/dist/to-upper-case.d.ts.map +1 -0
  1222. package/dist/to-upper-case.js +2 -0
  1223. package/dist/to-upper-case.js.map +1 -0
  1224. package/dist/tuple-parts-BYI4o8Vk.d.ts +89 -0
  1225. package/dist/tuple-parts-BYI4o8Vk.d.ts.map +1 -0
  1226. package/dist/tuple-parts-CzQQupgi.d.cts +89 -0
  1227. package/dist/tuple-parts-CzQQupgi.d.cts.map +1 -0
  1228. package/dist/type.helpers.cjs +0 -1
  1229. package/dist/type.helpers.d.cts +5 -2
  1230. package/dist/type.helpers.d.cts.map +1 -0
  1231. package/dist/type.helpers.d.ts +5 -2
  1232. package/dist/type.helpers.d.ts.map +1 -0
  1233. package/dist/type.helpers.js +0 -1
  1234. package/dist/uncapitalize.cjs +1 -0
  1235. package/dist/uncapitalize.d.cts +51 -0
  1236. package/dist/uncapitalize.d.cts.map +1 -0
  1237. package/dist/uncapitalize.d.ts +51 -0
  1238. package/dist/uncapitalize.d.ts.map +1 -0
  1239. package/dist/uncapitalize.js +2 -0
  1240. package/dist/uncapitalize.js.map +1 -0
  1241. package/dist/unique-by.cjs +1 -1
  1242. package/dist/unique-by.d.cts +44 -5
  1243. package/dist/unique-by.d.cts.map +1 -0
  1244. package/dist/unique-by.d.ts +44 -5
  1245. package/dist/unique-by.d.ts.map +1 -0
  1246. package/dist/unique-by.js +2 -1
  1247. package/dist/unique-by.js.map +1 -0
  1248. package/dist/unique-with.cjs +1 -1
  1249. package/dist/unique-with.d.cts +46 -5
  1250. package/dist/unique-with.d.cts.map +1 -0
  1251. package/dist/unique-with.d.ts +46 -5
  1252. package/dist/unique-with.d.ts.map +1 -0
  1253. package/dist/unique-with.js +2 -1
  1254. package/dist/unique-with.js.map +1 -0
  1255. package/dist/unique.cjs +1 -1
  1256. package/dist/unique.d.cts +39 -5
  1257. package/dist/unique.d.cts.map +1 -0
  1258. package/dist/unique.d.ts +39 -5
  1259. package/dist/unique.d.ts.map +1 -0
  1260. package/dist/unique.js +2 -1
  1261. package/dist/unique.js.map +1 -0
  1262. package/dist/upsert-prop-0hwik6JJ.d.cts +8 -0
  1263. package/dist/upsert-prop-0hwik6JJ.d.cts.map +1 -0
  1264. package/dist/upsert-prop-_NpaZwm4.d.ts +8 -0
  1265. package/dist/upsert-prop-_NpaZwm4.d.ts.map +1 -0
  1266. package/dist/utility-evaluators-Boc-TMbq.js +2 -0
  1267. package/dist/utility-evaluators-Boc-TMbq.js.map +1 -0
  1268. package/dist/utility-evaluators-CAbODbuk.cjs +1 -0
  1269. package/dist/values.cjs +1 -1
  1270. package/dist/values.d.cts +38 -4
  1271. package/dist/values.d.cts.map +1 -0
  1272. package/dist/values.d.ts +38 -4
  1273. package/dist/values.d.ts.map +1 -0
  1274. package/dist/values.js +2 -1
  1275. package/dist/values.js.map +1 -0
  1276. package/dist/with-precision-CQ90Walk.js +2 -0
  1277. package/dist/with-precision-CQ90Walk.js.map +1 -0
  1278. package/dist/with-precision-dQAYLrgr.cjs +1 -0
  1279. package/dist/words-DQCM5umD.js +3 -0
  1280. package/dist/words-DQCM5umD.js.map +1 -0
  1281. package/dist/words-DRQKxzLU.cjs +2 -0
  1282. package/dist/zip-with.cjs +1 -1
  1283. package/dist/zip-with.d.cts +50 -3
  1284. package/dist/zip-with.d.cts.map +1 -0
  1285. package/dist/zip-with.d.ts +50 -3
  1286. package/dist/zip-with.d.ts.map +1 -0
  1287. package/dist/zip-with.js +2 -1
  1288. package/dist/zip-with.js.map +1 -0
  1289. package/dist/zip.cjs +1 -1
  1290. package/dist/zip.d.cts +38 -3
  1291. package/dist/zip.d.cts.map +1 -0
  1292. package/dist/zip.d.ts +38 -3
  1293. package/dist/zip.d.ts.map +1 -0
  1294. package/dist/zip.js +2 -1
  1295. package/dist/zip.js.map +1 -0
  1296. package/package.json +10 -14
  1297. package/dist/add-BSDYck57.d.ts +0 -34
  1298. package/dist/add-BSDYck57.d.ts.map +0 -1
  1299. package/dist/add-CbtGbPU8.cjs +0 -1
  1300. package/dist/add-D2WnMolJ.d.cts +0 -34
  1301. package/dist/add-D2WnMolJ.d.cts.map +0 -1
  1302. package/dist/add-XyDHfOBw.js +0 -2
  1303. package/dist/add-XyDHfOBw.js.map +0 -1
  1304. package/dist/add-prop-BxqZdgPd.cjs +0 -1
  1305. package/dist/add-prop-C9l3pJs4.d.ts +0 -46
  1306. package/dist/add-prop-C9l3pJs4.d.ts.map +0 -1
  1307. package/dist/add-prop-CX56m6sR.js +0 -2
  1308. package/dist/add-prop-CX56m6sR.js.map +0 -1
  1309. package/dist/add-prop-tIjpXGRH.d.cts +0 -46
  1310. package/dist/add-prop-tIjpXGRH.d.cts.map +0 -1
  1311. package/dist/all-pass-BCivJ27h.d.cts +0 -37
  1312. package/dist/all-pass-BCivJ27h.d.cts.map +0 -1
  1313. package/dist/all-pass-CbkTeBNa.d.ts +0 -37
  1314. package/dist/all-pass-CbkTeBNa.d.ts.map +0 -1
  1315. package/dist/all-pass-Dm8Dnhq7.cjs +0 -1
  1316. package/dist/all-pass-TOwgGHEo.js +0 -2
  1317. package/dist/all-pass-TOwgGHEo.js.map +0 -1
  1318. package/dist/any-pass-B1tqZ-S8.js +0 -2
  1319. package/dist/any-pass-B1tqZ-S8.js.map +0 -1
  1320. package/dist/any-pass-BHpbzKfX.d.ts +0 -37
  1321. package/dist/any-pass-BHpbzKfX.d.ts.map +0 -1
  1322. package/dist/any-pass-BUlFAsyd.d.cts +0 -37
  1323. package/dist/any-pass-BUlFAsyd.d.cts.map +0 -1
  1324. package/dist/any-pass-UiZWZkzr.cjs +0 -1
  1325. package/dist/array-required-prefix-BHFg-BKr.d.ts +0 -26
  1326. package/dist/array-required-prefix-BHFg-BKr.d.ts.map +0 -1
  1327. package/dist/array-required-prefix-FSH3Acx8.d.cts +0 -26
  1328. package/dist/array-required-prefix-FSH3Acx8.d.cts.map +0 -1
  1329. package/dist/binary-search-cutoff-index-BZF3GL7H.cjs +0 -1
  1330. package/dist/binary-search-cutoff-index-YVs_m4IY.js +0 -2
  1331. package/dist/binary-search-cutoff-index-YVs_m4IY.js.map +0 -1
  1332. package/dist/bounded-partial-A89bt7Kj.d.cts +0 -17
  1333. package/dist/bounded-partial-A89bt7Kj.d.cts.map +0 -1
  1334. package/dist/bounded-partial-DfemQln9.d.ts +0 -17
  1335. package/dist/bounded-partial-DfemQln9.d.ts.map +0 -1
  1336. package/dist/case.transform-BXzx2bAJ.cjs +0 -1
  1337. package/dist/case.transform-DJYiGJG0.js +0 -2
  1338. package/dist/case.transform-DJYiGJG0.js.map +0 -1
  1339. package/dist/case.types-D-4qwVN-.d.cts +0 -19
  1340. package/dist/case.types-D-4qwVN-.d.cts.map +0 -1
  1341. package/dist/case.types-D5NB5m6p.d.ts +0 -19
  1342. package/dist/case.types-D5NB5m6p.d.ts.map +0 -1
  1343. package/dist/ceil--cMT2iUp.js +0 -2
  1344. package/dist/ceil--cMT2iUp.js.map +0 -1
  1345. package/dist/ceil-BfPd1zim.d.cts +0 -39
  1346. package/dist/ceil-BfPd1zim.d.cts.map +0 -1
  1347. package/dist/ceil-CgjlA1iG.cjs +0 -1
  1348. package/dist/ceil-t6jtFzmr.d.ts +0 -39
  1349. package/dist/ceil-t6jtFzmr.d.ts.map +0 -1
  1350. package/dist/chunk-C__yw06N.d.cts +0 -76
  1351. package/dist/chunk-C__yw06N.d.cts.map +0 -1
  1352. package/dist/chunk-Hsv7c06B.d.ts +0 -76
  1353. package/dist/chunk-Hsv7c06B.d.ts.map +0 -1
  1354. package/dist/chunk-_kldYmb1.cjs +0 -1
  1355. package/dist/chunk-dIPp871Q.js +0 -2
  1356. package/dist/chunk-dIPp871Q.js.map +0 -1
  1357. package/dist/clamp-Cnh0Qg03.cjs +0 -1
  1358. package/dist/clamp-DMX7Ua7I.d.cts +0 -37
  1359. package/dist/clamp-DMX7Ua7I.d.cts.map +0 -1
  1360. package/dist/clamp-D_5sgYkv.d.ts +0 -37
  1361. package/dist/clamp-D_5sgYkv.d.ts.map +0 -1
  1362. package/dist/clamp-zR5XX002.js +0 -2
  1363. package/dist/clamp-zR5XX002.js.map +0 -1
  1364. package/dist/clamped-integer-subtract-DId0tRjp.d.cts +0 -11
  1365. package/dist/clamped-integer-subtract-DId0tRjp.d.cts.map +0 -1
  1366. package/dist/clamped-integer-subtract-Dh3vTnRH.d.ts +0 -11
  1367. package/dist/clamped-integer-subtract-Dh3vTnRH.d.ts.map +0 -1
  1368. package/dist/clone-1QjPrzdD.d.cts +0 -35
  1369. package/dist/clone-1QjPrzdD.d.cts.map +0 -1
  1370. package/dist/clone-BcAGB1C1.js +0 -2
  1371. package/dist/clone-BcAGB1C1.js.map +0 -1
  1372. package/dist/clone-CY68Bkn3.d.ts +0 -35
  1373. package/dist/clone-CY68Bkn3.d.ts.map +0 -1
  1374. package/dist/clone-DyRAAJkh.cjs +0 -1
  1375. package/dist/coerced-array-Fezc8pIu.d.ts +0 -17
  1376. package/dist/coerced-array-Fezc8pIu.d.ts.map +0 -1
  1377. package/dist/coerced-array-kVJtBrMl.d.cts +0 -17
  1378. package/dist/coerced-array-kVJtBrMl.d.cts.map +0 -1
  1379. package/dist/concat-BOAliAPo.d.ts +0 -41
  1380. package/dist/concat-BOAliAPo.d.ts.map +0 -1
  1381. package/dist/concat-BdgaaV6q.d.cts +0 -41
  1382. package/dist/concat-BdgaaV6q.d.cts.map +0 -1
  1383. package/dist/concat-CVEXmYnw.js +0 -2
  1384. package/dist/concat-CVEXmYnw.js.map +0 -1
  1385. package/dist/concat-Cg3I4d7x.cjs +0 -1
  1386. package/dist/conditional-81kit9Lg.cjs +0 -1
  1387. package/dist/conditional-BW7TbnuD.d.ts +0 -221
  1388. package/dist/conditional-BW7TbnuD.d.ts.map +0 -1
  1389. package/dist/conditional-BivA0O7M.d.cts +0 -221
  1390. package/dist/conditional-BivA0O7M.d.cts.map +0 -1
  1391. package/dist/conditional-ClGfJoeu.js +0 -2
  1392. package/dist/conditional-ClGfJoeu.js.map +0 -1
  1393. package/dist/constant-BoufjloF.d.ts +0 -32
  1394. package/dist/constant-BoufjloF.d.ts.map +0 -1
  1395. package/dist/constant-BuIJ9GIn.cjs +0 -1
  1396. package/dist/constant-DD3Fj3xH.d.cts +0 -32
  1397. package/dist/constant-DD3Fj3xH.d.cts.map +0 -1
  1398. package/dist/constant-DrpDXHc7.js +0 -2
  1399. package/dist/constant-DrpDXHc7.js.map +0 -1
  1400. package/dist/count-by-CYv2OHvx.d.cts +0 -42
  1401. package/dist/count-by-CYv2OHvx.d.cts.map +0 -1
  1402. package/dist/count-by-DUtzS9CI.cjs +0 -1
  1403. package/dist/count-by-DZwTr8U_.js +0 -2
  1404. package/dist/count-by-DZwTr8U_.js.map +0 -1
  1405. package/dist/count-by-gwHw1EiK.d.ts +0 -42
  1406. package/dist/count-by-gwHw1EiK.d.ts.map +0 -1
  1407. package/dist/curry-2mBj-wsI.d.ts +0 -68
  1408. package/dist/curry-2mBj-wsI.d.ts.map +0 -1
  1409. package/dist/curry-BPVIsvo3.cjs +0 -1
  1410. package/dist/curry-CzZjDrpv.js +0 -2
  1411. package/dist/curry-CzZjDrpv.js.map +0 -1
  1412. package/dist/curry-from-lazy-BDH06qZ-.cjs +0 -1
  1413. package/dist/curry-from-lazy-BR-hoRDR.js +0 -2
  1414. package/dist/curry-from-lazy-BR-hoRDR.js.map +0 -1
  1415. package/dist/curry-gLBYaLmk.d.cts +0 -68
  1416. package/dist/curry-gLBYaLmk.d.cts.map +0 -1
  1417. package/dist/curry-order-rules-1zjlAgqa.d.cts +0 -48
  1418. package/dist/curry-order-rules-1zjlAgqa.d.cts.map +0 -1
  1419. package/dist/curry-order-rules-BuA7D1F4.js +0 -2
  1420. package/dist/curry-order-rules-BuA7D1F4.js.map +0 -1
  1421. package/dist/curry-order-rules-D2zI7gpB.d.ts +0 -48
  1422. package/dist/curry-order-rules-D2zI7gpB.d.ts.map +0 -1
  1423. package/dist/curry-order-rules-UcuuWkKd.cjs +0 -1
  1424. package/dist/debounce-6x-eQzOn.cjs +0 -1
  1425. package/dist/debounce-BNkJBFrQ.d.cts +0 -96
  1426. package/dist/debounce-BNkJBFrQ.d.cts.map +0 -1
  1427. package/dist/debounce-BzjeDvY7.d.ts +0 -96
  1428. package/dist/debounce-BzjeDvY7.d.ts.map +0 -1
  1429. package/dist/debounce-C9xIAomT.js +0 -2
  1430. package/dist/debounce-C9xIAomT.js.map +0 -1
  1431. package/dist/deduped-CAglY8bF.d.cts +0 -23
  1432. package/dist/deduped-CAglY8bF.d.cts.map +0 -1
  1433. package/dist/deduped-Dru_XVLX.d.ts +0 -23
  1434. package/dist/deduped-Dru_XVLX.d.ts.map +0 -1
  1435. package/dist/difference-B5WQzd-Z.cjs +0 -1
  1436. package/dist/difference-C1tclXTn.d.cts +0 -37
  1437. package/dist/difference-C1tclXTn.d.cts.map +0 -1
  1438. package/dist/difference-Dgeqsjn_.js +0 -2
  1439. package/dist/difference-Dgeqsjn_.js.map +0 -1
  1440. package/dist/difference-sizBcrek.d.ts +0 -37
  1441. package/dist/difference-sizBcrek.d.ts.map +0 -1
  1442. package/dist/difference-with-CNN8MVj2.cjs +0 -1
  1443. package/dist/difference-with-CTy1JWpg.d.cts +0 -48
  1444. package/dist/difference-with-CTy1JWpg.d.cts.map +0 -1
  1445. package/dist/difference-with-CiySHDr9.js +0 -2
  1446. package/dist/difference-with-CiySHDr9.js.map +0 -1
  1447. package/dist/difference-with-rgSm5BHb.d.ts +0 -48
  1448. package/dist/difference-with-rgSm5BHb.d.ts.map +0 -1
  1449. package/dist/dist-3WF0YzcR.cjs +0 -343
  1450. package/dist/dist-C2nNPffG.js +0 -291
  1451. package/dist/dist-C2nNPffG.js.map +0 -1
  1452. package/dist/divide-BI9ShWGE.js +0 -2
  1453. package/dist/divide-BI9ShWGE.js.map +0 -1
  1454. package/dist/divide-BrqILGpr.d.ts +0 -33
  1455. package/dist/divide-BrqILGpr.d.ts.map +0 -1
  1456. package/dist/divide-C8COFm-b.d.cts +0 -33
  1457. package/dist/divide-C8COFm-b.d.cts.map +0 -1
  1458. package/dist/divide-ZFT5ZqJ0.cjs +0 -1
  1459. package/dist/do-nothing-Be29JGDG.js +0 -2
  1460. package/dist/do-nothing-Be29JGDG.js.map +0 -1
  1461. package/dist/do-nothing-Cc1faYu6.cjs +0 -1
  1462. package/dist/do-nothing-POjs7puG.d.ts +0 -28
  1463. package/dist/do-nothing-POjs7puG.d.ts.map +0 -1
  1464. package/dist/do-nothing-xUCzRm4m.d.cts +0 -28
  1465. package/dist/do-nothing-xUCzRm4m.d.cts.map +0 -1
  1466. package/dist/drop-Bmm5QDJI.d.cts +0 -40
  1467. package/dist/drop-Bmm5QDJI.d.cts.map +0 -1
  1468. package/dist/drop-BvsV-rBc.js +0 -2
  1469. package/dist/drop-BvsV-rBc.js.map +0 -1
  1470. package/dist/drop-C-tVyU4K.cjs +0 -1
  1471. package/dist/drop-Dsq8aU8R.d.ts +0 -40
  1472. package/dist/drop-Dsq8aU8R.d.ts.map +0 -1
  1473. package/dist/drop-first-by-CSqeAzwS.d.cts +0 -41
  1474. package/dist/drop-first-by-CSqeAzwS.d.cts.map +0 -1
  1475. package/dist/drop-first-by-CXGGBmyr.d.ts +0 -41
  1476. package/dist/drop-first-by-CXGGBmyr.d.ts.map +0 -1
  1477. package/dist/drop-first-by-Cclqg5G_.js +0 -2
  1478. package/dist/drop-first-by-Cclqg5G_.js.map +0 -1
  1479. package/dist/drop-first-by-DJOgP-yE.cjs +0 -1
  1480. package/dist/drop-last-BvC1IbNA.d.ts +0 -32
  1481. package/dist/drop-last-BvC1IbNA.d.ts.map +0 -1
  1482. package/dist/drop-last-CX8JXA1b.cjs +0 -1
  1483. package/dist/drop-last-CuCKuM4n.js +0 -2
  1484. package/dist/drop-last-CuCKuM4n.js.map +0 -1
  1485. package/dist/drop-last-oiDr5Owj.d.cts +0 -32
  1486. package/dist/drop-last-oiDr5Owj.d.cts.map +0 -1
  1487. package/dist/drop-last-while-C_hHfAhU.d.cts +0 -36
  1488. package/dist/drop-last-while-C_hHfAhU.d.cts.map +0 -1
  1489. package/dist/drop-last-while-DMzZWC3Y.cjs +0 -1
  1490. package/dist/drop-last-while-StSGe_bf.js +0 -2
  1491. package/dist/drop-last-while-StSGe_bf.js.map +0 -1
  1492. package/dist/drop-last-while-qFzYXyPx.d.ts +0 -36
  1493. package/dist/drop-last-while-qFzYXyPx.d.ts.map +0 -1
  1494. package/dist/drop-while-BCln-hAn.js +0 -2
  1495. package/dist/drop-while-BCln-hAn.js.map +0 -1
  1496. package/dist/drop-while-BGbJsU8z.cjs +0 -1
  1497. package/dist/drop-while-BhqTfWFO.d.ts +0 -36
  1498. package/dist/drop-while-BhqTfWFO.d.ts.map +0 -1
  1499. package/dist/drop-while-T3z_MbtJ.d.cts +0 -36
  1500. package/dist/drop-while-T3z_MbtJ.d.cts.map +0 -1
  1501. package/dist/entries--JP88NsB.d.cts +0 -31
  1502. package/dist/entries--JP88NsB.d.cts.map +0 -1
  1503. package/dist/entries-B1cH8giK.cjs +0 -1
  1504. package/dist/entries-Bsl_GQTu.js +0 -2
  1505. package/dist/entries-Bsl_GQTu.js.map +0 -1
  1506. package/dist/entries-Dr63hPk4.d.ts +0 -31
  1507. package/dist/entries-Dr63hPk4.d.ts.map +0 -1
  1508. package/dist/enumerable-string-key-of-D2OpyD6n.d.cts +0 -17
  1509. package/dist/enumerable-string-key-of-D2OpyD6n.d.cts.map +0 -1
  1510. package/dist/enumerable-string-key-of-nnI9DYHk.d.ts +0 -17
  1511. package/dist/enumerable-string-key-of-nnI9DYHk.d.ts.map +0 -1
  1512. package/dist/enumerable-string-keyed-value-of-D0kMm_yz.d.ts +0 -12
  1513. package/dist/enumerable-string-keyed-value-of-D0kMm_yz.d.ts.map +0 -1
  1514. package/dist/enumerable-string-keyed-value-of-aov5dXss.d.cts +0 -12
  1515. package/dist/enumerable-string-keyed-value-of-aov5dXss.d.cts.map +0 -1
  1516. package/dist/evolve-3KidXCB8.d.ts +0 -101
  1517. package/dist/evolve-3KidXCB8.d.ts.map +0 -1
  1518. package/dist/evolve-BReerpSa.js +0 -2
  1519. package/dist/evolve-BReerpSa.js.map +0 -1
  1520. package/dist/evolve-DOxUNkYX.d.cts +0 -101
  1521. package/dist/evolve-DOxUNkYX.d.cts.map +0 -1
  1522. package/dist/evolve-DtSJxJiM.cjs +0 -1
  1523. package/dist/filter-Bg-TEmtZ.d.ts +0 -50
  1524. package/dist/filter-Bg-TEmtZ.d.ts.map +0 -1
  1525. package/dist/filter-CH_YQe9A.js +0 -2
  1526. package/dist/filter-CH_YQe9A.js.map +0 -1
  1527. package/dist/filter-CkFzFT5Q.d.cts +0 -50
  1528. package/dist/filter-CkFzFT5Q.d.cts.map +0 -1
  1529. package/dist/filter-DsjklegV.cjs +0 -1
  1530. package/dist/filtered-array-CPOk8m8s.d.ts +0 -13
  1531. package/dist/filtered-array-CPOk8m8s.d.ts.map +0 -1
  1532. package/dist/filtered-array-DQcAXQDD.d.cts +0 -13
  1533. package/dist/filtered-array-DQcAXQDD.d.cts.map +0 -1
  1534. package/dist/find-Bc-wGZYR.d.cts +0 -64
  1535. package/dist/find-Bc-wGZYR.d.cts.map +0 -1
  1536. package/dist/find-BuO4hH8Z.cjs +0 -1
  1537. package/dist/find-DR6lM3gh.js +0 -2
  1538. package/dist/find-DR6lM3gh.js.map +0 -1
  1539. package/dist/find-DwyDwHfH.d.ts +0 -64
  1540. package/dist/find-DwyDwHfH.d.ts.map +0 -1
  1541. package/dist/find-index-CojMwOU1.cjs +0 -1
  1542. package/dist/find-index-CzHRd1Ey.js +0 -2
  1543. package/dist/find-index-CzHRd1Ey.js.map +0 -1
  1544. package/dist/find-index-DlVnTeBV.d.ts +0 -50
  1545. package/dist/find-index-DlVnTeBV.d.ts.map +0 -1
  1546. package/dist/find-index-mVR2WVAJ.d.cts +0 -50
  1547. package/dist/find-index-mVR2WVAJ.d.cts.map +0 -1
  1548. package/dist/find-last-Bd6eGQR1.d.ts +0 -62
  1549. package/dist/find-last-Bd6eGQR1.d.ts.map +0 -1
  1550. package/dist/find-last-DqGxSxQ-.d.cts +0 -62
  1551. package/dist/find-last-DqGxSxQ-.d.cts.map +0 -1
  1552. package/dist/find-last-gCcPzwJP.js +0 -2
  1553. package/dist/find-last-gCcPzwJP.js.map +0 -1
  1554. package/dist/find-last-index-C-wdKiKp.cjs +0 -1
  1555. package/dist/find-last-index-C4il48Y6.d.cts +0 -50
  1556. package/dist/find-last-index-C4il48Y6.d.cts.map +0 -1
  1557. package/dist/find-last-index-DSUbOIoQ.d.ts +0 -50
  1558. package/dist/find-last-index-DSUbOIoQ.d.ts.map +0 -1
  1559. package/dist/find-last-index-DuYnKTXJ.js +0 -2
  1560. package/dist/find-last-index-DuYnKTXJ.js.map +0 -1
  1561. package/dist/find-last-yrb1RLMJ.cjs +0 -1
  1562. package/dist/first-C3rp67g0.d.cts +0 -40
  1563. package/dist/first-C3rp67g0.d.cts.map +0 -1
  1564. package/dist/first-CWP5DfBE.d.ts +0 -40
  1565. package/dist/first-CWP5DfBE.d.ts.map +0 -1
  1566. package/dist/first-DDQc8owl.js +0 -2
  1567. package/dist/first-DDQc8owl.js.map +0 -1
  1568. package/dist/first-Dbxt3OEg.cjs +0 -1
  1569. package/dist/first-by-B5IsCexF.js +0 -2
  1570. package/dist/first-by-B5IsCexF.js.map +0 -1
  1571. package/dist/first-by-BzxRBZ5J.cjs +0 -1
  1572. package/dist/first-by-Dm9iyhMz.d.cts +0 -60
  1573. package/dist/first-by-Dm9iyhMz.d.cts.map +0 -1
  1574. package/dist/first-by-DopEPVKr.d.ts +0 -60
  1575. package/dist/first-by-DopEPVKr.d.ts.map +0 -1
  1576. package/dist/flat-BayJJsR-.cjs +0 -1
  1577. package/dist/flat-CJrZ3ALE.d.cts +0 -53
  1578. package/dist/flat-CJrZ3ALE.d.cts.map +0 -1
  1579. package/dist/flat-Cd7pIXar.js +0 -2
  1580. package/dist/flat-Cd7pIXar.js.map +0 -1
  1581. package/dist/flat-CfT3an2x.d.ts +0 -53
  1582. package/dist/flat-CfT3an2x.d.ts.map +0 -1
  1583. package/dist/flat-map-1WAgW39N.js +0 -2
  1584. package/dist/flat-map-1WAgW39N.js.map +0 -1
  1585. package/dist/flat-map-BI-sJd2B.cjs +0 -1
  1586. package/dist/flat-map-Do5YLueq.d.cts +0 -47
  1587. package/dist/flat-map-Do5YLueq.d.cts.map +0 -1
  1588. package/dist/flat-map-jJBhHtYT.d.ts +0 -47
  1589. package/dist/flat-map-jJBhHtYT.d.ts.map +0 -1
  1590. package/dist/floor-Bj0O0YjY.cjs +0 -1
  1591. package/dist/floor-C_xareFD.js +0 -2
  1592. package/dist/floor-C_xareFD.js.map +0 -1
  1593. package/dist/floor-DTUexUEb.d.ts +0 -39
  1594. package/dist/floor-DTUexUEb.d.ts.map +0 -1
  1595. package/dist/floor-bA1oX38x.d.cts +0 -39
  1596. package/dist/floor-bA1oX38x.d.cts.map +0 -1
  1597. package/dist/for-each-BtbPzNDc.cjs +0 -1
  1598. package/dist/for-each-C0JwQxWw.d.ts +0 -54
  1599. package/dist/for-each-C0JwQxWw.d.ts.map +0 -1
  1600. package/dist/for-each-CYTR5H9O.d.cts +0 -54
  1601. package/dist/for-each-CYTR5H9O.d.cts.map +0 -1
  1602. package/dist/for-each-ClKbAv3A.js +0 -2
  1603. package/dist/for-each-ClKbAv3A.js.map +0 -1
  1604. package/dist/for-each-obj-B6BJwtgs.cjs +0 -1
  1605. package/dist/for-each-obj-CJFU3pj_.js +0 -2
  1606. package/dist/for-each-obj-CJFU3pj_.js.map +0 -1
  1607. package/dist/for-each-obj-q_fip-TI.d.ts +0 -47
  1608. package/dist/for-each-obj-q_fip-TI.d.ts.map +0 -1
  1609. package/dist/for-each-obj-yV90UbvE.d.cts +0 -47
  1610. package/dist/for-each-obj-yV90UbvE.d.cts.map +0 -1
  1611. package/dist/from-entries-CToFI5yO.d.cts +0 -68
  1612. package/dist/from-entries-CToFI5yO.d.cts.map +0 -1
  1613. package/dist/from-entries-D6f6Bd0l.js +0 -2
  1614. package/dist/from-entries-D6f6Bd0l.js.map +0 -1
  1615. package/dist/from-entries-DDkKcu-p.cjs +0 -1
  1616. package/dist/from-entries-DRBY1dKq.d.ts +0 -68
  1617. package/dist/from-entries-DRBY1dKq.d.ts.map +0 -1
  1618. package/dist/from-keys-CI2PJlIM.cjs +0 -1
  1619. package/dist/from-keys-DJe8xU7b.js +0 -2
  1620. package/dist/from-keys-DJe8xU7b.js.map +0 -1
  1621. package/dist/from-keys-Ds1mndVk.d.cts +0 -60
  1622. package/dist/from-keys-Ds1mndVk.d.cts.map +0 -1
  1623. package/dist/from-keys-DsvEWPvE.d.ts +0 -60
  1624. package/dist/from-keys-DsvEWPvE.d.ts.map +0 -1
  1625. package/dist/funnel-CEbURcmp.js +0 -2
  1626. package/dist/funnel-CEbURcmp.js.map +0 -1
  1627. package/dist/funnel-CL-QFpGk.cjs +0 -1
  1628. package/dist/funnel-CMyhp3Kv.d.ts +0 -155
  1629. package/dist/funnel-CMyhp3Kv.d.ts.map +0 -1
  1630. package/dist/funnel-DRrT4WPx.d.cts +0 -155
  1631. package/dist/funnel-DRrT4WPx.d.cts.map +0 -1
  1632. package/dist/group-by-057Glgkg.cjs +0 -1
  1633. package/dist/group-by-8exEDbij.js +0 -2
  1634. package/dist/group-by-8exEDbij.js.map +0 -1
  1635. package/dist/group-by-DDS1NPHf.d.cts +0 -69
  1636. package/dist/group-by-DDS1NPHf.d.cts.map +0 -1
  1637. package/dist/group-by-DXW8niUS.d.ts +0 -69
  1638. package/dist/group-by-DXW8niUS.d.ts.map +0 -1
  1639. package/dist/group-by-prop-ByeUoeXV.cjs +0 -1
  1640. package/dist/group-by-prop-CcSzCSuu.d.cts +0 -89
  1641. package/dist/group-by-prop-CcSzCSuu.d.cts.map +0 -1
  1642. package/dist/group-by-prop-DDkWErlP.d.ts +0 -89
  1643. package/dist/group-by-prop-DDkWErlP.d.ts.map +0 -1
  1644. package/dist/group-by-prop-Gi66eXCp.js +0 -2
  1645. package/dist/group-by-prop-Gi66eXCp.js.map +0 -1
  1646. package/dist/has-at-least-6iRvhsST.js +0 -2
  1647. package/dist/has-at-least-6iRvhsST.js.map +0 -1
  1648. package/dist/has-at-least-BbYfXc8L.d.cts +0 -59
  1649. package/dist/has-at-least-BbYfXc8L.d.cts.map +0 -1
  1650. package/dist/has-at-least-D-ahiJB6.cjs +0 -1
  1651. package/dist/has-at-least-QYnhvh7S.d.ts +0 -59
  1652. package/dist/has-at-least-QYnhvh7S.d.ts.map +0 -1
  1653. package/dist/has-sub-object-C7LwzJ88.js +0 -2
  1654. package/dist/has-sub-object-C7LwzJ88.js.map +0 -1
  1655. package/dist/has-sub-object-DjlCWSUi.cjs +0 -1
  1656. package/dist/has-sub-object-oUnH6b7a.d.cts +0 -44
  1657. package/dist/has-sub-object-oUnH6b7a.d.cts.map +0 -1
  1658. package/dist/has-sub-object-tnHnkr8o.d.ts +0 -44
  1659. package/dist/has-sub-object-tnHnkr8o.d.ts.map +0 -1
  1660. package/dist/heap-BrQEhV5W.js +0 -2
  1661. package/dist/heap-BrQEhV5W.js.map +0 -1
  1662. package/dist/heap-CpdbyWAN.cjs +0 -1
  1663. package/dist/human-readable-file-size-BtprvwQj.cjs +0 -1
  1664. package/dist/human-readable-file-size-CPeHO1Te.js +0 -2
  1665. package/dist/human-readable-file-size-CPeHO1Te.js.map +0 -1
  1666. package/dist/human-readable-file-size-D5VzlCuv.d.ts +0 -17
  1667. package/dist/human-readable-file-size-D5VzlCuv.d.ts.map +0 -1
  1668. package/dist/human-readable-file-size-DtwHNZes.d.cts +0 -17
  1669. package/dist/human-readable-file-size-DtwHNZes.d.cts.map +0 -1
  1670. package/dist/identity-BAryUWbs.cjs +0 -1
  1671. package/dist/identity-CPDLj9Cq.d.cts +0 -22
  1672. package/dist/identity-CPDLj9Cq.d.cts.map +0 -1
  1673. package/dist/identity-D3aX0VUB.d.ts +0 -22
  1674. package/dist/identity-D3aX0VUB.d.ts.map +0 -1
  1675. package/dist/identity-D7NWGnLw.js +0 -2
  1676. package/dist/identity-D7NWGnLw.js.map +0 -1
  1677. package/dist/index-by-BJH9P6kU.cjs +0 -1
  1678. package/dist/index-by-CNa3p-Is.d.cts +0 -53
  1679. package/dist/index-by-CNa3p-Is.d.cts.map +0 -1
  1680. package/dist/index-by-CZTWSQPX.d.ts +0 -53
  1681. package/dist/index-by-CZTWSQPX.d.ts.map +0 -1
  1682. package/dist/index-by-adSf-XkW.js +0 -2
  1683. package/dist/index-by-adSf-XkW.js.map +0 -1
  1684. package/dist/int-range-inclusive-DZG3R2Xl.d.cts +0 -15
  1685. package/dist/int-range-inclusive-DZG3R2Xl.d.cts.map +0 -1
  1686. package/dist/int-range-inclusive-DzLDwln0.d.ts +0 -15
  1687. package/dist/int-range-inclusive-DzLDwln0.d.ts.map +0 -1
  1688. package/dist/intersection-C7uJ0cq1.d.ts +0 -37
  1689. package/dist/intersection-C7uJ0cq1.d.ts.map +0 -1
  1690. package/dist/intersection-CaBWENw7.d.cts +0 -37
  1691. package/dist/intersection-CaBWENw7.d.cts.map +0 -1
  1692. package/dist/intersection-Crt0YdjH.js +0 -2
  1693. package/dist/intersection-Crt0YdjH.js.map +0 -1
  1694. package/dist/intersection-pxjmHAj1.cjs +0 -1
  1695. package/dist/intersection-with-DlHJvAUn.js +0 -2
  1696. package/dist/intersection-with-DlHJvAUn.js.map +0 -1
  1697. package/dist/intersection-with-Dre9A1oC.d.cts +0 -54
  1698. package/dist/intersection-with-Dre9A1oC.d.cts.map +0 -1
  1699. package/dist/intersection-with-J-TfLFKn.d.ts +0 -54
  1700. package/dist/intersection-with-J-TfLFKn.d.ts.map +0 -1
  1701. package/dist/intersection-with-X3fvRkLr.cjs +0 -1
  1702. package/dist/invert-DhET3F4O.cjs +0 -1
  1703. package/dist/invert-DsEwwjea.js +0 -2
  1704. package/dist/invert-DsEwwjea.js.map +0 -1
  1705. package/dist/invert-V1ZPyP7T.d.ts +0 -33
  1706. package/dist/invert-V1ZPyP7T.d.ts.map +0 -1
  1707. package/dist/invert-W6EUYMws.d.cts +0 -33
  1708. package/dist/invert-W6EUYMws.d.cts.map +0 -1
  1709. package/dist/is-array-DAz7gkMm.d.cts +0 -21
  1710. package/dist/is-array-DAz7gkMm.d.cts.map +0 -1
  1711. package/dist/is-array-DWFX2okh.js +0 -2
  1712. package/dist/is-array-DWFX2okh.js.map +0 -1
  1713. package/dist/is-array-DWisKd2S.d.ts +0 -21
  1714. package/dist/is-array-DWisKd2S.d.ts.map +0 -1
  1715. package/dist/is-array-KzYs6pgh.cjs +0 -1
  1716. package/dist/is-big-int-Cgisg7DN.cjs +0 -1
  1717. package/dist/is-big-int-CnWK6SmP.js +0 -2
  1718. package/dist/is-big-int-CnWK6SmP.js.map +0 -1
  1719. package/dist/is-big-int-DmUEnRHP.d.ts +0 -22
  1720. package/dist/is-big-int-DmUEnRHP.d.ts.map +0 -1
  1721. package/dist/is-big-int-Dow1Lswh.d.cts +0 -22
  1722. package/dist/is-big-int-Dow1Lswh.d.cts.map +0 -1
  1723. package/dist/is-boolean-BSqxj-_d.d.ts +0 -21
  1724. package/dist/is-boolean-BSqxj-_d.d.ts.map +0 -1
  1725. package/dist/is-boolean-CZKz4ij3.js +0 -2
  1726. package/dist/is-boolean-CZKz4ij3.js.map +0 -1
  1727. package/dist/is-boolean-DADmOIbu.cjs +0 -1
  1728. package/dist/is-boolean-NhoGl1jZ.d.cts +0 -21
  1729. package/dist/is-boolean-NhoGl1jZ.d.cts.map +0 -1
  1730. package/dist/is-bounded-record-DEQ2a3_Y.d.ts +0 -34
  1731. package/dist/is-bounded-record-DEQ2a3_Y.d.ts.map +0 -1
  1732. package/dist/is-bounded-record-kpsb1wQA.d.cts +0 -34
  1733. package/dist/is-bounded-record-kpsb1wQA.d.cts.map +0 -1
  1734. package/dist/is-date--gIC--NA.d.cts +0 -17
  1735. package/dist/is-date--gIC--NA.d.cts.map +0 -1
  1736. package/dist/is-date-CNebQb0Y.cjs +0 -1
  1737. package/dist/is-date-DKKVtHVY.js +0 -2
  1738. package/dist/is-date-DKKVtHVY.js.map +0 -1
  1739. package/dist/is-date-pSRD0Bm_.d.ts +0 -17
  1740. package/dist/is-date-pSRD0Bm_.d.ts.map +0 -1
  1741. package/dist/is-deep-equal-C5PnLPx2.d.ts +0 -71
  1742. package/dist/is-deep-equal-C5PnLPx2.d.ts.map +0 -1
  1743. package/dist/is-deep-equal-CtBdM4eT.d.cts +0 -71
  1744. package/dist/is-deep-equal-CtBdM4eT.d.cts.map +0 -1
  1745. package/dist/is-deep-equal-D7dqs3e2.js +0 -2
  1746. package/dist/is-deep-equal-D7dqs3e2.js.map +0 -1
  1747. package/dist/is-deep-equal-DR9xJg8D.cjs +0 -1
  1748. package/dist/is-defined-3Qp6lmQw.d.cts +0 -19
  1749. package/dist/is-defined-3Qp6lmQw.d.cts.map +0 -1
  1750. package/dist/is-defined-Bjs-PriY.d.ts +0 -19
  1751. package/dist/is-defined-Bjs-PriY.d.ts.map +0 -1
  1752. package/dist/is-defined-BnbPFPUx.cjs +0 -1
  1753. package/dist/is-defined-bdl8LRyD.js +0 -2
  1754. package/dist/is-defined-bdl8LRyD.js.map +0 -1
  1755. package/dist/is-empty-BSkgk0sE.js +0 -2
  1756. package/dist/is-empty-BSkgk0sE.js.map +0 -1
  1757. package/dist/is-empty-CFT22qg4.d.cts +0 -35
  1758. package/dist/is-empty-CFT22qg4.d.cts.map +0 -1
  1759. package/dist/is-empty-DumZFkEX.d.ts +0 -35
  1760. package/dist/is-empty-DumZFkEX.d.ts.map +0 -1
  1761. package/dist/is-empty-s3B43K38.cjs +0 -1
  1762. package/dist/is-emptyish-CtpYRY75.cjs +0 -1
  1763. package/dist/is-emptyish-DAVU8RH1.d.cts +0 -74
  1764. package/dist/is-emptyish-DAVU8RH1.d.cts.map +0 -1
  1765. package/dist/is-emptyish-DTm1VZz9.d.ts +0 -74
  1766. package/dist/is-emptyish-DTm1VZz9.d.ts.map +0 -1
  1767. package/dist/is-emptyish-EQIjUNpM.js +0 -2
  1768. package/dist/is-emptyish-EQIjUNpM.js.map +0 -1
  1769. package/dist/is-error-3lCqN0ZV.cjs +0 -1
  1770. package/dist/is-error-78KeswTB.js +0 -2
  1771. package/dist/is-error-78KeswTB.js.map +0 -1
  1772. package/dist/is-error-BaSTm9Oy.d.ts +0 -18
  1773. package/dist/is-error-BaSTm9Oy.d.ts.map +0 -1
  1774. package/dist/is-error-CRs0usTg.d.cts +0 -18
  1775. package/dist/is-error-CRs0usTg.d.cts.map +0 -1
  1776. package/dist/is-function-BwWA5uZn.js +0 -2
  1777. package/dist/is-function-BwWA5uZn.js.map +0 -1
  1778. package/dist/is-function-CUUJoPVT.d.cts +0 -18
  1779. package/dist/is-function-CUUJoPVT.d.cts.map +0 -1
  1780. package/dist/is-function-DCafs0vu.cjs +0 -1
  1781. package/dist/is-function-RTVlC34T.d.ts +0 -18
  1782. package/dist/is-function-RTVlC34T.d.ts.map +0 -1
  1783. package/dist/is-included-in-BPf-vizg.d.ts +0 -110
  1784. package/dist/is-included-in-BPf-vizg.d.ts.map +0 -1
  1785. package/dist/is-included-in-Bgc9XbPZ.d.cts +0 -110
  1786. package/dist/is-included-in-Bgc9XbPZ.d.cts.map +0 -1
  1787. package/dist/is-included-in-Cyf_CvyT.cjs +0 -1
  1788. package/dist/is-included-in-sNQGRURb.js +0 -2
  1789. package/dist/is-included-in-sNQGRURb.js.map +0 -1
  1790. package/dist/is-non-null-BN4w5Uvv.d.cts +0 -19
  1791. package/dist/is-non-null-BN4w5Uvv.d.cts.map +0 -1
  1792. package/dist/is-non-null-ByX4cCc9.js +0 -2
  1793. package/dist/is-non-null-ByX4cCc9.js.map +0 -1
  1794. package/dist/is-non-null-CkhUFCj7.d.ts +0 -19
  1795. package/dist/is-non-null-CkhUFCj7.d.ts.map +0 -1
  1796. package/dist/is-non-null-ottNSI71.cjs +0 -1
  1797. package/dist/is-non-nullish-CPYxcbdK.js +0 -2
  1798. package/dist/is-non-nullish-CPYxcbdK.js.map +0 -1
  1799. package/dist/is-non-nullish-Ck7WAiku.cjs +0 -1
  1800. package/dist/is-non-nullish-D6EU-vIp.d.cts +0 -20
  1801. package/dist/is-non-nullish-D6EU-vIp.d.cts.map +0 -1
  1802. package/dist/is-non-nullish-O32x0PJp.d.ts +0 -20
  1803. package/dist/is-non-nullish-O32x0PJp.d.ts.map +0 -1
  1804. package/dist/is-not-5po8Jiji.js +0 -2
  1805. package/dist/is-not-5po8Jiji.js.map +0 -1
  1806. package/dist/is-not-B79O9f2H.d.cts +0 -19
  1807. package/dist/is-not-B79O9f2H.d.cts.map +0 -1
  1808. package/dist/is-not-CKGCp6DY.cjs +0 -1
  1809. package/dist/is-not-z407hGYJ.d.ts +0 -19
  1810. package/dist/is-not-z407hGYJ.d.ts.map +0 -1
  1811. package/dist/is-nullish-BteQyA9v.d.cts +0 -23
  1812. package/dist/is-nullish-BteQyA9v.d.cts.map +0 -1
  1813. package/dist/is-nullish-DKHeGyyL.d.ts +0 -23
  1814. package/dist/is-nullish-DKHeGyyL.d.ts.map +0 -1
  1815. package/dist/is-nullish-DsOHhzVN.cjs +0 -1
  1816. package/dist/is-nullish-eD1lRML3.js +0 -2
  1817. package/dist/is-nullish-eD1lRML3.js.map +0 -1
  1818. package/dist/is-number-BcIAUIAp.cjs +0 -1
  1819. package/dist/is-number-D5aNK4nm.js +0 -2
  1820. package/dist/is-number-D5aNK4nm.js.map +0 -1
  1821. package/dist/is-number-DaMxsCJY.d.cts +0 -22
  1822. package/dist/is-number-DaMxsCJY.d.cts.map +0 -1
  1823. package/dist/is-number-DzdwnoDa.d.ts +0 -22
  1824. package/dist/is-number-DzdwnoDa.d.ts.map +0 -1
  1825. package/dist/is-object-type-Br10rDJO.js +0 -2
  1826. package/dist/is-object-type-Br10rDJO.js.map +0 -1
  1827. package/dist/is-object-type-CwFmkcim.cjs +0 -1
  1828. package/dist/is-object-type-CyHq8ZXF.d.ts +0 -35
  1829. package/dist/is-object-type-CyHq8ZXF.d.ts.map +0 -1
  1830. package/dist/is-object-type-DVooIUX6.d.cts +0 -35
  1831. package/dist/is-object-type-DVooIUX6.d.cts.map +0 -1
  1832. package/dist/is-plain-object-CDsM3KdY.d.ts +0 -33
  1833. package/dist/is-plain-object-CDsM3KdY.d.ts.map +0 -1
  1834. package/dist/is-plain-object-D0HZzwPq.cjs +0 -1
  1835. package/dist/is-plain-object-DOXTHODS.js +0 -2
  1836. package/dist/is-plain-object-DOXTHODS.js.map +0 -1
  1837. package/dist/is-plain-object-DecAYLun.d.cts +0 -33
  1838. package/dist/is-plain-object-DecAYLun.d.cts.map +0 -1
  1839. package/dist/is-promise-BpAIAlCO.d.ts +0 -18
  1840. package/dist/is-promise-BpAIAlCO.d.ts.map +0 -1
  1841. package/dist/is-promise-DKPEFNFZ.js +0 -2
  1842. package/dist/is-promise-DKPEFNFZ.js.map +0 -1
  1843. package/dist/is-promise-DRSq5wEE.cjs +0 -1
  1844. package/dist/is-promise-saPDFGFp.d.cts +0 -18
  1845. package/dist/is-promise-saPDFGFp.d.cts.map +0 -1
  1846. package/dist/is-shallow-equal-B3YqLsBe.d.cts +0 -71
  1847. package/dist/is-shallow-equal-B3YqLsBe.d.cts.map +0 -1
  1848. package/dist/is-shallow-equal-DNhuWvj5.cjs +0 -1
  1849. package/dist/is-shallow-equal-Dayqg3hM.d.ts +0 -71
  1850. package/dist/is-shallow-equal-Dayqg3hM.d.ts.map +0 -1
  1851. package/dist/is-shallow-equal-jy-Wc8By.js +0 -2
  1852. package/dist/is-shallow-equal-jy-Wc8By.js.map +0 -1
  1853. package/dist/is-strict-equal-BQ047FFm.cjs +0 -1
  1854. package/dist/is-strict-equal-BQM-tE1X.js +0 -2
  1855. package/dist/is-strict-equal-BQM-tE1X.js.map +0 -1
  1856. package/dist/is-strict-equal-C6jYmsHn.d.cts +0 -67
  1857. package/dist/is-strict-equal-C6jYmsHn.d.cts.map +0 -1
  1858. package/dist/is-strict-equal-DvclxPsa.d.ts +0 -67
  1859. package/dist/is-strict-equal-DvclxPsa.d.ts.map +0 -1
  1860. package/dist/is-string-B83nHaQh.js +0 -2
  1861. package/dist/is-string-B83nHaQh.js.map +0 -1
  1862. package/dist/is-string-BK2vkP8W.d.cts +0 -20
  1863. package/dist/is-string-BK2vkP8W.d.cts.map +0 -1
  1864. package/dist/is-string-D1w9IRAG.cjs +0 -1
  1865. package/dist/is-string-D5z2VqeQ.d.ts +0 -20
  1866. package/dist/is-string-D5z2VqeQ.d.ts.map +0 -1
  1867. package/dist/is-symbol-B1Yc8iCa.d.ts +0 -20
  1868. package/dist/is-symbol-B1Yc8iCa.d.ts.map +0 -1
  1869. package/dist/is-symbol-DSaXqtX_.js +0 -2
  1870. package/dist/is-symbol-DSaXqtX_.js.map +0 -1
  1871. package/dist/is-symbol-Dx93-2c5.cjs +0 -1
  1872. package/dist/is-symbol-H_7hDq7Q.d.cts +0 -20
  1873. package/dist/is-symbol-H_7hDq7Q.d.cts.map +0 -1
  1874. package/dist/is-truthy-BFdRDfry.cjs +0 -1
  1875. package/dist/is-truthy-C1WJ8zAI.d.ts +0 -21
  1876. package/dist/is-truthy-C1WJ8zAI.d.ts.map +0 -1
  1877. package/dist/is-truthy-D1g6XOIx.d.cts +0 -21
  1878. package/dist/is-truthy-D1g6XOIx.d.cts.map +0 -1
  1879. package/dist/is-truthy-DdEaJPQQ.js +0 -2
  1880. package/dist/is-truthy-DdEaJPQQ.js.map +0 -1
  1881. package/dist/is-union-BEGCMhOi.d.cts +0 -8
  1882. package/dist/is-union-BEGCMhOi.d.cts.map +0 -1
  1883. package/dist/is-union-J33UR5By.d.ts +0 -8
  1884. package/dist/is-union-J33UR5By.d.ts.map +0 -1
  1885. package/dist/iterable-container-F9CDF7ym.d.ts +0 -17
  1886. package/dist/iterable-container-F9CDF7ym.d.ts.map +0 -1
  1887. package/dist/iterable-container-V5sa0V_H.d.cts +0 -17
  1888. package/dist/iterable-container-V5sa0V_H.d.cts.map +0 -1
  1889. package/dist/join--7n-DVDj.cjs +0 -1
  1890. package/dist/join-4yKLlh5c.d.ts +0 -46
  1891. package/dist/join-4yKLlh5c.d.ts.map +0 -1
  1892. package/dist/join-CZYvKMw4.js +0 -2
  1893. package/dist/join-CZYvKMw4.js.map +0 -1
  1894. package/dist/join-CbbVPKt_.d.cts +0 -46
  1895. package/dist/join-CbbVPKt_.d.cts.map +0 -1
  1896. package/dist/key-codes-ByQBd50u.cjs +0 -1
  1897. package/dist/key-codes-CJWglLzd.d.ts +0 -29
  1898. package/dist/key-codes-CJWglLzd.d.ts.map +0 -1
  1899. package/dist/key-codes-CW_h1fS2.js +0 -2
  1900. package/dist/key-codes-CW_h1fS2.js.map +0 -1
  1901. package/dist/key-codes-fdCwcoqz.d.cts +0 -29
  1902. package/dist/key-codes-fdCwcoqz.d.cts.map +0 -1
  1903. package/dist/keys-APJaOoMR.d.cts +0 -38
  1904. package/dist/keys-APJaOoMR.d.cts.map +0 -1
  1905. package/dist/keys-Bc49dTec.cjs +0 -1
  1906. package/dist/keys-CBnpHqzM.js +0 -2
  1907. package/dist/keys-CBnpHqzM.js.map +0 -1
  1908. package/dist/keys-x6dKCfFA.d.ts +0 -38
  1909. package/dist/keys-x6dKCfFA.d.ts.map +0 -1
  1910. package/dist/last-Bx1XNJrF.cjs +0 -1
  1911. package/dist/last-CBuqaTHO.d.cts +0 -37
  1912. package/dist/last-CBuqaTHO.d.cts.map +0 -1
  1913. package/dist/last-ZdVVx6Tu.js +0 -2
  1914. package/dist/last-ZdVVx6Tu.js.map +0 -1
  1915. package/dist/last-tkqFh097.d.ts +0 -37
  1916. package/dist/last-tkqFh097.d.ts.map +0 -1
  1917. package/dist/lazy-data-last-impl-3PAFkslW.cjs +0 -1
  1918. package/dist/lazy-data-last-impl-7QfM1xXg.js +0 -2
  1919. package/dist/lazy-data-last-impl-7QfM1xXg.js.map +0 -1
  1920. package/dist/length-Cf8v7Hwo.d.ts +0 -28
  1921. package/dist/length-Cf8v7Hwo.d.ts.map +0 -1
  1922. package/dist/length-Cw7iRuYX.d.cts +0 -28
  1923. package/dist/length-Cw7iRuYX.d.cts.map +0 -1
  1924. package/dist/length-DiqattjR.js +0 -2
  1925. package/dist/length-DiqattjR.js.map +0 -1
  1926. package/dist/length-rb507eQr.cjs +0 -1
  1927. package/dist/magic-string.es-BHciF6Gu.cjs +0 -15
  1928. package/dist/magic-string.es-XyuAJnkF.js +0 -15
  1929. package/dist/magic-string.es-XyuAJnkF.js.map +0 -1
  1930. package/dist/map-BTCo1Rpc.js +0 -2
  1931. package/dist/map-BTCo1Rpc.js.map +0 -1
  1932. package/dist/map-Cmj9L5gx.cjs +0 -1
  1933. package/dist/map-Dpve3OoX.d.cts +0 -47
  1934. package/dist/map-Dpve3OoX.d.cts.map +0 -1
  1935. package/dist/map-f3pOunUI.d.ts +0 -47
  1936. package/dist/map-f3pOunUI.d.ts.map +0 -1
  1937. package/dist/map-keys-B7baqkbT.cjs +0 -1
  1938. package/dist/map-keys-Chytp_UR.d.ts +0 -34
  1939. package/dist/map-keys-Chytp_UR.d.ts.map +0 -1
  1940. package/dist/map-keys-DPQg2CMM.js +0 -2
  1941. package/dist/map-keys-DPQg2CMM.js.map +0 -1
  1942. package/dist/map-keys-DZ0wIN0l.d.cts +0 -34
  1943. package/dist/map-keys-DZ0wIN0l.d.cts.map +0 -1
  1944. package/dist/map-to-obj-CfeVuha3.cjs +0 -1
  1945. package/dist/map-to-obj-D1BIHf9X.d.cts +0 -68
  1946. package/dist/map-to-obj-D1BIHf9X.d.cts.map +0 -1
  1947. package/dist/map-to-obj-IjZ2yHXn.js +0 -2
  1948. package/dist/map-to-obj-IjZ2yHXn.js.map +0 -1
  1949. package/dist/map-to-obj-Yv4TEpVO.d.ts +0 -68
  1950. package/dist/map-to-obj-Yv4TEpVO.d.ts.map +0 -1
  1951. package/dist/map-values-DDG0CbSW.cjs +0 -1
  1952. package/dist/map-values-DapykDGD.d.cts +0 -42
  1953. package/dist/map-values-DapykDGD.d.cts.map +0 -1
  1954. package/dist/map-values-DkVteTt6.d.ts +0 -42
  1955. package/dist/map-values-DkVteTt6.d.ts.map +0 -1
  1956. package/dist/map-values-nrF_e_JQ.js +0 -2
  1957. package/dist/map-values-nrF_e_JQ.js.map +0 -1
  1958. package/dist/map-with-feedback-BLbVHk60.d.cts +0 -54
  1959. package/dist/map-with-feedback-BLbVHk60.d.cts.map +0 -1
  1960. package/dist/map-with-feedback-BVCETjRx.d.ts +0 -54
  1961. package/dist/map-with-feedback-BVCETjRx.d.ts.map +0 -1
  1962. package/dist/map-with-feedback-Bj_06j0Q.js +0 -2
  1963. package/dist/map-with-feedback-Bj_06j0Q.js.map +0 -1
  1964. package/dist/map-with-feedback-i5amOlPH.cjs +0 -1
  1965. package/dist/mapped-D_2uTivv.d.cts +0 -7
  1966. package/dist/mapped-D_2uTivv.d.cts.map +0 -1
  1967. package/dist/mapped-PAfazoND.d.ts +0 -7
  1968. package/dist/mapped-PAfazoND.d.ts.map +0 -1
  1969. package/dist/mean-by-BnIWNvSM.d.cts +0 -35
  1970. package/dist/mean-by-BnIWNvSM.d.cts.map +0 -1
  1971. package/dist/mean-by-DMCyv3tB.d.ts +0 -35
  1972. package/dist/mean-by-DMCyv3tB.d.ts.map +0 -1
  1973. package/dist/mean-by-XExXfgtG.js +0 -2
  1974. package/dist/mean-by-XExXfgtG.js.map +0 -1
  1975. package/dist/mean-by-tq1hvU1o.cjs +0 -1
  1976. package/dist/merge-C7r_ADfR.d.cts +0 -57
  1977. package/dist/merge-C7r_ADfR.d.cts.map +0 -1
  1978. package/dist/merge-CbaUe6Ce.js +0 -2
  1979. package/dist/merge-CbaUe6Ce.js.map +0 -1
  1980. package/dist/merge-D1COnjDQ.d.ts +0 -57
  1981. package/dist/merge-D1COnjDQ.d.ts.map +0 -1
  1982. package/dist/merge-InCPrnnC.cjs +0 -1
  1983. package/dist/merge-all-B8XyKhEY.cjs +0 -1
  1984. package/dist/merge-all-CxK7_hBZ.d.ts +0 -42
  1985. package/dist/merge-all-CxK7_hBZ.d.ts.map +0 -1
  1986. package/dist/merge-all-DtHtd1Pc.d.cts +0 -42
  1987. package/dist/merge-all-DtHtd1Pc.d.cts.map +0 -1
  1988. package/dist/merge-all-TsJlQ-YU.js +0 -2
  1989. package/dist/merge-all-TsJlQ-YU.js.map +0 -1
  1990. package/dist/merge-deep-CB4Q8rQS.js +0 -2
  1991. package/dist/merge-deep-CB4Q8rQS.js.map +0 -1
  1992. package/dist/merge-deep-DAnh57IN.d.ts +0 -37
  1993. package/dist/merge-deep-DAnh57IN.d.ts.map +0 -1
  1994. package/dist/merge-deep-_Ie14BHM.cjs +0 -1
  1995. package/dist/merge-deep-kkzayvS3.d.cts +0 -37
  1996. package/dist/merge-deep-kkzayvS3.d.cts.map +0 -1
  1997. package/dist/multiply-1PF_OS8E.js +0 -2
  1998. package/dist/multiply-1PF_OS8E.js.map +0 -1
  1999. package/dist/multiply-BT0u3zsh.cjs +0 -1
  2000. package/dist/multiply-Bo8j2rQi.d.cts +0 -33
  2001. package/dist/multiply-Bo8j2rQi.d.cts.map +0 -1
  2002. package/dist/multiply-CBpoZQpr.d.ts +0 -33
  2003. package/dist/multiply-CBpoZQpr.d.ts.map +0 -1
  2004. package/dist/n-tuple-CU6777y4.d.ts +0 -12
  2005. package/dist/n-tuple-CU6777y4.d.ts.map +0 -1
  2006. package/dist/n-tuple-Co_jgwEn.d.cts +0 -12
  2007. package/dist/n-tuple-Co_jgwEn.d.cts.map +0 -1
  2008. package/dist/narrowed-to-BLLrlAhb.d.ts +0 -15
  2009. package/dist/narrowed-to-BLLrlAhb.d.ts.map +0 -1
  2010. package/dist/narrowed-to-BTrqm7Xt.d.cts +0 -15
  2011. package/dist/narrowed-to-BTrqm7Xt.d.cts.map +0 -1
  2012. package/dist/no-infer-CFhWzPzc.d.cts +0 -5
  2013. package/dist/no-infer-CFhWzPzc.d.cts.map +0 -1
  2014. package/dist/no-infer-DmkBZblw.d.ts +0 -5
  2015. package/dist/no-infer-DmkBZblw.d.ts.map +0 -1
  2016. package/dist/non-empty-array-BfTfvDYg.d.ts +0 -5
  2017. package/dist/non-empty-array-BfTfvDYg.d.ts.map +0 -1
  2018. package/dist/non-empty-array-D3ZRHApS.d.cts +0 -5
  2019. package/dist/non-empty-array-D3ZRHApS.d.cts.map +0 -1
  2020. package/dist/nth-by-BZiAVAjT.cjs +0 -1
  2021. package/dist/nth-by-CK-aOfcg.d.cts +0 -42
  2022. package/dist/nth-by-CK-aOfcg.d.cts.map +0 -1
  2023. package/dist/nth-by-CebpSYpY.d.ts +0 -42
  2024. package/dist/nth-by-CebpSYpY.d.ts.map +0 -1
  2025. package/dist/nth-by-Ol9Thsua.js +0 -2
  2026. package/dist/nth-by-Ol9Thsua.js.map +0 -1
  2027. package/dist/obj-of-BHle5r-f.js +0 -2
  2028. package/dist/obj-of-BHle5r-f.js.map +0 -1
  2029. package/dist/obj-of-CWMITxro.d.cts +0 -27
  2030. package/dist/obj-of-CWMITxro.d.cts.map +0 -1
  2031. package/dist/obj-of-D8oOjocO.d.ts +0 -27
  2032. package/dist/obj-of-D8oOjocO.d.ts.map +0 -1
  2033. package/dist/obj-of-UU0PjTXp.cjs +0 -1
  2034. package/dist/omit-CbVbZe6B.js +0 -2
  2035. package/dist/omit-CbVbZe6B.js.map +0 -1
  2036. package/dist/omit-DJ4Q7wfp.d.cts +0 -29
  2037. package/dist/omit-DJ4Q7wfp.d.cts.map +0 -1
  2038. package/dist/omit-DY21j6I-.d.ts +0 -29
  2039. package/dist/omit-DY21j6I-.d.ts.map +0 -1
  2040. package/dist/omit-Ljg-nRSD.cjs +0 -1
  2041. package/dist/omit-by-DO-qeqAW.cjs +0 -1
  2042. package/dist/omit-by-DTipg3uJ.d.ts +0 -52
  2043. package/dist/omit-by-DTipg3uJ.d.ts.map +0 -1
  2044. package/dist/omit-by-DXSSUFwz.d.cts +0 -52
  2045. package/dist/omit-by-DXSSUFwz.d.cts.map +0 -1
  2046. package/dist/omit-by-QzqJAuk3.js +0 -2
  2047. package/dist/omit-by-QzqJAuk3.js.map +0 -1
  2048. package/dist/once-BbDFCS7l.js +0 -2
  2049. package/dist/once-BbDFCS7l.js.map +0 -1
  2050. package/dist/once-BrpjaAJS.cjs +0 -1
  2051. package/dist/once-Cr_DJNbf.d.cts +0 -17
  2052. package/dist/once-Cr_DJNbf.d.cts.map +0 -1
  2053. package/dist/once-YBm4xrPC.d.ts +0 -17
  2054. package/dist/once-YBm4xrPC.d.ts.map +0 -1
  2055. package/dist/only-D2B9O0Kn.d.ts +0 -34
  2056. package/dist/only-D2B9O0Kn.d.ts.map +0 -1
  2057. package/dist/only-DltQiNme.cjs +0 -1
  2058. package/dist/only-aG2aEsjs.js +0 -2
  2059. package/dist/only-aG2aEsjs.js.map +0 -1
  2060. package/dist/only-oROrZ51q.d.cts +0 -34
  2061. package/dist/only-oROrZ51q.d.cts.map +0 -1
  2062. package/dist/partial-array-CzOnr197.d.cts +0 -12
  2063. package/dist/partial-array-CzOnr197.d.cts.map +0 -1
  2064. package/dist/partial-array-DSctnYXY.d.ts +0 -12
  2065. package/dist/partial-array-DSctnYXY.d.ts.map +0 -1
  2066. package/dist/partition-CIBacxWc.d.ts +0 -51
  2067. package/dist/partition-CIBacxWc.d.ts.map +0 -1
  2068. package/dist/partition-CP0fPbGt.cjs +0 -1
  2069. package/dist/partition-LBHIQgBS.d.cts +0 -51
  2070. package/dist/partition-LBHIQgBS.d.cts.map +0 -1
  2071. package/dist/partition-e274M9T9.js +0 -2
  2072. package/dist/partition-e274M9T9.js.map +0 -1
  2073. package/dist/path-or-D-RyTkoO.cjs +0 -1
  2074. package/dist/path-or-D2Gn-2iU.js +0 -2
  2075. package/dist/path-or-D2Gn-2iU.js.map +0 -1
  2076. package/dist/path-or-DvWnAQUG.d.cts +0 -87
  2077. package/dist/path-or-DvWnAQUG.d.cts.map +0 -1
  2078. package/dist/path-or-ld_fRiaZ.d.ts +0 -87
  2079. package/dist/path-or-ld_fRiaZ.d.ts.map +0 -1
  2080. package/dist/perkakas-type-error-0tHtaPbi.d.cts +0 -19
  2081. package/dist/perkakas-type-error-0tHtaPbi.d.cts.map +0 -1
  2082. package/dist/perkakas-type-error-2yBU0Drj.d.ts +0 -19
  2083. package/dist/perkakas-type-error-2yBU0Drj.d.ts.map +0 -1
  2084. package/dist/pick-ChVH4t7j.d.cts +0 -66
  2085. package/dist/pick-ChVH4t7j.d.cts.map +0 -1
  2086. package/dist/pick-DH_wjXvd.cjs +0 -1
  2087. package/dist/pick-DeXJU-DB.js +0 -2
  2088. package/dist/pick-DeXJU-DB.js.map +0 -1
  2089. package/dist/pick-DvCrGRHa.d.ts +0 -66
  2090. package/dist/pick-DvCrGRHa.d.ts.map +0 -1
  2091. package/dist/pick-by-BuU3hu7X.d.ts +0 -68
  2092. package/dist/pick-by-BuU3hu7X.d.ts.map +0 -1
  2093. package/dist/pick-by-CKRuN-_s.cjs +0 -1
  2094. package/dist/pick-by-CM_x6iCC.js +0 -2
  2095. package/dist/pick-by-CM_x6iCC.js.map +0 -1
  2096. package/dist/pick-by-WPJjBk-W.d.cts +0 -68
  2097. package/dist/pick-by-WPJjBk-W.d.cts.map +0 -1
  2098. package/dist/pipe-BbenIdBH.d.cts +0 -34
  2099. package/dist/pipe-BbenIdBH.d.cts.map +0 -1
  2100. package/dist/pipe-CtsfTnqv.js +0 -2
  2101. package/dist/pipe-CtsfTnqv.js.map +0 -1
  2102. package/dist/pipe-D_b9Li8m.d.ts +0 -34
  2103. package/dist/pipe-D_b9Li8m.d.ts.map +0 -1
  2104. package/dist/pipe-DlFjc4Wf.cjs +0 -1
  2105. package/dist/piped-C3tPJts-.d.cts +0 -31
  2106. package/dist/piped-C3tPJts-.d.cts.map +0 -1
  2107. package/dist/piped-CbukZpTA.js +0 -2
  2108. package/dist/piped-CbukZpTA.js.map +0 -1
  2109. package/dist/piped-DRdfIujb.d.ts +0 -31
  2110. package/dist/piped-DRdfIujb.d.ts.map +0 -1
  2111. package/dist/piped-xRnbs0j5.cjs +0 -1
  2112. package/dist/product-6SFVh3Ue.js +0 -2
  2113. package/dist/product-6SFVh3Ue.js.map +0 -1
  2114. package/dist/product-DeZAtdWP.d.ts +0 -52
  2115. package/dist/product-DeZAtdWP.d.ts.map +0 -1
  2116. package/dist/product-FQWHadxM.d.cts +0 -52
  2117. package/dist/product-FQWHadxM.d.cts.map +0 -1
  2118. package/dist/product-RjN37mez.cjs +0 -1
  2119. package/dist/prop-BicXDh5Z.cjs +0 -1
  2120. package/dist/prop-CVQFcKcc.js +0 -2
  2121. package/dist/prop-CVQFcKcc.js.map +0 -1
  2122. package/dist/prop-aaMksFMG.d.cts +0 -86
  2123. package/dist/prop-aaMksFMG.d.cts.map +0 -1
  2124. package/dist/prop-i2Omh4sY.d.ts +0 -86
  2125. package/dist/prop-i2Omh4sY.d.ts.map +0 -1
  2126. package/dist/pull-object-Cv7mJb_D.js +0 -2
  2127. package/dist/pull-object-Cv7mJb_D.js.map +0 -1
  2128. package/dist/pull-object-DMKC8D-3.d.ts +0 -70
  2129. package/dist/pull-object-DMKC8D-3.d.ts.map +0 -1
  2130. package/dist/pull-object-DQm_yoEt.cjs +0 -1
  2131. package/dist/pull-object-wIntRbAJ.d.cts +0 -70
  2132. package/dist/pull-object-wIntRbAJ.d.cts.map +0 -1
  2133. package/dist/random-integer-B4c6QM_c.d.cts +0 -23
  2134. package/dist/random-integer-B4c6QM_c.d.cts.map +0 -1
  2135. package/dist/random-integer-BXqTHUFz.js +0 -2
  2136. package/dist/random-integer-BXqTHUFz.js.map +0 -1
  2137. package/dist/random-integer-B_hsewtO.d.ts +0 -23
  2138. package/dist/random-integer-B_hsewtO.d.ts.map +0 -1
  2139. package/dist/random-integer-DsXZVStb.cjs +0 -1
  2140. package/dist/random-string-BFN3qW9t.cjs +0 -1
  2141. package/dist/random-string-BNn5RWaf.d.cts +0 -29
  2142. package/dist/random-string-BNn5RWaf.d.cts.map +0 -1
  2143. package/dist/random-string-DPGmbg8C.js +0 -2
  2144. package/dist/random-string-DPGmbg8C.js.map +0 -1
  2145. package/dist/random-string-_YPVxJwf.d.ts +0 -29
  2146. package/dist/random-string-_YPVxJwf.d.ts.map +0 -1
  2147. package/dist/range-CqCDf4gs.js +0 -2
  2148. package/dist/range-CqCDf4gs.js.map +0 -1
  2149. package/dist/range-D3Rravct.d.ts +0 -27
  2150. package/dist/range-D3Rravct.d.ts.map +0 -1
  2151. package/dist/range-DPikJdPT.cjs +0 -1
  2152. package/dist/range-IHSbe6ns.d.cts +0 -27
  2153. package/dist/range-IHSbe6ns.d.cts.map +0 -1
  2154. package/dist/rank-by-BAvkwO1T.d.ts +0 -45
  2155. package/dist/rank-by-BAvkwO1T.d.ts.map +0 -1
  2156. package/dist/rank-by-B_tfHDQl.cjs +0 -1
  2157. package/dist/rank-by-BbvZnY3X.d.cts +0 -45
  2158. package/dist/rank-by-BbvZnY3X.d.cts.map +0 -1
  2159. package/dist/rank-by-C1qfJCHd.js +0 -2
  2160. package/dist/rank-by-C1qfJCHd.js.map +0 -1
  2161. package/dist/reduce-CrxiKHBX.cjs +0 -1
  2162. package/dist/reduce-DeOCr-Lz.d.ts +0 -53
  2163. package/dist/reduce-DeOCr-Lz.d.ts.map +0 -1
  2164. package/dist/reduce-DsDQdDwu.js +0 -2
  2165. package/dist/reduce-DsDQdDwu.js.map +0 -1
  2166. package/dist/reduce-jhUIIUcp.d.cts +0 -53
  2167. package/dist/reduce-jhUIIUcp.d.cts.map +0 -1
  2168. package/dist/reordered-array-BJFUtOkp.d.ts +0 -7
  2169. package/dist/reordered-array-BJFUtOkp.d.ts.map +0 -1
  2170. package/dist/reordered-array-ikr9o4WE.d.cts +0 -7
  2171. package/dist/reordered-array-ikr9o4WE.d.cts.map +0 -1
  2172. package/dist/reverse-BC8XHQfI.cjs +0 -1
  2173. package/dist/reverse-BYHaMWmD.d.ts +0 -29
  2174. package/dist/reverse-BYHaMWmD.d.ts.map +0 -1
  2175. package/dist/reverse-Qt4C74U1.js +0 -2
  2176. package/dist/reverse-Qt4C74U1.js.map +0 -1
  2177. package/dist/reverse-ntEUPfSi.d.cts +0 -29
  2178. package/dist/reverse-ntEUPfSi.d.cts.map +0 -1
  2179. package/dist/round-BiiwjQ6h.d.cts +0 -39
  2180. package/dist/round-BiiwjQ6h.d.cts.map +0 -1
  2181. package/dist/round-CXiXOypy.d.ts +0 -39
  2182. package/dist/round-CXiXOypy.d.ts.map +0 -1
  2183. package/dist/round-D2BDbobr.js +0 -2
  2184. package/dist/round-D2BDbobr.js.map +0 -1
  2185. package/dist/round-h0B_SE5h.cjs +0 -1
  2186. package/dist/sample-BbYf0CTH.d.cts +0 -69
  2187. package/dist/sample-BbYf0CTH.d.cts.map +0 -1
  2188. package/dist/sample-Bxl7znd8.js +0 -2
  2189. package/dist/sample-Bxl7znd8.js.map +0 -1
  2190. package/dist/sample-CaYEaqQj.d.ts +0 -69
  2191. package/dist/sample-CaYEaqQj.d.ts.map +0 -1
  2192. package/dist/sample-SB8BUKF1.cjs +0 -1
  2193. package/dist/set-BFeeSSaN.d.ts +0 -40
  2194. package/dist/set-BFeeSSaN.d.ts.map +0 -1
  2195. package/dist/set-CStLHN6U.cjs +0 -1
  2196. package/dist/set-Pvxm6bqo.d.cts +0 -40
  2197. package/dist/set-Pvxm6bqo.d.cts.map +0 -1
  2198. package/dist/set-o55m5TqJ.js +0 -2
  2199. package/dist/set-o55m5TqJ.js.map +0 -1
  2200. package/dist/set-path-9jpMmvFF.d.ts +0 -47
  2201. package/dist/set-path-9jpMmvFF.d.ts.map +0 -1
  2202. package/dist/set-path-BTr40N0b.js +0 -2
  2203. package/dist/set-path-BTr40N0b.js.map +0 -1
  2204. package/dist/set-path-CGt8p1TJ.d.cts +0 -47
  2205. package/dist/set-path-CGt8p1TJ.d.cts.map +0 -1
  2206. package/dist/set-path-D31WORus.cjs +0 -1
  2207. package/dist/shuffle-8A3aANRh.d.ts +0 -31
  2208. package/dist/shuffle-8A3aANRh.d.ts.map +0 -1
  2209. package/dist/shuffle-BCbs5P_6.cjs +0 -1
  2210. package/dist/shuffle-Ch-T2UYk.d.cts +0 -31
  2211. package/dist/shuffle-Ch-T2UYk.d.cts.map +0 -1
  2212. package/dist/shuffle-CmC8Wx4C.js +0 -2
  2213. package/dist/shuffle-CmC8Wx4C.js.map +0 -1
  2214. package/dist/sleep-1rGV3wAg.cjs +0 -1
  2215. package/dist/sleep-BgAxArXl.d.cts +0 -16
  2216. package/dist/sleep-BgAxArXl.d.cts.map +0 -1
  2217. package/dist/sleep-DvzRMgY-.js +0 -2
  2218. package/dist/sleep-DvzRMgY-.js.map +0 -1
  2219. package/dist/sleep-y-yAF7nh.d.ts +0 -16
  2220. package/dist/sleep-y-yAF7nh.d.ts.map +0 -1
  2221. package/dist/slice-string-C_sr11Yl.js +0 -2
  2222. package/dist/slice-string-C_sr11Yl.js.map +0 -1
  2223. package/dist/slice-string-DDjoN-CB.d.cts +0 -41
  2224. package/dist/slice-string-DDjoN-CB.d.cts.map +0 -1
  2225. package/dist/slice-string-T3sXkO_K.cjs +0 -1
  2226. package/dist/slice-string-e2668-0a.d.ts +0 -41
  2227. package/dist/slice-string-e2668-0a.d.ts.map +0 -1
  2228. package/dist/slugify-02-IFAOz.cjs +0 -1
  2229. package/dist/slugify-BdGkKaj7.d.ts +0 -15
  2230. package/dist/slugify-BdGkKaj7.d.ts.map +0 -1
  2231. package/dist/slugify-CEC6lPso.js +0 -2
  2232. package/dist/slugify-CEC6lPso.js.map +0 -1
  2233. package/dist/slugify-DVioAYr7.d.cts +0 -15
  2234. package/dist/slugify-DVioAYr7.d.cts.map +0 -1
  2235. package/dist/sort-BZjbaFeJ.d.cts +0 -39
  2236. package/dist/sort-BZjbaFeJ.d.cts.map +0 -1
  2237. package/dist/sort-BgfyDhxW.cjs +0 -1
  2238. package/dist/sort-BpxPLnEH.d.ts +0 -39
  2239. package/dist/sort-BpxPLnEH.d.ts.map +0 -1
  2240. package/dist/sort-D6nlyfod.js +0 -2
  2241. package/dist/sort-D6nlyfod.js.map +0 -1
  2242. package/dist/sort-by-8to821Mp.js +0 -2
  2243. package/dist/sort-by-8to821Mp.js.map +0 -1
  2244. package/dist/sort-by-CH6n9bWf.d.ts +0 -88
  2245. package/dist/sort-by-CH6n9bWf.d.ts.map +0 -1
  2246. package/dist/sort-by-CtJoPjKN.cjs +0 -1
  2247. package/dist/sort-by-DoBfFSu4.d.cts +0 -88
  2248. package/dist/sort-by-DoBfFSu4.d.cts.map +0 -1
  2249. package/dist/sorted-index-C7n8fUow.d.ts +0 -45
  2250. package/dist/sorted-index-C7n8fUow.d.ts.map +0 -1
  2251. package/dist/sorted-index-Cb-4kSWR.js +0 -2
  2252. package/dist/sorted-index-Cb-4kSWR.js.map +0 -1
  2253. package/dist/sorted-index-WmPsJZWy.d.cts +0 -45
  2254. package/dist/sorted-index-WmPsJZWy.d.cts.map +0 -1
  2255. package/dist/sorted-index-by-BGDi-4BL.cjs +0 -1
  2256. package/dist/sorted-index-by-C-5Yb-j2.js +0 -2
  2257. package/dist/sorted-index-by-C-5Yb-j2.js.map +0 -1
  2258. package/dist/sorted-index-by-D9WveGrc.d.cts +0 -70
  2259. package/dist/sorted-index-by-D9WveGrc.d.cts.map +0 -1
  2260. package/dist/sorted-index-by-wSsKYW7Z.d.ts +0 -70
  2261. package/dist/sorted-index-by-wSsKYW7Z.d.ts.map +0 -1
  2262. package/dist/sorted-index-r_y0xd5n.cjs +0 -1
  2263. package/dist/sorted-index-with-BAbLX5vT.js +0 -2
  2264. package/dist/sorted-index-with-BAbLX5vT.js.map +0 -1
  2265. package/dist/sorted-index-with-BDoZKE2t.cjs +0 -1
  2266. package/dist/sorted-index-with-CKynJFKP.d.cts +0 -72
  2267. package/dist/sorted-index-with-CKynJFKP.d.cts.map +0 -1
  2268. package/dist/sorted-index-with-rq5dPCX_.d.ts +0 -72
  2269. package/dist/sorted-index-with-rq5dPCX_.d.ts.map +0 -1
  2270. package/dist/sorted-last-index-BXVeuqVW.d.cts +0 -45
  2271. package/dist/sorted-last-index-BXVeuqVW.d.cts.map +0 -1
  2272. package/dist/sorted-last-index-CwZ0vU7v.cjs +0 -1
  2273. package/dist/sorted-last-index-DKDuZV51.d.ts +0 -45
  2274. package/dist/sorted-last-index-DKDuZV51.d.ts.map +0 -1
  2275. package/dist/sorted-last-index-by-Bwy_FXV3.cjs +0 -1
  2276. package/dist/sorted-last-index-by-CypmQpWR.d.cts +0 -72
  2277. package/dist/sorted-last-index-by-CypmQpWR.d.cts.map +0 -1
  2278. package/dist/sorted-last-index-by-D6I-_BRT.js +0 -2
  2279. package/dist/sorted-last-index-by-D6I-_BRT.js.map +0 -1
  2280. package/dist/sorted-last-index-by-tKmeBThm.d.ts +0 -72
  2281. package/dist/sorted-last-index-by-tKmeBThm.d.ts.map +0 -1
  2282. package/dist/sorted-last-index-eCG7G76u.js +0 -2
  2283. package/dist/sorted-last-index-eCG7G76u.js.map +0 -1
  2284. package/dist/splice-BAV6QQGX.cjs +0 -1
  2285. package/dist/splice-Bqzh0vwZ.d.ts +0 -35
  2286. package/dist/splice-Bqzh0vwZ.d.ts.map +0 -1
  2287. package/dist/splice-Rtj9OHe-.d.cts +0 -35
  2288. package/dist/splice-Rtj9OHe-.d.cts.map +0 -1
  2289. package/dist/splice-jmQkkqUQ.js +0 -2
  2290. package/dist/splice-jmQkkqUQ.js.map +0 -1
  2291. package/dist/split-4732uYSL.d.cts +0 -62
  2292. package/dist/split-4732uYSL.d.cts.map +0 -1
  2293. package/dist/split-BCgeOz9S.cjs +0 -1
  2294. package/dist/split-D84V9L6V.d.ts +0 -62
  2295. package/dist/split-D84V9L6V.d.ts.map +0 -1
  2296. package/dist/split-at-G5niCG-J.js +0 -2
  2297. package/dist/split-at-G5niCG-J.js.map +0 -1
  2298. package/dist/split-at-HLOqEHH2.d.cts +0 -31
  2299. package/dist/split-at-HLOqEHH2.d.cts.map +0 -1
  2300. package/dist/split-at-Jc3Rqy7v.cjs +0 -1
  2301. package/dist/split-at-u6HErcio.d.ts +0 -31
  2302. package/dist/split-at-u6HErcio.d.ts.map +0 -1
  2303. package/dist/split-i3LJTbq2.js +0 -2
  2304. package/dist/split-i3LJTbq2.js.map +0 -1
  2305. package/dist/split-when-CI6Rp9P6.d.ts +0 -29
  2306. package/dist/split-when-CI6Rp9P6.d.ts.map +0 -1
  2307. package/dist/split-when-CSgkl-FL.cjs +0 -1
  2308. package/dist/split-when-D7haKyST.d.cts +0 -29
  2309. package/dist/split-when-D7haKyST.d.cts.map +0 -1
  2310. package/dist/split-when-b4N1TSSY.js +0 -2
  2311. package/dist/split-when-b4N1TSSY.js.map +0 -1
  2312. package/dist/string-to-path-BNoivDR4.d.ts +0 -39
  2313. package/dist/string-to-path-BNoivDR4.d.ts.map +0 -1
  2314. package/dist/string-to-path-CjAuFrpj.d.cts +0 -39
  2315. package/dist/string-to-path-CjAuFrpj.d.cts.map +0 -1
  2316. package/dist/string-to-path-DzBIAH5I.js +0 -2
  2317. package/dist/string-to-path-DzBIAH5I.js.map +0 -1
  2318. package/dist/string-to-path-wZDfvAnJ.cjs +0 -1
  2319. package/dist/subtract-5cWDnOqs.d.ts +0 -35
  2320. package/dist/subtract-5cWDnOqs.d.ts.map +0 -1
  2321. package/dist/subtract-D1qLZDfq.js +0 -2
  2322. package/dist/subtract-D1qLZDfq.js.map +0 -1
  2323. package/dist/subtract-gGSDVCQa.d.cts +0 -35
  2324. package/dist/subtract-gGSDVCQa.d.cts.map +0 -1
  2325. package/dist/subtract-y93SO1gw.cjs +0 -1
  2326. package/dist/sum-B69a1sb5.cjs +0 -1
  2327. package/dist/sum-BHYsbVr5.js +0 -2
  2328. package/dist/sum-BHYsbVr5.js.map +0 -1
  2329. package/dist/sum-CEgbjhbj.d.ts +0 -50
  2330. package/dist/sum-CEgbjhbj.d.ts.map +0 -1
  2331. package/dist/sum-CyC38gTv.d.cts +0 -50
  2332. package/dist/sum-CyC38gTv.d.cts.map +0 -1
  2333. package/dist/sum-by-CTPKc8na.d.ts +0 -57
  2334. package/dist/sum-by-CTPKc8na.d.ts.map +0 -1
  2335. package/dist/sum-by-Cke8ybTY.cjs +0 -1
  2336. package/dist/sum-by-DH-LAQQ3.d.cts +0 -57
  2337. package/dist/sum-by-DH-LAQQ3.d.cts.map +0 -1
  2338. package/dist/sum-by-DKfgHdcr.js +0 -2
  2339. package/dist/sum-by-DKfgHdcr.js.map +0 -1
  2340. package/dist/swap-in-place-BBqaxzzG.js +0 -2
  2341. package/dist/swap-in-place-BBqaxzzG.js.map +0 -1
  2342. package/dist/swap-in-place-CJrU2n1_.cjs +0 -1
  2343. package/dist/swap-indices-CsuHWDbY.cjs +0 -1
  2344. package/dist/swap-indices-DWG9tWCr.d.cts +0 -61
  2345. package/dist/swap-indices-DWG9tWCr.d.cts.map +0 -1
  2346. package/dist/swap-indices-DWsQg1W8.d.ts +0 -61
  2347. package/dist/swap-indices-DWsQg1W8.d.ts.map +0 -1
  2348. package/dist/swap-indices-inhV1_Nb.js +0 -2
  2349. package/dist/swap-indices-inhV1_Nb.js.map +0 -1
  2350. package/dist/swap-props-BRHZP2h5.d.cts +0 -34
  2351. package/dist/swap-props-BRHZP2h5.d.cts.map +0 -1
  2352. package/dist/swap-props-mp8Z9OU_.js +0 -2
  2353. package/dist/swap-props-mp8Z9OU_.js.map +0 -1
  2354. package/dist/swap-props-pgUf_Wxo.d.ts +0 -34
  2355. package/dist/swap-props-pgUf_Wxo.d.ts.map +0 -1
  2356. package/dist/swap-props-zfImAv9P.cjs +0 -1
  2357. package/dist/take-BXMJXDQ_.cjs +0 -1
  2358. package/dist/take-CT43kXAi.d.cts +0 -34
  2359. package/dist/take-CT43kXAi.d.cts.map +0 -1
  2360. package/dist/take-CpuzOFEZ.d.ts +0 -34
  2361. package/dist/take-CpuzOFEZ.d.ts.map +0 -1
  2362. package/dist/take-cbRFuvDN.js +0 -2
  2363. package/dist/take-cbRFuvDN.js.map +0 -1
  2364. package/dist/take-first-by-CBMKdWli.d.cts +0 -41
  2365. package/dist/take-first-by-CBMKdWli.d.cts.map +0 -1
  2366. package/dist/take-first-by-CHK8ZUbR.d.ts +0 -41
  2367. package/dist/take-first-by-CHK8ZUbR.d.ts.map +0 -1
  2368. package/dist/take-first-by-DkMHTJNU.js +0 -2
  2369. package/dist/take-first-by-DkMHTJNU.js.map +0 -1
  2370. package/dist/take-first-by-DpgN2xxt.cjs +0 -1
  2371. package/dist/take-last-BHz1vsOl.d.cts +0 -32
  2372. package/dist/take-last-BHz1vsOl.d.cts.map +0 -1
  2373. package/dist/take-last-BySlnmMM.js +0 -2
  2374. package/dist/take-last-BySlnmMM.js.map +0 -1
  2375. package/dist/take-last-C8Ig0Lip.cjs +0 -1
  2376. package/dist/take-last-F6ZCTILY.d.ts +0 -32
  2377. package/dist/take-last-F6ZCTILY.d.ts.map +0 -1
  2378. package/dist/take-last-while-BX9WWFOz.cjs +0 -1
  2379. package/dist/take-last-while-CT3sSTp3.d.ts +0 -36
  2380. package/dist/take-last-while-CT3sSTp3.d.ts.map +0 -1
  2381. package/dist/take-last-while-Cegja0hc.d.cts +0 -36
  2382. package/dist/take-last-while-Cegja0hc.d.cts.map +0 -1
  2383. package/dist/take-last-while-t3GonJ5e.js +0 -2
  2384. package/dist/take-last-while-t3GonJ5e.js.map +0 -1
  2385. package/dist/take-while--cm-kJ_K.d.cts +0 -34
  2386. package/dist/take-while--cm-kJ_K.d.cts.map +0 -1
  2387. package/dist/take-while-CW0i9IV4.js +0 -2
  2388. package/dist/take-while-CW0i9IV4.js.map +0 -1
  2389. package/dist/take-while-Cr9jQRE3.d.ts +0 -34
  2390. package/dist/take-while-Cr9jQRE3.d.ts.map +0 -1
  2391. package/dist/take-while-ygIVi5-P.cjs +0 -1
  2392. package/dist/tap--cZcReMV.d.cts +0 -42
  2393. package/dist/tap--cZcReMV.d.cts.map +0 -1
  2394. package/dist/tap-BPowGH7O.cjs +0 -1
  2395. package/dist/tap-C0PU_aGY.js +0 -2
  2396. package/dist/tap-C0PU_aGY.js.map +0 -1
  2397. package/dist/tap-DB9pGeM0.d.ts +0 -42
  2398. package/dist/tap-DB9pGeM0.d.ts.map +0 -1
  2399. package/dist/times-BCzPBzWg.cjs +0 -1
  2400. package/dist/times-DA4WYnau.js +0 -2
  2401. package/dist/times-DA4WYnau.js.map +0 -1
  2402. package/dist/times-DAGaGp7f.d.cts +0 -48
  2403. package/dist/times-DAGaGp7f.d.cts.map +0 -1
  2404. package/dist/times-Ng9jlovV.d.ts +0 -48
  2405. package/dist/times-Ng9jlovV.d.ts.map +0 -1
  2406. package/dist/to-camel-case-B1HuBfci.d.cts +0 -32
  2407. package/dist/to-camel-case-B1HuBfci.d.cts.map +0 -1
  2408. package/dist/to-camel-case-WO0dL27L.d.ts +0 -32
  2409. package/dist/to-camel-case-WO0dL27L.d.ts.map +0 -1
  2410. package/dist/to-camel-case-tT8RIKVL.js +0 -2
  2411. package/dist/to-camel-case-tT8RIKVL.js.map +0 -1
  2412. package/dist/to-camel-case-wmrPCKNp.cjs +0 -1
  2413. package/dist/to-capital-case-BIjC2jMF.cjs +0 -1
  2414. package/dist/to-capital-case-CYqHmNSL.d.ts +0 -31
  2415. package/dist/to-capital-case-CYqHmNSL.d.ts.map +0 -1
  2416. package/dist/to-capital-case-D1ln-ILr.js +0 -2
  2417. package/dist/to-capital-case-D1ln-ILr.js.map +0 -1
  2418. package/dist/to-capital-case-DngZyTk7.d.cts +0 -31
  2419. package/dist/to-capital-case-DngZyTk7.d.cts.map +0 -1
  2420. package/dist/to-capital-case.cjs +0 -1
  2421. package/dist/to-capital-case.d.cts +0 -3
  2422. package/dist/to-capital-case.d.ts +0 -3
  2423. package/dist/to-capital-case.js +0 -1
  2424. package/dist/to-constant-case-BVmc0wYZ.js +0 -2
  2425. package/dist/to-constant-case-BVmc0wYZ.js.map +0 -1
  2426. package/dist/to-constant-case-CH7D926n.d.ts +0 -31
  2427. package/dist/to-constant-case-CH7D926n.d.ts.map +0 -1
  2428. package/dist/to-constant-case-DaNGBqkE.d.cts +0 -31
  2429. package/dist/to-constant-case-DaNGBqkE.d.cts.map +0 -1
  2430. package/dist/to-constant-case-DfXuQ9Au.cjs +0 -1
  2431. package/dist/to-constant-case.cjs +0 -1
  2432. package/dist/to-constant-case.d.cts +0 -3
  2433. package/dist/to-constant-case.d.ts +0 -3
  2434. package/dist/to-constant-case.js +0 -1
  2435. package/dist/to-kebab-case-B8wAcWY6.d.cts +0 -31
  2436. package/dist/to-kebab-case-B8wAcWY6.d.cts.map +0 -1
  2437. package/dist/to-kebab-case-Da16i23C.js +0 -2
  2438. package/dist/to-kebab-case-Da16i23C.js.map +0 -1
  2439. package/dist/to-kebab-case-DyJq9Sqj.cjs +0 -1
  2440. package/dist/to-kebab-case-jT7kXDMG.d.ts +0 -31
  2441. package/dist/to-kebab-case-jT7kXDMG.d.ts.map +0 -1
  2442. package/dist/to-no-case-B4DuAjFF.d.ts +0 -31
  2443. package/dist/to-no-case-B4DuAjFF.d.ts.map +0 -1
  2444. package/dist/to-no-case-BsyVJqj5.d.cts +0 -31
  2445. package/dist/to-no-case-BsyVJqj5.d.cts.map +0 -1
  2446. package/dist/to-no-case-DZm6y_Cf.cjs +0 -1
  2447. package/dist/to-no-case-DazuTIzG.js +0 -2
  2448. package/dist/to-no-case-DazuTIzG.js.map +0 -1
  2449. package/dist/to-no-case.cjs +0 -1
  2450. package/dist/to-no-case.d.cts +0 -3
  2451. package/dist/to-no-case.d.ts +0 -3
  2452. package/dist/to-no-case.js +0 -1
  2453. package/dist/to-pascal-case-Cjm8uy9M.js +0 -2
  2454. package/dist/to-pascal-case-Cjm8uy9M.js.map +0 -1
  2455. package/dist/to-pascal-case-Di24w1qQ.cjs +0 -1
  2456. package/dist/to-pascal-case-TdeM4wWD.d.ts +0 -32
  2457. package/dist/to-pascal-case-TdeM4wWD.d.ts.map +0 -1
  2458. package/dist/to-pascal-case-hd10cE4M.d.cts +0 -32
  2459. package/dist/to-pascal-case-hd10cE4M.d.cts.map +0 -1
  2460. package/dist/to-pascal-case.cjs +0 -1
  2461. package/dist/to-pascal-case.d.cts +0 -3
  2462. package/dist/to-pascal-case.d.ts +0 -3
  2463. package/dist/to-pascal-case.js +0 -1
  2464. package/dist/to-pascal-snake-case-3JOABceO.cjs +0 -1
  2465. package/dist/to-pascal-snake-case-C5Jjt7Er.d.ts +0 -31
  2466. package/dist/to-pascal-snake-case-C5Jjt7Er.d.ts.map +0 -1
  2467. package/dist/to-pascal-snake-case-DuZWwHNK.js +0 -2
  2468. package/dist/to-pascal-snake-case-DuZWwHNK.js.map +0 -1
  2469. package/dist/to-pascal-snake-case-bL7k-rIr.d.cts +0 -31
  2470. package/dist/to-pascal-snake-case-bL7k-rIr.d.cts.map +0 -1
  2471. package/dist/to-pascal-snake-case.cjs +0 -1
  2472. package/dist/to-pascal-snake-case.d.cts +0 -3
  2473. package/dist/to-pascal-snake-case.d.ts +0 -3
  2474. package/dist/to-pascal-snake-case.js +0 -1
  2475. package/dist/to-sentence-case-31yfUXQs.d.cts +0 -31
  2476. package/dist/to-sentence-case-31yfUXQs.d.cts.map +0 -1
  2477. package/dist/to-sentence-case-BzGleBYL.js +0 -2
  2478. package/dist/to-sentence-case-BzGleBYL.js.map +0 -1
  2479. package/dist/to-sentence-case-c7-rA8Uk.cjs +0 -1
  2480. package/dist/to-sentence-case-vSCr9C4o.d.ts +0 -31
  2481. package/dist/to-sentence-case-vSCr9C4o.d.ts.map +0 -1
  2482. package/dist/to-sentence-case.cjs +0 -1
  2483. package/dist/to-sentence-case.d.cts +0 -3
  2484. package/dist/to-sentence-case.d.ts +0 -3
  2485. package/dist/to-sentence-case.js +0 -1
  2486. package/dist/to-single-Bnq9l8Zp.cjs +0 -1
  2487. package/dist/to-single-bHVECPzX.js +0 -2
  2488. package/dist/to-single-bHVECPzX.js.map +0 -1
  2489. package/dist/to-snake-case-4jsaz20Q.d.ts +0 -31
  2490. package/dist/to-snake-case-4jsaz20Q.d.ts.map +0 -1
  2491. package/dist/to-snake-case-C1HTdh8M.d.cts +0 -31
  2492. package/dist/to-snake-case-C1HTdh8M.d.cts.map +0 -1
  2493. package/dist/to-snake-case-CYkfkVbX.js +0 -2
  2494. package/dist/to-snake-case-CYkfkVbX.js.map +0 -1
  2495. package/dist/to-snake-case-DlYZGTpp.cjs +0 -1
  2496. package/dist/to-string-B9YWszXY.d.ts +0 -13
  2497. package/dist/to-string-B9YWszXY.d.ts.map +0 -1
  2498. package/dist/to-string-gK5yUyfp.d.cts +0 -13
  2499. package/dist/to-string-gK5yUyfp.d.cts.map +0 -1
  2500. package/dist/to-train-case-A7o8wL1K.js +0 -2
  2501. package/dist/to-train-case-A7o8wL1K.js.map +0 -1
  2502. package/dist/to-train-case-B850iOGZ.d.cts +0 -31
  2503. package/dist/to-train-case-B850iOGZ.d.cts.map +0 -1
  2504. package/dist/to-train-case-CE2vqVsH.cjs +0 -1
  2505. package/dist/to-train-case-DMommV4G.d.ts +0 -31
  2506. package/dist/to-train-case-DMommV4G.d.ts.map +0 -1
  2507. package/dist/to-train-case.cjs +0 -1
  2508. package/dist/to-train-case.d.cts +0 -3
  2509. package/dist/to-train-case.d.ts +0 -3
  2510. package/dist/to-train-case.js +0 -1
  2511. package/dist/tuple-parts-BIyABPYv.d.cts +0 -89
  2512. package/dist/tuple-parts-BIyABPYv.d.cts.map +0 -1
  2513. package/dist/tuple-parts-Du2iVN8H.d.ts +0 -89
  2514. package/dist/tuple-parts-Du2iVN8H.d.ts.map +0 -1
  2515. package/dist/type.helpers-1V2lXyqJ.d.ts +0 -10
  2516. package/dist/type.helpers-1V2lXyqJ.d.ts.map +0 -1
  2517. package/dist/type.helpers-DRN0iRW5.cjs +0 -0
  2518. package/dist/type.helpers-Dmf6ppyq.d.cts +0 -10
  2519. package/dist/type.helpers-Dmf6ppyq.d.cts.map +0 -1
  2520. package/dist/type.helpers-eVB6l9f9.js +0 -0
  2521. package/dist/unique-BMVWEHgx.cjs +0 -1
  2522. package/dist/unique-BiGTIN5e.js +0 -2
  2523. package/dist/unique-BiGTIN5e.js.map +0 -1
  2524. package/dist/unique-DQ6D857b.d.ts +0 -39
  2525. package/dist/unique-DQ6D857b.d.ts.map +0 -1
  2526. package/dist/unique-Dlp6H7Md.d.cts +0 -39
  2527. package/dist/unique-Dlp6H7Md.d.cts.map +0 -1
  2528. package/dist/unique-by-B06g2psm.d.ts +0 -44
  2529. package/dist/unique-by-B06g2psm.d.ts.map +0 -1
  2530. package/dist/unique-by-BPYs6c1v.d.cts +0 -44
  2531. package/dist/unique-by-BPYs6c1v.d.cts.map +0 -1
  2532. package/dist/unique-by-Dh4QjQ3_.js +0 -2
  2533. package/dist/unique-by-Dh4QjQ3_.js.map +0 -1
  2534. package/dist/unique-by-Ds6Uwfxl.cjs +0 -1
  2535. package/dist/unique-with-CLhkmrmv.d.cts +0 -46
  2536. package/dist/unique-with-CLhkmrmv.d.cts.map +0 -1
  2537. package/dist/unique-with-DMT11QX0.cjs +0 -1
  2538. package/dist/unique-with-hw-xxeGX.js +0 -2
  2539. package/dist/unique-with-hw-xxeGX.js.map +0 -1
  2540. package/dist/unique-with-nNna0tkx.d.ts +0 -46
  2541. package/dist/unique-with-nNna0tkx.d.ts.map +0 -1
  2542. package/dist/upsert-prop-Dtu5xY0L.d.cts +0 -9
  2543. package/dist/upsert-prop-Dtu5xY0L.d.cts.map +0 -1
  2544. package/dist/upsert-prop-s1QJNSeE.d.ts +0 -9
  2545. package/dist/upsert-prop-s1QJNSeE.d.ts.map +0 -1
  2546. package/dist/utility-evaluators-CnQVdcZv.js +0 -2
  2547. package/dist/utility-evaluators-CnQVdcZv.js.map +0 -1
  2548. package/dist/utility-evaluators-DqJcWENu.cjs +0 -1
  2549. package/dist/values-CNsZ_qqm.js +0 -2
  2550. package/dist/values-CNsZ_qqm.js.map +0 -1
  2551. package/dist/values-Ysa_tL5c.d.cts +0 -38
  2552. package/dist/values-Ysa_tL5c.d.cts.map +0 -1
  2553. package/dist/values-cuYNPlL0.cjs +0 -1
  2554. package/dist/values-q2WIUOzl.d.ts +0 -38
  2555. package/dist/values-q2WIUOzl.d.ts.map +0 -1
  2556. package/dist/with-precision-BgF-Y_mF.cjs +0 -1
  2557. package/dist/with-precision-BoiuafbM.js +0 -2
  2558. package/dist/with-precision-BoiuafbM.js.map +0 -1
  2559. package/dist/zip-Bx1gp9g8.js +0 -2
  2560. package/dist/zip-Bx1gp9g8.js.map +0 -1
  2561. package/dist/zip-CItdS_iZ.d.ts +0 -38
  2562. package/dist/zip-CItdS_iZ.d.ts.map +0 -1
  2563. package/dist/zip-CSvsKjDN.d.cts +0 -38
  2564. package/dist/zip-CSvsKjDN.d.cts.map +0 -1
  2565. package/dist/zip-DoQHstmA.cjs +0 -1
  2566. package/dist/zip-with-BEpLRmfK.d.ts +0 -50
  2567. package/dist/zip-with-BEpLRmfK.d.ts.map +0 -1
  2568. package/dist/zip-with-CYcCKziW.d.cts +0 -50
  2569. package/dist/zip-with-CYcCKziW.d.cts.map +0 -1
  2570. package/dist/zip-with-CxR_nx2Y.cjs +0 -1
  2571. package/dist/zip-with-cxqqhe-S.js +0 -2
  2572. package/dist/zip-with-cxqqhe-S.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import{describe as e,globalExpect as t,it as n,vi as r}from"./dist-C2nNPffG.js";import{constant as i}from"./constant-DrpDXHc7.js";import{funnel as a}from"./funnel-CEbURcmp.js";import{identity as o}from"./identity-D7NWGnLw.js";import{sleep as s}from"./sleep-DvzRMgY-.js";function c(e,{timing:t,waitMs:n,maxWaitMs:r}){if(r!==void 0&&n!==void 0&&r<n)throw Error(`debounce: maxWaitMs (${r.toString()}) cannot be less than waitMs (${n.toString()})`);let i,o=a(t=>{i=e(...t)},{reducer:(e,...t)=>t,minQuietPeriodMs:n??r??0,...r!==void 0&&{maxBurstDurationMs:r},...t===`leading`?{triggerAt:`start`}:t===`both`?{triggerAt:`both`}:{triggerAt:`end`}});return{call:(...e)=>(o.call(...e),i),flush:()=>(o.flush(),i),cancel:()=>{o.cancel()},get isPending(){return!o.isIdle},get cachedValue(){return i}}}e(`main functionality`,()=>{n(`should debounce a function`,async()=>{let e=r.fn(o()),n=c(e,{waitMs:32});t([n.call(`a`),n.call(`b`),n.call(`c`)]).toStrictEqual([void 0,void 0,void 0]),t(e).toHaveBeenCalledTimes(0),await s(128),t(e).toHaveBeenCalledTimes(1),t([n.call(`d`),n.call(`e`),n.call(`f`)]).toStrictEqual([`c`,`c`,`c`]),t(e).toHaveBeenCalledTimes(1),await s(256),t(e).toHaveBeenCalledTimes(2)}),n("subsequent debounced calls return the last `func` result",async()=>{let e=c(o(),{waitMs:32});e.call(`a`),await s(64),t(e.call(`b`)).toBe(`a`),await s(128),t(e.call(`c`)).toBe(`b`)}),n("should not immediately call `func` when `wait` is `0`",async()=>{let e=r.fn(),n=c(e,{});n.call(),n.call(),t(e).toHaveBeenCalledTimes(0),await s(5),t(e).toHaveBeenCalledTimes(1)}),n(`should apply default options`,async()=>{let e=r.fn();c(e,{waitMs:32}).call(),t(e).toHaveBeenCalledTimes(0),await s(64),t(e).toHaveBeenCalledTimes(1)}),n("should support a `leading` option",async()=>{let e=r.fn(),n=r.fn(),i=c(e,{waitMs:32,timing:`leading`});i.call(),t(e).toHaveBeenCalledTimes(1);let a=c(n,{waitMs:32,timing:`both`});a.call(),a.call(),t(n).toHaveBeenCalledTimes(1),await s(64),t(n).toHaveBeenCalledTimes(2),i.call(),t(e).toHaveBeenCalledTimes(2)}),n("subsequent leading debounced calls return the last `func` result",async()=>{let e=c(o(),{waitMs:32,timing:`leading`});t([e.call(`a`),e.call(`b`)]).toStrictEqual([`a`,`a`]),await s(64),t([e.call(`c`),e.call(`d`)]).toStrictEqual([`c`,`c`])}),n("should support a `trailing` option",async()=>{let e=r.fn();c(e,{waitMs:32,timing:`trailing`}).call(),t(e).toHaveBeenCalledTimes(0),await s(64),t(e).toHaveBeenCalledTimes(1)})}),e(`optional param maxWaitMs`,()=>{n("should support a `maxWait` option",async()=>{let e=r.fn(),n=c(e,{waitMs:32,maxWaitMs:64});n.call(`a`),n.call(`b`),t(e).toHaveBeenCalledTimes(0),await s(128),t(e).toHaveBeenCalledTimes(1),n.call(`c`),n.call(`d`),t(e).toHaveBeenCalledTimes(1),await s(256),t(e).toHaveBeenCalledTimes(2)}),n("should support `maxWait` in a tight loop",async()=>{let e=r.fn(),n=r.fn(),i=c(e,{waitMs:32,maxWaitMs:128}),a=c(n,{waitMs:96}),o=Date.now();for(;Date.now()-o<320;)i.call(),a.call();await s(1),t(n).toHaveBeenCalledTimes(0),t(e).not.toHaveBeenCalledTimes(0)}),n("should queue a trailing call for subsequent debounced calls after `maxWait`",async()=>{let e=r.fn(),n=c(e,{waitMs:200,maxWaitMs:200});n.call(),setTimeout(()=>{n.call()},190),setTimeout(()=>{n.call()},200),setTimeout(()=>{n.call()},210),await s(500),t(e).toHaveBeenCalledTimes(2)}),n("should cancel `maxDelayed` when `delayed` is invoked",async()=>{let e=r.fn(),n=c(e,{waitMs:32,maxWaitMs:64});n.call(),await s(128),n.call(),t(e).toHaveBeenCalledTimes(1),await s(192),t(e).toHaveBeenCalledTimes(2)}),n(`works like a leaky bucket when only maxWaitMs is set`,async()=>{let e=r.fn(),n=c(e,{maxWaitMs:32});n.call(),t(e).toHaveBeenCalledTimes(0),await s(16),n.call(),t(e).toHaveBeenCalledTimes(0),await s(17),t(e).toHaveBeenCalledTimes(1)})}),e(`additional functionality`,()=>{n(`can cancel before the timer starts`,async()=>{let e=c(o(),{waitMs:32});t(()=>{e.cancel()}).not.toThrow(),t(e.call(`hello`)).toBeUndefined(),await s(32),t(e.call(`world`)).toBe(`hello`)}),n(`can cancel the timer`,async()=>{let e=r.fn(i(`Hello, World!`)),n=c(e,{waitMs:32});t(n.call()).toBeUndefined(),t(e).toHaveBeenCalledTimes(0),await s(1),t(n.call()).toBeUndefined(),t(e).toHaveBeenCalledTimes(0),n.cancel(),await s(32),t(n.call()).toBeUndefined(),t(e).toHaveBeenCalledTimes(0),await s(32),t(n.call()).toBe(`Hello, World!`),t(e).toHaveBeenCalledTimes(1)}),n(`can cancel after the timer ends`,async()=>{let e=c(o(),{waitMs:32});t(e.call(`hello`)).toBeUndefined(),await s(32),t(e.call(`world`)).toBe(`hello`),t(()=>{e.cancel()}).not.toThrow()}),n(`can cancel maxWait timer`,async()=>{let e=c(o(),{waitMs:16,maxWaitMs:32});t(e.call(`hello`)).toBeUndefined(),await s(1),e.cancel(),await s(32),t(e.call(`world`)).toBeUndefined()}),n(`can return a cached value`,()=>{let e=c(o(),{timing:`leading`,waitMs:32});t(e.cachedValue).toBeUndefined(),t(e.call(`hello`)).toBe(`hello`),t(e.cachedValue).toBe(`hello`)}),n(`can check for inflight timers (trailing)`,async()=>{let e=c(o(),{waitMs:32});t(e.isPending).toBe(!1),t(e.call(`hello`)).toBeUndefined(),t(e.isPending).toBe(!0),await s(1),t(e.isPending).toBe(!0),await s(32),t(e.isPending).toBe(!1)}),n(`can check for inflight timers (leading)`,async()=>{let e=c(o(),{timing:`leading`,waitMs:32});t(e.isPending).toBe(!1),t(e.call(`hello`)).toBe(`hello`),t(e.isPending).toBe(!0),await s(1),t(e.isPending).toBe(!0),await s(32),t(e.isPending).toBe(!1)}),n(`can flush before a cool-down`,async()=>{let e=c(o(),{waitMs:32});t(e.flush()).toBeUndefined(),t(e.call(`hello`)).toBeUndefined(),await s(32),t(e.call(`world`)).toBe(`hello`)}),n(`can flush during a cool-down`,async()=>{let e=c(o(),{waitMs:32});t(e.call(`hello`)).toBeUndefined(),await s(1),t(e.call(`world`)).toBeUndefined(),await s(1),t(e.flush()).toBe(`world`)}),n(`can flush after a cool-down`,async()=>{let e=c(o(),{waitMs:32});t(e.call(`hello`)).toBeUndefined(),await s(32),t(e.flush()).toBe(`hello`)})}),e(`errors`,()=>{n(`prevents maxWaitMs to be less then waitMs`,()=>{t(()=>c(o(),{waitMs:32,maxWaitMs:16})).toThrow(`debounce: maxWaitMs (16) cannot be less than waitMs (32)`)})});
1
+ import{constant as e}from"./constant.js";import{a as t,i as n,n as r,r as i}from"./dist-Bd1vawFi.js";import{funnel as a}from"./funnel.js";import{identity as o}from"./identity.js";import{sleep as s}from"./sleep.js";function c(e,{timing:t,waitMs:n,maxWaitMs:r}){if(r!==void 0&&n!==void 0&&r<n)throw Error(`debounce: maxWaitMs (${r.toString()}) cannot be less than waitMs (${n.toString()})`);let i,o=a(t=>{i=e(...t)},{reducer:(e,...t)=>t,minQuietPeriodMs:n??r??0,...r!==void 0&&{maxBurstDurationMs:r},...t===`leading`?{triggerAt:`start`}:t===`both`?{triggerAt:`both`}:{triggerAt:`end`}});return{call:(...e)=>(o.call(...e),i),flush:()=>(o.flush(),i),cancel:()=>{o.cancel()},get isPending(){return!o.isIdle},get cachedValue(){return i}}}n(`main functionality`,()=>{t(`should debounce a function`,async()=>{let e=i.fn(o()),t=c(e,{waitMs:32});r([t.call(`a`),t.call(`b`),t.call(`c`)]).toStrictEqual([void 0,void 0,void 0]),r(e).toHaveBeenCalledTimes(0),await s(128),r(e).toHaveBeenCalledTimes(1),r([t.call(`d`),t.call(`e`),t.call(`f`)]).toStrictEqual([`c`,`c`,`c`]),r(e).toHaveBeenCalledTimes(1),await s(256),r(e).toHaveBeenCalledTimes(2)}),t("subsequent debounced calls return the last `func` result",async()=>{let e=c(o(),{waitMs:32});e.call(`a`),await s(64),r(e.call(`b`)).toBe(`a`),await s(128),r(e.call(`c`)).toBe(`b`)}),t("should not immediately call `func` when `wait` is `0`",async()=>{let e=i.fn(),t=c(e,{});t.call(),t.call(),r(e).toHaveBeenCalledTimes(0),await s(5),r(e).toHaveBeenCalledTimes(1)}),t(`should apply default options`,async()=>{let e=i.fn();c(e,{waitMs:32}).call(),r(e).toHaveBeenCalledTimes(0),await s(64),r(e).toHaveBeenCalledTimes(1)}),t("should support a `leading` option",async()=>{let e=i.fn(),t=i.fn(),n=c(e,{waitMs:32,timing:`leading`});n.call(),r(e).toHaveBeenCalledTimes(1);let a=c(t,{waitMs:32,timing:`both`});a.call(),a.call(),r(t).toHaveBeenCalledTimes(1),await s(64),r(t).toHaveBeenCalledTimes(2),n.call(),r(e).toHaveBeenCalledTimes(2)}),t("subsequent leading debounced calls return the last `func` result",async()=>{let e=c(o(),{waitMs:32,timing:`leading`});r([e.call(`a`),e.call(`b`)]).toStrictEqual([`a`,`a`]),await s(64),r([e.call(`c`),e.call(`d`)]).toStrictEqual([`c`,`c`])}),t("should support a `trailing` option",async()=>{let e=i.fn();c(e,{waitMs:32,timing:`trailing`}).call(),r(e).toHaveBeenCalledTimes(0),await s(64),r(e).toHaveBeenCalledTimes(1)})}),n(`optional param maxWaitMs`,()=>{t("should support a `maxWait` option",async()=>{let e=i.fn(),t=c(e,{waitMs:32,maxWaitMs:64});t.call(`a`),t.call(`b`),r(e).toHaveBeenCalledTimes(0),await s(128),r(e).toHaveBeenCalledTimes(1),t.call(`c`),t.call(`d`),r(e).toHaveBeenCalledTimes(1),await s(256),r(e).toHaveBeenCalledTimes(2)}),t("should support `maxWait` in a tight loop",async()=>{let e=i.fn(),t=i.fn(),n=c(e,{waitMs:32,maxWaitMs:128}),a=c(t,{waitMs:96}),o=Date.now();for(;Date.now()-o<320;)n.call(),a.call();await s(1),r(t).toHaveBeenCalledTimes(0),r(e).not.toHaveBeenCalledTimes(0)}),t("should queue a trailing call for subsequent debounced calls after `maxWait`",async()=>{let e=i.fn(),t=c(e,{waitMs:200,maxWaitMs:200});t.call(),setTimeout(()=>{t.call()},190),setTimeout(()=>{t.call()},200),setTimeout(()=>{t.call()},210),await s(500),r(e).toHaveBeenCalledTimes(2)}),t("should cancel `maxDelayed` when `delayed` is invoked",async()=>{let e=i.fn(),t=c(e,{waitMs:32,maxWaitMs:64});t.call(),await s(128),t.call(),r(e).toHaveBeenCalledTimes(1),await s(192),r(e).toHaveBeenCalledTimes(2)}),t(`works like a leaky bucket when only maxWaitMs is set`,async()=>{let e=i.fn(),t=c(e,{maxWaitMs:32});t.call(),r(e).toHaveBeenCalledTimes(0),await s(16),t.call(),r(e).toHaveBeenCalledTimes(0),await s(17),r(e).toHaveBeenCalledTimes(1)})}),n(`additional functionality`,()=>{t(`can cancel before the timer starts`,async()=>{let e=c(o(),{waitMs:32});r(()=>{e.cancel()}).not.toThrowError(),r(e.call(`hello`)).toBeUndefined(),await s(32),r(e.call(`world`)).toBe(`hello`)}),t(`can cancel the timer`,async()=>{let t=i.fn(e(`Hello, World!`)),n=c(t,{waitMs:32});r(n.call()).toBeUndefined(),r(t).toHaveBeenCalledTimes(0),await s(1),r(n.call()).toBeUndefined(),r(t).toHaveBeenCalledTimes(0),n.cancel(),await s(32),r(n.call()).toBeUndefined(),r(t).toHaveBeenCalledTimes(0),await s(32),r(n.call()).toBe(`Hello, World!`),r(t).toHaveBeenCalledTimes(1)}),t(`can cancel after the timer ends`,async()=>{let e=c(o(),{waitMs:32});r(e.call(`hello`)).toBeUndefined(),await s(32),r(e.call(`world`)).toBe(`hello`),r(()=>{e.cancel()}).not.toThrowError()}),t(`can cancel maxWait timer`,async()=>{let e=c(o(),{waitMs:16,maxWaitMs:32});r(e.call(`hello`)).toBeUndefined(),await s(1),e.cancel(),await s(32),r(e.call(`world`)).toBeUndefined()}),t(`can return a cached value`,()=>{let e=c(o(),{timing:`leading`,waitMs:32});r(e.cachedValue).toBeUndefined(),r(e.call(`hello`)).toBe(`hello`),r(e.cachedValue).toBe(`hello`)}),t(`can check for inflight timers (trailing)`,async()=>{let e=c(o(),{waitMs:32});r(e.isPending).toBe(!1),r(e.call(`hello`)).toBeUndefined(),r(e.isPending).toBe(!0),await s(1),r(e.isPending).toBe(!0),await s(32),r(e.isPending).toBe(!1)}),t(`can check for inflight timers (leading)`,async()=>{let e=c(o(),{timing:`leading`,waitMs:32});r(e.isPending).toBe(!1),r(e.call(`hello`)).toBe(`hello`),r(e.isPending).toBe(!0),await s(1),r(e.isPending).toBe(!0),await s(32),r(e.isPending).toBe(!1)}),t(`can flush before a cool-down`,async()=>{let e=c(o(),{waitMs:32});r(e.flush()).toBeUndefined(),r(e.call(`hello`)).toBeUndefined(),await s(32),r(e.call(`world`)).toBe(`hello`)}),t(`can flush during a cool-down`,async()=>{let e=c(o(),{waitMs:32});r(e.call(`hello`)).toBeUndefined(),await s(1),r(e.call(`world`)).toBeUndefined(),await s(1),r(e.flush()).toBe(`world`)}),t(`can flush after a cool-down`,async()=>{let e=c(o(),{waitMs:32});r(e.call(`hello`)).toBeUndefined(),await s(32),r(e.flush()).toBe(`hello`)})}),n(`errors`,()=>{t(`prevents maxWaitMs to be less then waitMs`,()=>{r(()=>c(o(),{waitMs:32,maxWaitMs:16})).toThrowError(`debounce: maxWaitMs (16) cannot be less than waitMs (32)`)})});
2
2
  //# sourceMappingURL=funnel.perkakas-debounce.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"funnel.perkakas-debounce.test.js","names":["cachedValue: ReturnType<F> | undefined"],"sources":["../src/funnel.perkakas-debounce.test.ts"],"sourcesContent":["/* eslint-disable function-paren-newline, no-nested-ternary, ts/explicit-function-return-type, ts/no-explicit-any --\n * These aren't useful for a reference implementation!\n */\n\nimport { describe, expect, it, vi } from 'vitest';\nimport { constant } from './constant';\nimport { funnel } from './funnel';\nimport { identity } from './identity';\nimport { sleep } from './sleep';\n\ninterface Debouncer<\n F extends (...args: any) => unknown,\n IsNullable extends boolean = true,\n> {\n readonly call: (\n ...args: Parameters<F>\n ) => ReturnType<F> | (true extends IsNullable ? undefined : never);\n readonly cancel: () => void;\n readonly flush: () => ReturnType<F> | undefined;\n readonly isPending: boolean;\n readonly cachedValue: ReturnType<F> | undefined;\n}\n\ninterface DebounceOptions {\n readonly waitMs?: number;\n readonly maxWaitMs?: number;\n}\n\n/**\n * A reference implementation of the now deprecated `debounce` function using\n * the `funnel` function instead. While you update your codebase you can copy\n * this function as-is and use it as a drop-in replacement; but we recommend\n * eventually inlining the call to `funnel` so you can adjust the function to\n * your specific needs.\n *\n * The following tests in this file are the original tests for debounce.\n *\n * @see debounce\n */\nfunction debounce<F extends (...args: any) => any>(\n func: F,\n options: DebounceOptions & { readonly timing?: 'trailing' },\n): Debouncer<F>;\nfunction debounce<F extends (...args: any) => any>(\n func: F,\n options:\n | (DebounceOptions & { readonly timing: 'both' })\n | (Omit<DebounceOptions, 'maxWaitMs'> & { readonly timing: 'leading' }),\n): Debouncer<F, false>;\nfunction debounce<F extends (...args: any) => any>(\n func: F,\n {\n timing,\n waitMs,\n maxWaitMs,\n }: DebounceOptions & {\n readonly timing?: 'both' | 'leading' | 'trailing';\n },\n) {\n if (maxWaitMs !== undefined && waitMs !== undefined && maxWaitMs < waitMs) {\n throw new Error(\n `debounce: maxWaitMs (${maxWaitMs.toString()}) cannot be less than waitMs (${waitMs.toString()})`,\n );\n }\n\n let cachedValue: ReturnType<F> | undefined;\n\n const debouncingFunnel = funnel(\n (args: Parameters<F>) => {\n // Every time the function is invoked the cached value is updated.\n cachedValue = func(...args) as ReturnType<F>;\n },\n {\n // Debounce stores the latest args it was called with for the next invocation of the callback.\n reducer: (_, ...args: Parameters<F>) => args,\n minQuietPeriodMs: waitMs ?? maxWaitMs ?? 0,\n ...(maxWaitMs !== undefined && { maxBurstDurationMs: maxWaitMs }),\n ...(timing === 'leading'\n ? { triggerAt: 'start' }\n : timing === 'both'\n ? { triggerAt: 'both' }\n : { triggerAt: 'end' }),\n },\n );\n\n return {\n call: (...args: Parameters<F>) => {\n debouncingFunnel.call(...args);\n return cachedValue;\n },\n\n flush: () => {\n debouncingFunnel.flush();\n return cachedValue;\n },\n\n cancel: () => {\n debouncingFunnel.cancel();\n },\n\n get isPending() {\n return !debouncingFunnel.isIdle;\n },\n\n get cachedValue() {\n return cachedValue;\n },\n };\n}\n\ndescribe('main functionality', () => {\n it('should debounce a function', async () => {\n const mockFn = vi.fn<(x: string) => string>(identity());\n const debouncer = debounce(mockFn, { waitMs: 32 });\n\n expect([\n debouncer.call('a'),\n debouncer.call('b'),\n debouncer.call('c'),\n ]).toStrictEqual([undefined, undefined, undefined]);\n expect(mockFn).toHaveBeenCalledTimes(0);\n\n await sleep(128);\n\n expect(mockFn).toHaveBeenCalledTimes(1);\n expect([\n debouncer.call('d'),\n debouncer.call('e'),\n debouncer.call('f'),\n ]).toStrictEqual(['c', 'c', 'c']);\n expect(mockFn).toHaveBeenCalledTimes(1);\n\n await sleep(256);\n\n expect(mockFn).toHaveBeenCalledTimes(2);\n });\n\n it('subsequent debounced calls return the last `func` result', async () => {\n const debouncer = debounce(identity(), { waitMs: 32 });\n debouncer.call('a');\n await sleep(64);\n\n expect(debouncer.call('b')).toBe('a');\n\n await sleep(128);\n\n expect(debouncer.call('c')).toBe('b');\n });\n\n it('should not immediately call `func` when `wait` is `0`', async () => {\n const mockFn = vi.fn<() => void>();\n const debouncer = debounce(mockFn, {});\n debouncer.call();\n debouncer.call();\n\n expect(mockFn).toHaveBeenCalledTimes(0);\n\n await sleep(5);\n\n expect(mockFn).toHaveBeenCalledTimes(1);\n });\n\n it('should apply default options', async () => {\n const mockFn = vi.fn<() => void>();\n const debouncer = debounce(mockFn, { waitMs: 32 });\n debouncer.call();\n\n expect(mockFn).toHaveBeenCalledTimes(0);\n\n await sleep(64);\n\n expect(mockFn).toHaveBeenCalledTimes(1);\n });\n\n it('should support a `leading` option', async () => {\n const leadingMockFn = vi.fn<() => void>();\n const bothMockFn = vi.fn<() => void>();\n const withLeading = debounce(leadingMockFn, {\n waitMs: 32,\n timing: 'leading',\n });\n withLeading.call();\n\n expect(leadingMockFn).toHaveBeenCalledTimes(1);\n\n const withLeadingAndTrailing = debounce(bothMockFn, {\n waitMs: 32,\n timing: 'both',\n });\n withLeadingAndTrailing.call();\n withLeadingAndTrailing.call();\n\n expect(bothMockFn).toHaveBeenCalledTimes(1);\n\n await sleep(64);\n\n expect(bothMockFn).toHaveBeenCalledTimes(2);\n\n withLeading.call();\n\n expect(leadingMockFn).toHaveBeenCalledTimes(2);\n });\n\n it('subsequent leading debounced calls return the last `func` result', async () => {\n const debouncer = debounce(identity(), { waitMs: 32, timing: 'leading' });\n\n expect([debouncer.call('a'), debouncer.call('b')]).toStrictEqual([\n 'a',\n 'a',\n ]);\n\n await sleep(64);\n\n expect([debouncer.call('c'), debouncer.call('d')]).toStrictEqual([\n 'c',\n 'c',\n ]);\n });\n\n it('should support a `trailing` option', async () => {\n const mockFn = vi.fn<() => void>();\n const withTrailing = debounce(mockFn, { waitMs: 32, timing: 'trailing' });\n withTrailing.call();\n\n expect(mockFn).toHaveBeenCalledTimes(0);\n\n await sleep(64);\n\n expect(mockFn).toHaveBeenCalledTimes(1);\n });\n});\n\ndescribe('optional param maxWaitMs', () => {\n it('should support a `maxWait` option', async () => {\n const mockFn = vi.fn<(x: string) => void>();\n const debouncer = debounce(mockFn, { waitMs: 32, maxWaitMs: 64 });\n debouncer.call('a');\n debouncer.call('b');\n\n expect(mockFn).toHaveBeenCalledTimes(0);\n\n await sleep(128);\n\n expect(mockFn).toHaveBeenCalledTimes(1);\n\n debouncer.call('c');\n debouncer.call('d');\n\n expect(mockFn).toHaveBeenCalledTimes(1);\n\n await sleep(256);\n\n expect(mockFn).toHaveBeenCalledTimes(2);\n });\n\n it('should support `maxWait` in a tight loop', async () => {\n const withMockFn = vi.fn<() => void>();\n const withoutMockFn = vi.fn<() => void>();\n const withMaxWait = debounce(withMockFn, { waitMs: 32, maxWaitMs: 128 });\n const withoutMaxWait = debounce(withoutMockFn, { waitMs: 96 });\n const start = Date.now();\n while (Date.now() - start < 320) {\n withMaxWait.call();\n withoutMaxWait.call();\n }\n await sleep(1);\n\n expect(withoutMockFn).toHaveBeenCalledTimes(0);\n expect(withMockFn).not.toHaveBeenCalledTimes(0);\n });\n\n it('should queue a trailing call for subsequent debounced calls after `maxWait`', async () => {\n const mockFn = vi.fn<() => void>();\n const debouncer = debounce(mockFn, { waitMs: 200, maxWaitMs: 200 });\n debouncer.call();\n setTimeout(() => {\n debouncer.call();\n }, 190);\n setTimeout(() => {\n debouncer.call();\n }, 200);\n setTimeout(() => {\n debouncer.call();\n }, 210);\n await sleep(500);\n\n expect(mockFn).toHaveBeenCalledTimes(2);\n });\n\n it('should cancel `maxDelayed` when `delayed` is invoked', async () => {\n const mockFn = vi.fn<() => void>();\n const debouncer = debounce(mockFn, { waitMs: 32, maxWaitMs: 64 });\n debouncer.call();\n await sleep(128);\n debouncer.call();\n\n expect(mockFn).toHaveBeenCalledTimes(1);\n\n await sleep(192);\n\n expect(mockFn).toHaveBeenCalledTimes(2);\n });\n\n it('works like a leaky bucket when only maxWaitMs is set', async () => {\n const mockFn = vi.fn<() => void>();\n const debouncer = debounce(mockFn, { maxWaitMs: 32 });\n debouncer.call();\n\n expect(mockFn).toHaveBeenCalledTimes(0);\n\n await sleep(16);\n // Without maxWaitMs this call would cause the actual invocation to be\n // postponed for a full window.\n debouncer.call();\n\n expect(mockFn).toHaveBeenCalledTimes(0);\n\n await sleep(17);\n\n expect(mockFn).toHaveBeenCalledTimes(1);\n });\n});\n\ndescribe('additional functionality', () => {\n it('can cancel before the timer starts', async () => {\n const debouncer = debounce(identity(), { waitMs: 32 });\n\n expect(() => {\n debouncer.cancel();\n }).not.toThrow();\n expect(debouncer.call('hello')).toBeUndefined();\n\n await sleep(32);\n\n expect(debouncer.call('world')).toBe('hello');\n });\n\n it('can cancel the timer', async () => {\n const mockFn = vi.fn<() => string>(constant('Hello, World!'));\n const debouncer = debounce(mockFn, { waitMs: 32 });\n\n expect(debouncer.call()).toBeUndefined();\n expect(mockFn).toHaveBeenCalledTimes(0);\n\n await sleep(1);\n\n expect(debouncer.call()).toBeUndefined();\n expect(mockFn).toHaveBeenCalledTimes(0);\n\n debouncer.cancel();\n await sleep(32);\n\n expect(debouncer.call()).toBeUndefined();\n expect(mockFn).toHaveBeenCalledTimes(0);\n\n await sleep(32);\n\n expect(debouncer.call()).toBe('Hello, World!');\n expect(mockFn).toHaveBeenCalledTimes(1);\n });\n\n it('can cancel after the timer ends', async () => {\n const debouncer = debounce(identity(), { waitMs: 32 });\n\n expect(debouncer.call('hello')).toBeUndefined();\n\n await sleep(32);\n\n expect(debouncer.call('world')).toBe('hello');\n expect(() => {\n debouncer.cancel();\n }).not.toThrow();\n });\n\n it('can cancel maxWait timer', async () => {\n const debouncer = debounce(identity(), { waitMs: 16, maxWaitMs: 32 });\n\n expect(debouncer.call('hello')).toBeUndefined();\n\n await sleep(1);\n debouncer.cancel();\n await sleep(32);\n\n expect(debouncer.call('world')).toBeUndefined();\n });\n\n it('can return a cached value', () => {\n const debouncer = debounce(identity(), { timing: 'leading', waitMs: 32 });\n\n expect(debouncer.cachedValue).toBeUndefined();\n expect(debouncer.call('hello')).toBe('hello');\n expect(debouncer.cachedValue).toBe('hello');\n });\n\n it('can check for inflight timers (trailing)', async () => {\n const debouncer = debounce(identity(), { waitMs: 32 });\n\n expect(debouncer.isPending).toBe(false);\n expect(debouncer.call('hello')).toBeUndefined();\n expect(debouncer.isPending).toBe(true);\n\n await sleep(1);\n\n expect(debouncer.isPending).toBe(true);\n\n await sleep(32);\n\n expect(debouncer.isPending).toBe(false);\n });\n\n it('can check for inflight timers (leading)', async () => {\n const debouncer = debounce(identity(), { timing: 'leading', waitMs: 32 });\n\n expect(debouncer.isPending).toBe(false);\n expect(debouncer.call('hello')).toBe('hello');\n expect(debouncer.isPending).toBe(true);\n\n await sleep(1);\n\n expect(debouncer.isPending).toBe(true);\n\n await sleep(32);\n\n expect(debouncer.isPending).toBe(false);\n });\n\n it('can flush before a cool-down', async () => {\n const debouncer = debounce(identity(), { waitMs: 32 });\n\n expect(debouncer.flush()).toBeUndefined();\n expect(debouncer.call('hello')).toBeUndefined();\n\n await sleep(32);\n\n expect(debouncer.call('world')).toBe('hello');\n });\n\n it('can flush during a cool-down', async () => {\n const debouncer = debounce(identity(), { waitMs: 32 });\n\n expect(debouncer.call('hello')).toBeUndefined();\n\n await sleep(1);\n\n expect(debouncer.call('world')).toBeUndefined();\n\n await sleep(1);\n\n expect(debouncer.flush()).toBe('world');\n });\n\n it('can flush after a cool-down', async () => {\n const debouncer = debounce(identity(), { waitMs: 32 });\n\n expect(debouncer.call('hello')).toBeUndefined();\n\n await sleep(32);\n\n expect(debouncer.flush()).toBe('hello');\n });\n});\n\ndescribe('errors', () => {\n it('prevents maxWaitMs to be less then waitMs', () => {\n expect(() => debounce(identity(), { waitMs: 32, maxWaitMs: 16 })).toThrow(\n 'debounce: maxWaitMs (16) cannot be less than waitMs (32)',\n );\n });\n});\n"],"mappings":"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"}
1
+ {"version":3,"file":"funnel.perkakas-debounce.test.js","names":["cachedValue: ReturnType<F> | undefined"],"sources":["../src/funnel.perkakas-debounce.test.ts"],"sourcesContent":["/* eslint-disable no-nested-ternary, ts/explicit-function-return-type --\n * These aren't useful for a reference implementation!\n */\n\nimport type { StrictFunction } from './internal/types/strict-function';\nimport { describe, expect, it, vi } from 'vitest';\nimport { constant } from './constant';\nimport { funnel } from './funnel';\nimport { identity } from './identity';\nimport { sleep } from './sleep';\n\ninterface Debouncer<F extends StrictFunction, IsNullable extends boolean = true> {\n readonly call: (\n ...args: Parameters<F>\n ) => ReturnType<F> | (true extends IsNullable ? undefined : never);\n readonly cancel: () => void;\n readonly flush: () => ReturnType<F> | undefined;\n readonly isPending: boolean;\n readonly cachedValue: ReturnType<F> | undefined;\n}\n\ninterface DebounceOptions {\n readonly waitMs?: number;\n readonly maxWaitMs?: number;\n}\n\n/**\n * A reference implementation of the now deprecated `debounce` function using\n * the `funnel` function instead. While you update your codebase you can copy\n * this function as-is and use it as a drop-in replacement; but we recommend\n * eventually inlining the call to `funnel` so you can adjust the function to\n * your specific needs.\n *\n * The following tests in this file are the original tests for debounce.\n *\n * @see debounce\n */\nfunction debounce<F extends StrictFunction>(\n func: F,\n options: DebounceOptions & { readonly timing?: 'trailing' },\n): Debouncer<F>;\nfunction debounce<F extends StrictFunction>(\n func: F,\n options:\n | (DebounceOptions & { readonly timing: 'both' })\n | (Omit<DebounceOptions, 'maxWaitMs'> & { readonly timing: 'leading' }),\n): Debouncer<F, false>;\nfunction debounce<F extends StrictFunction>(\n func: F,\n {\n timing,\n waitMs,\n maxWaitMs,\n }: DebounceOptions & {\n readonly timing?: 'both' | 'leading' | 'trailing';\n },\n) {\n if (maxWaitMs !== undefined && waitMs !== undefined && maxWaitMs < waitMs) {\n throw new Error(\n `debounce: maxWaitMs (${maxWaitMs.toString()}) cannot be less than waitMs (${waitMs.toString()})`,\n );\n }\n\n let cachedValue: ReturnType<F> | undefined;\n\n const debouncingFunnel = funnel(\n (args: Parameters<F>) => {\n // @ts-expect-error [ts2345, ts2322] -- TypeScript infers the generic sub-\n // types too eagerly, making itself blind to the fact that the types\n // match here.\n cachedValue = func(...args) as ReturnType<F>;\n },\n {\n // Debounce stores the latest args it was called with for the next invocation of the callback.\n reducer: (_, ...args: Parameters<F>) => args,\n minQuietPeriodMs: waitMs ?? maxWaitMs ?? 0,\n ...(maxWaitMs !== undefined && { maxBurstDurationMs: maxWaitMs }),\n ...(timing === 'leading'\n ? { triggerAt: 'start' }\n : timing === 'both'\n ? { triggerAt: 'both' }\n : { triggerAt: 'end' }),\n },\n );\n\n return {\n call: (...args: Parameters<F>) => {\n debouncingFunnel.call(...args);\n return cachedValue;\n },\n\n flush: () => {\n debouncingFunnel.flush();\n return cachedValue;\n },\n\n cancel: () => {\n debouncingFunnel.cancel();\n },\n\n get isPending() {\n return !debouncingFunnel.isIdle;\n },\n\n get cachedValue() {\n return cachedValue;\n },\n };\n}\n\ndescribe('main functionality', () => {\n it('should debounce a function', async () => {\n const mockFn = vi.fn<(x: string) => string>(identity());\n const debouncer = debounce(mockFn, { waitMs: 32 });\n\n expect([\n debouncer.call('a'),\n debouncer.call('b'),\n debouncer.call('c'),\n ]).toStrictEqual([undefined, undefined, undefined]);\n expect(mockFn).toHaveBeenCalledTimes(0);\n\n await sleep(128);\n\n expect(mockFn).toHaveBeenCalledTimes(1);\n expect([\n debouncer.call('d'),\n debouncer.call('e'),\n debouncer.call('f'),\n ]).toStrictEqual(['c', 'c', 'c']);\n expect(mockFn).toHaveBeenCalledTimes(1);\n\n await sleep(256);\n\n expect(mockFn).toHaveBeenCalledTimes(2);\n });\n\n it('subsequent debounced calls return the last `func` result', async () => {\n const debouncer = debounce(identity(), { waitMs: 32 });\n debouncer.call('a');\n await sleep(64);\n\n expect(debouncer.call('b')).toBe('a');\n\n await sleep(128);\n\n expect(debouncer.call('c')).toBe('b');\n });\n\n it('should not immediately call `func` when `wait` is `0`', async () => {\n const mockFn = vi.fn<() => void>();\n const debouncer = debounce(mockFn, {});\n debouncer.call();\n debouncer.call();\n\n expect(mockFn).toHaveBeenCalledTimes(0);\n\n await sleep(5);\n\n expect(mockFn).toHaveBeenCalledTimes(1);\n });\n\n it('should apply default options', async () => {\n const mockFn = vi.fn<() => void>();\n const debouncer = debounce(mockFn, { waitMs: 32 });\n debouncer.call();\n\n expect(mockFn).toHaveBeenCalledTimes(0);\n\n await sleep(64);\n\n expect(mockFn).toHaveBeenCalledTimes(1);\n });\n\n it('should support a `leading` option', async () => {\n const leadingMockFn = vi.fn<() => void>();\n const bothMockFn = vi.fn<() => void>();\n const withLeading = debounce(leadingMockFn, {\n waitMs: 32,\n timing: 'leading',\n });\n withLeading.call();\n\n expect(leadingMockFn).toHaveBeenCalledTimes(1);\n\n const withLeadingAndTrailing = debounce(bothMockFn, {\n waitMs: 32,\n timing: 'both',\n });\n withLeadingAndTrailing.call();\n withLeadingAndTrailing.call();\n\n expect(bothMockFn).toHaveBeenCalledTimes(1);\n\n await sleep(64);\n\n expect(bothMockFn).toHaveBeenCalledTimes(2);\n\n withLeading.call();\n\n expect(leadingMockFn).toHaveBeenCalledTimes(2);\n });\n\n it('subsequent leading debounced calls return the last `func` result', async () => {\n const debouncer = debounce(identity(), { waitMs: 32, timing: 'leading' });\n\n expect([debouncer.call('a'), debouncer.call('b')]).toStrictEqual([\n 'a',\n 'a',\n ]);\n\n await sleep(64);\n\n expect([debouncer.call('c'), debouncer.call('d')]).toStrictEqual([\n 'c',\n 'c',\n ]);\n });\n\n it('should support a `trailing` option', async () => {\n const mockFn = vi.fn<() => void>();\n const withTrailing = debounce(mockFn, { waitMs: 32, timing: 'trailing' });\n withTrailing.call();\n\n expect(mockFn).toHaveBeenCalledTimes(0);\n\n await sleep(64);\n\n expect(mockFn).toHaveBeenCalledTimes(1);\n });\n});\n\ndescribe('optional param maxWaitMs', () => {\n it('should support a `maxWait` option', async () => {\n const mockFn = vi.fn<(x: string) => void>();\n const debouncer = debounce(mockFn, { waitMs: 32, maxWaitMs: 64 });\n debouncer.call('a');\n debouncer.call('b');\n\n expect(mockFn).toHaveBeenCalledTimes(0);\n\n await sleep(128);\n\n expect(mockFn).toHaveBeenCalledTimes(1);\n\n debouncer.call('c');\n debouncer.call('d');\n\n expect(mockFn).toHaveBeenCalledTimes(1);\n\n await sleep(256);\n\n expect(mockFn).toHaveBeenCalledTimes(2);\n });\n\n it('should support `maxWait` in a tight loop', async () => {\n const withMockFn = vi.fn<() => void>();\n const withoutMockFn = vi.fn<() => void>();\n const withMaxWait = debounce(withMockFn, { waitMs: 32, maxWaitMs: 128 });\n const withoutMaxWait = debounce(withoutMockFn, { waitMs: 96 });\n const start = Date.now();\n while (Date.now() - start < 320) {\n withMaxWait.call();\n withoutMaxWait.call();\n }\n await sleep(1);\n\n expect(withoutMockFn).toHaveBeenCalledTimes(0);\n expect(withMockFn).not.toHaveBeenCalledTimes(0);\n });\n\n it('should queue a trailing call for subsequent debounced calls after `maxWait`', async () => {\n const mockFn = vi.fn<() => void>();\n const debouncer = debounce(mockFn, { waitMs: 200, maxWaitMs: 200 });\n debouncer.call();\n setTimeout(() => {\n debouncer.call();\n }, 190);\n setTimeout(() => {\n debouncer.call();\n }, 200);\n setTimeout(() => {\n debouncer.call();\n }, 210);\n await sleep(500);\n\n expect(mockFn).toHaveBeenCalledTimes(2);\n });\n\n it('should cancel `maxDelayed` when `delayed` is invoked', async () => {\n const mockFn = vi.fn<() => void>();\n const debouncer = debounce(mockFn, { waitMs: 32, maxWaitMs: 64 });\n debouncer.call();\n await sleep(128);\n debouncer.call();\n\n expect(mockFn).toHaveBeenCalledTimes(1);\n\n await sleep(192);\n\n expect(mockFn).toHaveBeenCalledTimes(2);\n });\n\n it('works like a leaky bucket when only maxWaitMs is set', async () => {\n const mockFn = vi.fn<() => void>();\n const debouncer = debounce(mockFn, { maxWaitMs: 32 });\n debouncer.call();\n\n expect(mockFn).toHaveBeenCalledTimes(0);\n\n await sleep(16);\n // Without maxWaitMs this call would cause the actual invocation to be\n // postponed for a full window.\n debouncer.call();\n\n expect(mockFn).toHaveBeenCalledTimes(0);\n\n await sleep(17);\n\n expect(mockFn).toHaveBeenCalledTimes(1);\n });\n});\n\ndescribe('additional functionality', () => {\n it('can cancel before the timer starts', async () => {\n const debouncer = debounce(identity(), { waitMs: 32 });\n\n expect(() => {\n debouncer.cancel();\n }).not.toThrowError();\n expect(debouncer.call('hello')).toBeUndefined();\n\n await sleep(32);\n\n expect(debouncer.call('world')).toBe('hello');\n });\n\n it('can cancel the timer', async () => {\n const mockFn = vi.fn<() => string>(constant('Hello, World!'));\n const debouncer = debounce(mockFn, { waitMs: 32 });\n\n expect(debouncer.call()).toBeUndefined();\n expect(mockFn).toHaveBeenCalledTimes(0);\n\n await sleep(1);\n\n expect(debouncer.call()).toBeUndefined();\n expect(mockFn).toHaveBeenCalledTimes(0);\n\n debouncer.cancel();\n await sleep(32);\n\n expect(debouncer.call()).toBeUndefined();\n expect(mockFn).toHaveBeenCalledTimes(0);\n\n await sleep(32);\n\n expect(debouncer.call()).toBe('Hello, World!');\n expect(mockFn).toHaveBeenCalledTimes(1);\n });\n\n it('can cancel after the timer ends', async () => {\n const debouncer = debounce(identity(), { waitMs: 32 });\n\n expect(debouncer.call('hello')).toBeUndefined();\n\n await sleep(32);\n\n expect(debouncer.call('world')).toBe('hello');\n expect(() => {\n debouncer.cancel();\n }).not.toThrowError();\n });\n\n it('can cancel maxWait timer', async () => {\n const debouncer = debounce(identity(), { waitMs: 16, maxWaitMs: 32 });\n\n expect(debouncer.call('hello')).toBeUndefined();\n\n await sleep(1);\n debouncer.cancel();\n await sleep(32);\n\n expect(debouncer.call('world')).toBeUndefined();\n });\n\n it('can return a cached value', () => {\n const debouncer = debounce(identity(), { timing: 'leading', waitMs: 32 });\n\n expect(debouncer.cachedValue).toBeUndefined();\n expect(debouncer.call('hello')).toBe('hello');\n expect(debouncer.cachedValue).toBe('hello');\n });\n\n it('can check for inflight timers (trailing)', async () => {\n const debouncer = debounce(identity(), { waitMs: 32 });\n\n expect(debouncer.isPending).toBe(false);\n expect(debouncer.call('hello')).toBeUndefined();\n expect(debouncer.isPending).toBe(true);\n\n await sleep(1);\n\n expect(debouncer.isPending).toBe(true);\n\n await sleep(32);\n\n expect(debouncer.isPending).toBe(false);\n });\n\n it('can check for inflight timers (leading)', async () => {\n const debouncer = debounce(identity(), { timing: 'leading', waitMs: 32 });\n\n expect(debouncer.isPending).toBe(false);\n expect(debouncer.call('hello')).toBe('hello');\n expect(debouncer.isPending).toBe(true);\n\n await sleep(1);\n\n expect(debouncer.isPending).toBe(true);\n\n await sleep(32);\n\n expect(debouncer.isPending).toBe(false);\n });\n\n it('can flush before a cool-down', async () => {\n const debouncer = debounce(identity(), { waitMs: 32 });\n\n expect(debouncer.flush()).toBeUndefined();\n expect(debouncer.call('hello')).toBeUndefined();\n\n await sleep(32);\n\n expect(debouncer.call('world')).toBe('hello');\n });\n\n it('can flush during a cool-down', async () => {\n const debouncer = debounce(identity(), { waitMs: 32 });\n\n expect(debouncer.call('hello')).toBeUndefined();\n\n await sleep(1);\n\n expect(debouncer.call('world')).toBeUndefined();\n\n await sleep(1);\n\n expect(debouncer.flush()).toBe('world');\n });\n\n it('can flush after a cool-down', async () => {\n const debouncer = debounce(identity(), { waitMs: 32 });\n\n expect(debouncer.call('hello')).toBeUndefined();\n\n await sleep(32);\n\n expect(debouncer.flush()).toBe('hello');\n });\n});\n\ndescribe('errors', () => {\n it('prevents maxWaitMs to be less then waitMs', () => {\n expect(() => debounce(identity(), { waitMs: 32, maxWaitMs: 16 })).toThrowError(\n 'debounce: maxWaitMs (16) cannot be less than waitMs (32)',\n );\n });\n});\n"],"mappings":"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"}
@@ -1 +1 @@
1
- const e=require(`./dist-3WF0YzcR.cjs`);require(`./lazy-data-last-impl-3PAFkslW.cjs`),require(`./curry-BPVIsvo3.cjs`);const t=require(`./do-nothing-Cc1faYu6.cjs`),n=require(`./from-keys-CI2PJlIM.cjs`),r=require(`./funnel-CL-QFpGk.cjs`);function i(e,t,n=0){let i=r.funnel(n=>{e(n.map(({params:e})=>e)).then(e=>{for(let[r,{params:i,promiseCallbacks:[a]}]of n.entries())a(t(e,r,...i))}).catch(e=>{for(let{promiseCallbacks:[,t]}of n)t(e)})},{reducer:(e,t)=>[...e??[],t],maxBurstDurationMs:n,triggerAt:`end`});return{...i,call:async(...e)=>new Promise((...t)=>{i.call({promiseCallbacks:t,params:e})})}}e.describe(`showcase`,()=>{e.it(`results as object`,async()=>{let t=e.vi.fn(async e=>n.fromKeys(e,e=>e.length)),r=i(async e=>await t(e.flat()),(e,t,n)=>e[n]),a=[r.call(`short`),r.call(`medium`),r.call(`loooooooooooooong`)];e.globalExpect(t).toHaveBeenCalledTimes(0);let[o,s,c]=await Promise.all(a);e.globalExpect(t).toHaveBeenCalledTimes(1),e.globalExpect(t).toHaveBeenLastCalledWith([`short`,`medium`,`loooooooooooooong`]),e.globalExpect(t).toHaveLastResolvedWith({short:5,medium:6,loooooooooooooong:17}),e.globalExpect(o).toBe(5),e.globalExpect(s).toBe(6),e.globalExpect(c).toBe(17)}),e.it(`results as array`,async()=>{let t=e.vi.fn(async e=>e.map(e=>e.length)),n=i(async e=>await t(e.flat()),(e,t)=>e[t]),r=[n.call(`short`),n.call(`medium`),n.call(`loooooooooooooong`)];e.globalExpect(t).toHaveBeenCalledTimes(0);let[a,o,s]=await Promise.all(r);e.globalExpect(t).toHaveBeenCalledTimes(1),e.globalExpect(t).toHaveBeenLastCalledWith([`short`,`medium`,`loooooooooooooong`]),e.globalExpect(t).toHaveLastResolvedWith([5,6,17]),e.globalExpect(a).toBe(5),e.globalExpect(o).toBe(6),e.globalExpect(s).toBe(17)}),e.it(`error handling`,async()=>{let n=i(async e=>{if(e.length>1)throw Error(`Batch too big! ${JSON.stringify(e)}`)},t.doNothing());await e.globalExpect(n.call(`a`)).resolves.toBeUndefined(),await e.globalExpect(Promise.all([n.call(`hello`),n.call(`world`)])).rejects.toThrow(`Batch too big! [["hello"],["world"]]`)})});
1
+ const e=require(`./dist-8XtUY3ad.cjs`),t=require(`./do-nothing.cjs`),n=require(`./from-keys.cjs`),r=require(`./funnel.cjs`);function i(e,t,n=0){let i=r.funnel(n=>{e(n.map(({params:e})=>e)).then(e=>{for(let[r,{params:i,promiseCallbacks:[a]}]of n.entries())a(t(e,r,...i))}).catch(e=>{for(let{promiseCallbacks:[,t]}of n)t(e)})},{reducer:(e,t)=>[...e??[],t],maxBurstDurationMs:n,triggerAt:`end`});return{...i,call:async(...e)=>new Promise((...t)=>{i.call({promiseCallbacks:t,params:e})})}}e.i(`showcase`,()=>{e.a(`results as object`,async()=>{let t=e.r.fn(async e=>n.fromKeys(e,e=>e.length)),r=i(async e=>await t(e.flat()),(e,t,n)=>e[n]),a=[r.call(`short`),r.call(`medium`),r.call(`loooooooooooooong`)];e.n(t).toHaveBeenCalledTimes(0);let[o,s,c]=await Promise.all(a);e.n(t).toHaveBeenCalledTimes(1),e.n(t).toHaveBeenLastCalledWith([`short`,`medium`,`loooooooooooooong`]),e.n(t).toHaveLastResolvedWith({short:5,medium:6,loooooooooooooong:17}),e.n(o).toBe(5),e.n(s).toBe(6),e.n(c).toBe(17)}),e.a(`results as array`,async()=>{let t=e.r.fn(async e=>e.map(e=>e.length)),n=i(async e=>await t(e.flat()),(e,t)=>e[t]),r=[n.call(`short`),n.call(`medium`),n.call(`loooooooooooooong`)];e.n(t).toHaveBeenCalledTimes(0);let[a,o,s]=await Promise.all(r);e.n(t).toHaveBeenCalledTimes(1),e.n(t).toHaveBeenLastCalledWith([`short`,`medium`,`loooooooooooooong`]),e.n(t).toHaveLastResolvedWith([5,6,17]),e.n(a).toBe(5),e.n(o).toBe(6),e.n(s).toBe(17)}),e.a(`error handling`,async()=>{let n=i(async e=>{if(e.length>1)throw Error(`Batch too big! ${JSON.stringify(e)}`)},t.doNothing());await e.n(n.call(`a`)).resolves.toBeUndefined(),await e.n(Promise.all([n.call(`hello`),n.call(`world`)])).rejects.toThrowError(`Batch too big! [["hello"],["world"]]`)})});
@@ -1,2 +1,2 @@
1
- import{describe as e,globalExpect as t,it as n,vi as r}from"./dist-C2nNPffG.js";import"./lazy-data-last-impl-7QfM1xXg.js";import"./curry-CzZjDrpv.js";import{doNothing as i}from"./do-nothing-Be29JGDG.js";import{fromKeys as a}from"./from-keys-DJe8xU7b.js";import{funnel as o}from"./funnel-CEbURcmp.js";function s(e,t,n=0){let r=o(n=>{e(n.map(({params:e})=>e)).then(e=>{for(let[r,{params:i,promiseCallbacks:[a]}]of n.entries())a(t(e,r,...i))}).catch(e=>{for(let{promiseCallbacks:[,t]}of n)t(e)})},{reducer:(e,t)=>[...e??[],t],maxBurstDurationMs:n,triggerAt:`end`});return{...r,call:async(...e)=>new Promise((...t)=>{r.call({promiseCallbacks:t,params:e})})}}e(`showcase`,()=>{n(`results as object`,async()=>{let e=r.fn(async e=>a(e,e=>e.length)),n=s(async t=>await e(t.flat()),(e,t,n)=>e[n]),i=[n.call(`short`),n.call(`medium`),n.call(`loooooooooooooong`)];t(e).toHaveBeenCalledTimes(0);let[o,c,l]=await Promise.all(i);t(e).toHaveBeenCalledTimes(1),t(e).toHaveBeenLastCalledWith([`short`,`medium`,`loooooooooooooong`]),t(e).toHaveLastResolvedWith({short:5,medium:6,loooooooooooooong:17}),t(o).toBe(5),t(c).toBe(6),t(l).toBe(17)}),n(`results as array`,async()=>{let e=r.fn(async e=>e.map(e=>e.length)),n=s(async t=>await e(t.flat()),(e,t)=>e[t]),i=[n.call(`short`),n.call(`medium`),n.call(`loooooooooooooong`)];t(e).toHaveBeenCalledTimes(0);let[a,o,c]=await Promise.all(i);t(e).toHaveBeenCalledTimes(1),t(e).toHaveBeenLastCalledWith([`short`,`medium`,`loooooooooooooong`]),t(e).toHaveLastResolvedWith([5,6,17]),t(a).toBe(5),t(o).toBe(6),t(c).toBe(17)}),n(`error handling`,async()=>{let e=s(async e=>{if(e.length>1)throw Error(`Batch too big! ${JSON.stringify(e)}`)},i());await t(e.call(`a`)).resolves.toBeUndefined(),await t(Promise.all([e.call(`hello`),e.call(`world`)])).rejects.toThrow(`Batch too big! [["hello"],["world"]]`)})});
1
+ import{doNothing as e}from"./do-nothing.js";import{fromKeys as t}from"./from-keys.js";import{a as n,i as r,n as i,r as a}from"./dist-Bd1vawFi.js";import{funnel as o}from"./funnel.js";function s(e,t,n=0){let r=o(n=>{e(n.map(({params:e})=>e)).then(e=>{for(let[r,{params:i,promiseCallbacks:[a]}]of n.entries())a(t(e,r,...i))}).catch(e=>{for(let{promiseCallbacks:[,t]}of n)t(e)})},{reducer:(e,t)=>[...e??[],t],maxBurstDurationMs:n,triggerAt:`end`});return{...r,call:async(...e)=>new Promise((...t)=>{r.call({promiseCallbacks:t,params:e})})}}r(`showcase`,()=>{n(`results as object`,async()=>{let e=a.fn(async e=>t(e,e=>e.length)),n=s(async t=>await e(t.flat()),(e,t,n)=>e[n]),r=[n.call(`short`),n.call(`medium`),n.call(`loooooooooooooong`)];i(e).toHaveBeenCalledTimes(0);let[o,c,l]=await Promise.all(r);i(e).toHaveBeenCalledTimes(1),i(e).toHaveBeenLastCalledWith([`short`,`medium`,`loooooooooooooong`]),i(e).toHaveLastResolvedWith({short:5,medium:6,loooooooooooooong:17}),i(o).toBe(5),i(c).toBe(6),i(l).toBe(17)}),n(`results as array`,async()=>{let e=a.fn(async e=>e.map(e=>e.length)),t=s(async t=>await e(t.flat()),(e,t)=>e[t]),n=[t.call(`short`),t.call(`medium`),t.call(`loooooooooooooong`)];i(e).toHaveBeenCalledTimes(0);let[r,o,c]=await Promise.all(n);i(e).toHaveBeenCalledTimes(1),i(e).toHaveBeenLastCalledWith([`short`,`medium`,`loooooooooooooong`]),i(e).toHaveLastResolvedWith([5,6,17]),i(r).toBe(5),i(o).toBe(6),i(c).toBe(17)}),n(`error handling`,async()=>{let t=s(async e=>{if(e.length>1)throw Error(`Batch too big! ${JSON.stringify(e)}`)},e());await i(t.call(`a`)).resolves.toBeUndefined(),await i(Promise.all([t.call(`hello`),t.call(`world`)])).rejects.toThrowError(`Batch too big! [["hello"],["world"]]`)})});
2
2
  //# sourceMappingURL=funnel.reference-batch.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"funnel.reference-batch.test.js","names":["expect"],"sources":["../src/funnel.reference-batch.test.ts"],"sourcesContent":["/* eslint-disable ts/explicit-function-return-type, ts/no-explicit-any --\n * These aren't useful for a reference implementation!\n */\n\nimport { describe, expect, it, vi } from 'vitest';\nimport { doNothing } from './do-nothing';\nimport { fromKeys } from './from-keys';\nimport { funnel } from './funnel';\n\ninterface BatchRequest<Params extends Array<any>, Result> {\n readonly params: Params;\n readonly promiseCallbacks: Readonly<\n Parameters<ConstructorParameters<typeof Promise<Result>>[0]>\n >;\n}\n\n/**\n * A reference implementation for an async batching utility function built on\n * top of the `funnel` general purpose execution utility function. It will\n * accumulate all params passed to an async `call` method within the defined\n * burst duration and then use an async executor to process them in one\n * invocation. It then extracts an individual result for each call which is\n * used to resolve the original call.\n *\n * This allows synchronizing multiple async calls while keeping each call site\n * isolated from the rest (for example, as react components).\n *\n * This reference implementation can be copied into your project as-is, or you\n * can use it as the basis for a more complex implementation with additional\n * features.\n *\n * @param callback - The main function that takes a batch and returns an\n * aggregated response. The typing for the it's parameters will derive the\n * typing for the extractor and the `call` method.\n * @param extractor - A function that takes the aggregated response and extracts\n * from it the result for each individual call. The function is called with both\n * the index in the batch, and the params passed to the `call` method. This\n * allows handling APIs that return batch results as both objects and arrays.\n * @param maxBurstDurationMs - The period of time where the batcher would\n * collect params before triggering the executor. When set to 0 the batcher\n * does not incur any additional delays to the execution and would trigger at\n * the next tick, just like a regular async function would. This is also the\n * default value.\n * @returns A Funnel object with the `call` method augmented to support async\n * response.\n */\nfunction batch<Params extends Array<any>, BatchResponse, Result>(\n callback: (requests: ReadonlyArray<Params>) => Promise<BatchResponse>,\n extractor: (\n response: BatchResponse,\n index: number,\n ...params: Params\n ) => Result,\n maxBurstDurationMs = 0,\n) {\n const batchFunnel = funnel(\n // Passes all accumulated parameters to the callback and then extracts the response for each individual call via the extractor.\n (requests: ReadonlyArray<BatchRequest<Params, Result>>) => {\n callback(requests.map(({ params }) => params))\n // On success we iterate again over all calls and allow the extractor to pull a value out of the aggregated response for each one.\n .then((response) => {\n for (const [\n index,\n {\n params,\n promiseCallbacks: [resolve],\n },\n ] of requests.entries()) {\n const result = extractor(response, index, ...params);\n resolve(result);\n }\n })\n\n // On error we simply pass the error along to all reject callbacks.\n .catch((error) => {\n for (const {\n promiseCallbacks: [, reject],\n } of requests) {\n reject(error);\n }\n });\n },\n {\n // Reducer: Accumulates the parameters for each call, together with the promise executor callbacks needed to resolve or reject the call.\n reducer: (requests, request: BatchRequest<Params, Result>) => [\n ...(requests ?? []),\n request,\n ],\n maxBurstDurationMs,\n triggerAt: 'end',\n },\n );\n\n return {\n ...batchFunnel,\n\n call: async (...params: Params) =>\n new Promise<Result>((...promiseCallbacks) => {\n batchFunnel.call({ promiseCallbacks, params });\n }),\n };\n}\n\ndescribe('showcase', () => {\n it('results as object', async () => {\n const mockApi = vi.fn<\n (words: ReadonlyArray<string>) => Promise<Record<string, number>>\n >(async (words) => fromKeys(words, (word) => word.length));\n\n const countLettersApi = batch(\n // We only need to type the `requests` param of the `executor` callback.\n // All other types are derived from it.\n async (requests: ReadonlyArray<[word: string]>) =>\n await mockApi(requests.flat()),\n (response, _, word) => response[word],\n );\n\n const prepared = [\n countLettersApi.call('short'),\n countLettersApi.call('medium'),\n countLettersApi.call('loooooooooooooong'),\n ];\n\n expect(mockApi).toHaveBeenCalledTimes(0);\n\n const [shortResult, mediumResult, longResult] = await Promise.all(prepared);\n\n expect(mockApi).toHaveBeenCalledTimes(1);\n expect(mockApi).toHaveBeenLastCalledWith([\n 'short',\n 'medium',\n 'loooooooooooooong',\n ]);\n expect(mockApi).toHaveLastResolvedWith({\n short: 5,\n medium: 6,\n loooooooooooooong: 17,\n });\n expect(shortResult).toBe(5);\n expect(mediumResult).toBe(6);\n expect(longResult).toBe(17);\n });\n\n it('results as array', async () => {\n const mockApi = vi.fn<\n (words: ReadonlyArray<string>) => Promise<ReadonlyArray<number>>\n >(async (words) => words.map((word) => word.length));\n\n const countLettersApi = batch(\n // We only need to type the `requests` param of the `executor` callback.\n // All other types are derived from it.\n async (requests: ReadonlyArray<[word: string]>) =>\n await mockApi(requests.flat()),\n (response, index) => response[index],\n );\n\n const prepared = [\n countLettersApi.call('short'),\n countLettersApi.call('medium'),\n countLettersApi.call('loooooooooooooong'),\n ];\n\n expect(mockApi).toHaveBeenCalledTimes(0);\n\n const [shortResult, mediumResult, longResult] = await Promise.all(prepared);\n\n expect(mockApi).toHaveBeenCalledTimes(1);\n expect(mockApi).toHaveBeenLastCalledWith([\n 'short',\n 'medium',\n 'loooooooooooooong',\n ]);\n expect(mockApi).toHaveLastResolvedWith([5, 6, 17]);\n expect(shortResult).toBe(5);\n expect(mediumResult).toBe(6);\n expect(longResult).toBe(17);\n });\n\n it('error handling', async () => {\n const failingApi = batch(\n // We only need to type the `requests` param of the `executor` callback.\n // All other types are derived from it.\n async (requests: ReadonlyArray<[id: string]>) => {\n if (requests.length > 1) {\n throw new Error(`Batch too big! ${JSON.stringify(requests)}`);\n }\n },\n doNothing(),\n );\n\n await expect(failingApi.call('a')).resolves.toBeUndefined();\n\n await expect(\n Promise.all([failingApi.call('hello'), failingApi.call('world')]),\n ).rejects.toThrow('Batch too big! [[\"hello\"],[\"world\"]]');\n });\n});\n"],"mappings":"4SA8CA,SAAS,EACP,EACA,EAKA,EAAqB,EACrB,CACA,IAAM,EAAc,EAEjB,GAA0D,CACzD,EAAS,EAAS,KAAK,CAAE,YAAa,EAAO,CAAC,CAE3C,KAAM,GAAa,CAClB,IAAK,GAAM,CACT,EACA,CACE,SACA,iBAAkB,CAAC,OAElB,EAAS,SAAS,CAErB,EADe,EAAU,EAAU,EAAO,GAAG,EAAO,CACrC,EAEjB,CAGD,MAAO,GAAU,CAChB,IAAK,GAAM,CACT,iBAAkB,EAAG,MAClB,EACH,EAAO,EAAM,EAEf,EAEN,CAEE,SAAU,EAAU,IAA0C,CAC5D,GAAI,GAAY,EAAE,CAClB,EACD,CACD,qBACA,UAAW,MACZ,CACF,CAED,MAAO,CACL,GAAG,EAEH,KAAM,MAAO,GAAG,IACd,IAAI,SAAiB,GAAG,IAAqB,CAC3C,EAAY,KAAK,CAAE,mBAAkB,SAAQ,CAAC,EAC9C,CACL,CAGH,EAAS,eAAkB,CACzB,EAAG,oBAAqB,SAAY,CAClC,IAAM,EAAU,EAAG,GAEb,KAAO,IAAU,EAAS,EAAQ,GAAS,EAAK,OAAO,CAAC,CAExD,EAAkB,EAGtB,KAAO,IACL,MAAM,EAAQ,EAAS,MAAM,CAAC,EAC/B,EAAU,EAAG,IAAS,EAAS,GACjC,CAEK,EAAW,CACf,EAAgB,KAAK,QAAQ,CAC7B,EAAgB,KAAK,SAAS,CAC9B,EAAgB,KAAK,oBAAoB,CAC1C,CAED,EAAO,EAAQ,CAAC,sBAAsB,EAAE,CAExC,GAAM,CAAC,EAAa,EAAc,GAAc,MAAM,QAAQ,IAAI,EAAS,CAE3E,EAAO,EAAQ,CAAC,sBAAsB,EAAE,CACxC,EAAO,EAAQ,CAAC,yBAAyB,CACvC,QACA,SACA,oBACD,CAAC,CACF,EAAO,EAAQ,CAAC,uBAAuB,CACrC,MAAO,EACP,OAAQ,EACR,kBAAmB,GACpB,CAAC,CACF,EAAO,EAAY,CAAC,KAAK,EAAE,CAC3B,EAAO,EAAa,CAAC,KAAK,EAAE,CAC5B,EAAO,EAAW,CAAC,KAAK,GAAG,EAC3B,CAEF,EAAG,mBAAoB,SAAY,CACjC,IAAM,EAAU,EAAG,GAEb,KAAO,IAAU,EAAM,IAAK,GAAS,EAAK,OAAO,CAAC,CAElD,EAAkB,EAGtB,KAAO,IACL,MAAM,EAAQ,EAAS,MAAM,CAAC,EAC/B,EAAU,IAAU,EAAS,GAC/B,CAEK,EAAW,CACf,EAAgB,KAAK,QAAQ,CAC7B,EAAgB,KAAK,SAAS,CAC9B,EAAgB,KAAK,oBAAoB,CAC1C,CAED,EAAO,EAAQ,CAAC,sBAAsB,EAAE,CAExC,GAAM,CAAC,EAAa,EAAc,GAAc,MAAM,QAAQ,IAAI,EAAS,CAE3E,EAAO,EAAQ,CAAC,sBAAsB,EAAE,CACxC,EAAO,EAAQ,CAAC,yBAAyB,CACvC,QACA,SACA,oBACD,CAAC,CACF,EAAO,EAAQ,CAAC,uBAAuB,CAAC,EAAG,EAAG,GAAG,CAAC,CAClD,EAAO,EAAY,CAAC,KAAK,EAAE,CAC3B,EAAO,EAAa,CAAC,KAAK,EAAE,CAC5B,EAAO,EAAW,CAAC,KAAK,GAAG,EAC3B,CAEF,EAAG,iBAAkB,SAAY,CAC/B,IAAM,EAAa,EAGjB,KAAO,IAA0C,CAC/C,GAAI,EAAS,OAAS,EACpB,MAAU,MAAM,kBAAkB,KAAK,UAAU,EAAS,GAAG,EAGjE,GAAW,CACZ,CAED,MAAMA,EAAO,EAAW,KAAK,IAAI,CAAC,CAAC,SAAS,eAAe,CAE3D,MAAMA,EACJ,QAAQ,IAAI,CAAC,EAAW,KAAK,QAAQ,CAAE,EAAW,KAAK,QAAQ,CAAC,CAAC,CAClE,CAAC,QAAQ,QAAQ,uCAAuC,EACzD,EACF"}
1
+ {"version":3,"file":"funnel.reference-batch.test.js","names":["expect"],"sources":["../src/funnel.reference-batch.test.ts"],"sourcesContent":["/* eslint-disable ts/explicit-function-return-type, ts/no-explicit-any --\n * These aren't useful for a reference implementation!\n */\n\nimport { describe, expect, it, vi } from 'vitest';\nimport { doNothing } from './do-nothing';\nimport { fromKeys } from './from-keys';\nimport { funnel } from './funnel';\n\ninterface BatchRequest<Params extends Array<any>, Result> {\n readonly params: Params;\n readonly promiseCallbacks: Readonly<\n Parameters<ConstructorParameters<typeof Promise<Result>>[0]>\n >;\n}\n\n/**\n * A reference implementation for an async batching utility function built on\n * top of the `funnel` general purpose execution utility function. It will\n * accumulate all params passed to an async `call` method within the defined\n * burst duration and then use an async executor to process them in one\n * invocation. It then extracts an individual result for each call which is\n * used to resolve the original call.\n *\n * This allows synchronizing multiple async calls while keeping each call site\n * isolated from the rest (for example, as react components).\n *\n * This reference implementation can be copied into your project as-is, or you\n * can use it as the basis for a more complex implementation with additional\n * features.\n *\n * @param callback - The main function that takes a batch and returns an\n * aggregated response. The typing for the it's parameters will derive the\n * typing for the extractor and the `call` method.\n * @param extractor - A function that takes the aggregated response and extracts\n * from it the result for each individual call. The function is called with both\n * the index in the batch, and the params passed to the `call` method. This\n * allows handling APIs that return batch results as both objects and arrays.\n * @param maxBurstDurationMs - The period of time where the batcher would\n * collect params before triggering the executor. When set to 0 the batcher\n * does not incur any additional delays to the execution and would trigger at\n * the next tick, just like a regular async function would. This is also the\n * default value.\n * @returns A Funnel object with the `call` method augmented to support async\n * response.\n */\nfunction batch<Params extends Array<any>, BatchResponse, Result>(\n callback: (requests: ReadonlyArray<Params>) => Promise<BatchResponse>,\n extractor: (\n response: BatchResponse,\n index: number,\n ...params: Params\n ) => Result,\n maxBurstDurationMs = 0,\n) {\n const batchFunnel = funnel(\n // Passes all accumulated parameters to the callback and then extracts the response for each individual call via the extractor.\n (requests: ReadonlyArray<BatchRequest<Params, Result>>) => {\n callback(requests.map(({ params }) => params))\n // On success we iterate again over all calls and allow the extractor to pull a value out of the aggregated response for each one.\n .then((response) => {\n for (const [\n index,\n {\n params,\n promiseCallbacks: [resolve],\n },\n ] of requests.entries()) {\n const result = extractor(response, index, ...params);\n resolve(result);\n }\n })\n\n // On error we simply pass the error along to all reject callbacks.\n .catch((error) => {\n for (const {\n promiseCallbacks: [, reject],\n } of requests) {\n reject(error);\n }\n });\n },\n {\n // Reducer: Accumulates the parameters for each call, together with the promise executor callbacks needed to resolve or reject the call.\n reducer: (requests, request: BatchRequest<Params, Result>) => [\n ...(requests ?? []),\n request,\n ],\n maxBurstDurationMs,\n triggerAt: 'end',\n },\n );\n\n return {\n ...batchFunnel,\n\n call: async (...params: Params) =>\n new Promise<Result>((...promiseCallbacks) => {\n batchFunnel.call({ promiseCallbacks, params });\n }),\n };\n}\n\ndescribe('showcase', () => {\n it('results as object', async () => {\n const mockApi = vi.fn<\n (words: ReadonlyArray<string>) => Promise<Record<string, number>>\n >(async (words) => fromKeys(words, (word) => word.length));\n\n const countLettersApi = batch(\n // We only need to type the `requests` param of the `executor` callback.\n // All other types are derived from it.\n async (requests: ReadonlyArray<[word: string]>) =>\n await mockApi(requests.flat()),\n (response, _, word) => response[word],\n );\n\n const prepared = [\n countLettersApi.call('short'),\n countLettersApi.call('medium'),\n countLettersApi.call('loooooooooooooong'),\n ];\n\n expect(mockApi).toHaveBeenCalledTimes(0);\n\n const [shortResult, mediumResult, longResult] = await Promise.all(prepared);\n\n expect(mockApi).toHaveBeenCalledTimes(1);\n expect(mockApi).toHaveBeenLastCalledWith([\n 'short',\n 'medium',\n 'loooooooooooooong',\n ]);\n expect(mockApi).toHaveLastResolvedWith({\n short: 5,\n medium: 6,\n loooooooooooooong: 17,\n });\n expect(shortResult).toBe(5);\n expect(mediumResult).toBe(6);\n expect(longResult).toBe(17);\n });\n\n it('results as array', async () => {\n const mockApi = vi.fn<\n (words: ReadonlyArray<string>) => Promise<ReadonlyArray<number>>\n >(async (words) => words.map((word) => word.length));\n\n const countLettersApi = batch(\n // We only need to type the `requests` param of the `executor` callback.\n // All other types are derived from it.\n async (requests: ReadonlyArray<[word: string]>) =>\n await mockApi(requests.flat()),\n (response, index) => response[index],\n );\n\n const prepared = [\n countLettersApi.call('short'),\n countLettersApi.call('medium'),\n countLettersApi.call('loooooooooooooong'),\n ];\n\n expect(mockApi).toHaveBeenCalledTimes(0);\n\n const [shortResult, mediumResult, longResult] = await Promise.all(prepared);\n\n expect(mockApi).toHaveBeenCalledTimes(1);\n expect(mockApi).toHaveBeenLastCalledWith([\n 'short',\n 'medium',\n 'loooooooooooooong',\n ]);\n expect(mockApi).toHaveLastResolvedWith([5, 6, 17]);\n expect(shortResult).toBe(5);\n expect(mediumResult).toBe(6);\n expect(longResult).toBe(17);\n });\n\n it('error handling', async () => {\n const failingApi = batch(\n // We only need to type the `requests` param of the `executor` callback.\n // All other types are derived from it.\n async (requests: ReadonlyArray<[id: string]>) => {\n if (requests.length > 1) {\n throw new Error(`Batch too big! ${JSON.stringify(requests)}`);\n }\n },\n doNothing(),\n );\n\n await expect(failingApi.call('a')).resolves.toBeUndefined();\n\n await expect(\n Promise.all([failingApi.call('hello'), failingApi.call('world')]),\n ).rejects.toThrowError('Batch too big! [[\"hello\"],[\"world\"]]');\n });\n});\n"],"mappings":"uLA8CA,SAAS,EACP,EACA,EAKA,EAAqB,EACrB,CACA,IAAM,EAAc,EAEjB,GAA0D,CACzD,EAAS,EAAS,KAAK,CAAE,YAAa,EAAO,CAAC,CAE3C,KAAM,GAAa,CAClB,IAAK,GAAM,CACT,EACA,CACE,SACA,iBAAkB,CAAC,OAElB,EAAS,SAAS,CAErB,EADe,EAAU,EAAU,EAAO,GAAG,EAAO,CACrC,EAEjB,CAGD,MAAO,GAAU,CAChB,IAAK,GAAM,CACT,iBAAkB,EAAG,MAClB,EACH,EAAO,EAAM,EAEf,EAEN,CAEE,SAAU,EAAU,IAA0C,CAC5D,GAAI,GAAY,EAAE,CAClB,EACD,CACD,qBACA,UAAW,MACZ,CACF,CAED,MAAO,CACL,GAAG,EAEH,KAAM,MAAO,GAAG,IACd,IAAI,SAAiB,GAAG,IAAqB,CAC3C,EAAY,KAAK,CAAE,mBAAkB,SAAQ,CAAC,EAC9C,CACL,CAGH,EAAS,eAAkB,CACzB,EAAG,oBAAqB,SAAY,CAClC,IAAM,EAAU,EAAG,GAEjB,KAAO,IAAU,EAAS,EAAQ,GAAS,EAAK,OAAO,CAAC,CAEpD,EAAkB,EAGtB,KAAO,IACL,MAAM,EAAQ,EAAS,MAAM,CAAC,EAC/B,EAAU,EAAG,IAAS,EAAS,GACjC,CAEK,EAAW,CACf,EAAgB,KAAK,QAAQ,CAC7B,EAAgB,KAAK,SAAS,CAC9B,EAAgB,KAAK,oBAAoB,CAC1C,CAED,EAAO,EAAQ,CAAC,sBAAsB,EAAE,CAExC,GAAM,CAAC,EAAa,EAAc,GAAc,MAAM,QAAQ,IAAI,EAAS,CAE3E,EAAO,EAAQ,CAAC,sBAAsB,EAAE,CACxC,EAAO,EAAQ,CAAC,yBAAyB,CACvC,QACA,SACA,oBACD,CAAC,CACF,EAAO,EAAQ,CAAC,uBAAuB,CACrC,MAAO,EACP,OAAQ,EACR,kBAAmB,GACpB,CAAC,CACF,EAAO,EAAY,CAAC,KAAK,EAAE,CAC3B,EAAO,EAAa,CAAC,KAAK,EAAE,CAC5B,EAAO,EAAW,CAAC,KAAK,GAAG,EAC3B,CAEF,EAAG,mBAAoB,SAAY,CACjC,IAAM,EAAU,EAAG,GAEjB,KAAO,IAAU,EAAM,IAAK,GAAS,EAAK,OAAO,CAAC,CAE9C,EAAkB,EAGtB,KAAO,IACL,MAAM,EAAQ,EAAS,MAAM,CAAC,EAC/B,EAAU,IAAU,EAAS,GAC/B,CAEK,EAAW,CACf,EAAgB,KAAK,QAAQ,CAC7B,EAAgB,KAAK,SAAS,CAC9B,EAAgB,KAAK,oBAAoB,CAC1C,CAED,EAAO,EAAQ,CAAC,sBAAsB,EAAE,CAExC,GAAM,CAAC,EAAa,EAAc,GAAc,MAAM,QAAQ,IAAI,EAAS,CAE3E,EAAO,EAAQ,CAAC,sBAAsB,EAAE,CACxC,EAAO,EAAQ,CAAC,yBAAyB,CACvC,QACA,SACA,oBACD,CAAC,CACF,EAAO,EAAQ,CAAC,uBAAuB,CAAC,EAAG,EAAG,GAAG,CAAC,CAClD,EAAO,EAAY,CAAC,KAAK,EAAE,CAC3B,EAAO,EAAa,CAAC,KAAK,EAAE,CAC5B,EAAO,EAAW,CAAC,KAAK,GAAG,EAC3B,CAEF,EAAG,iBAAkB,SAAY,CAC/B,IAAM,EAAa,EAGjB,KAAO,IAA0C,CAC/C,GAAI,EAAS,OAAS,EACpB,MAAU,MAAM,kBAAkB,KAAK,UAAU,EAAS,GAAG,EAGjE,GAAW,CACZ,CAED,MAAMA,EAAO,EAAW,KAAK,IAAI,CAAC,CAAC,SAAS,eAAe,CAE3D,MAAMA,EACJ,QAAQ,IAAI,CAAC,EAAW,KAAK,QAAQ,CAAE,EAAW,KAAK,QAAQ,CAAC,CAAC,CAClE,CAAC,QAAQ,aAAa,uCAAuC,EAC9D,EACF"}
@@ -1 +1 @@
1
- const e=require(`./dist-3WF0YzcR.cjs`),t=require(`./do-nothing-Cc1faYu6.cjs`),n=require(`./funnel-CL-QFpGk.cjs`);e.describe(`'call' method args`,()=>{e.it(`no args`,()=>{(0,e.import_dist.expectTypeOf)(n.funnel(t.doNothing(),{reducer:e=>`test`,triggerAt:`start`}).call).parameters.toEqualTypeOf()}),e.it(`non-optional args`,()=>{(0,e.import_dist.expectTypeOf)(n.funnel(t.doNothing(),{reducer:(e,t,n,r)=>`test`,triggerAt:`start`}).call).parameters.toEqualTypeOf()}),e.it(`optional args`,()=>{(0,e.import_dist.expectTypeOf)(n.funnel(t.doNothing(),{reducer:(e,t)=>`test`,triggerAt:`start`}).call).parameters.toEqualTypeOf()}),e.it(`rest args`,()=>{(0,e.import_dist.expectTypeOf)(n.funnel(t.doNothing(),{reducer:(e,...t)=>`test`,triggerAt:`start`}).call).parameters.toEqualTypeOf()})}),e.describe(`derive the reducer accumulator type from the executor param`,()=>{e.it(`simple types`,()=>{n.funnel(e=>{},{reducer:t=>((0,e.import_dist.expectTypeOf)(t).toEqualTypeOf(),t),triggerAt:`start`})}),e.it(`arrays`,()=>{n.funnel(e=>{},{reducer:t=>((0,e.import_dist.expectTypeOf)(t).toEqualTypeOf(),t),triggerAt:`start`})}),e.it(`objects`,()=>{n.funnel(e=>{},{reducer:t=>((0,e.import_dist.expectTypeOf)(t).toEqualTypeOf(),t),triggerAt:`start`})})}),e.describe(`prevent bad options`,()=>{e.it(`minGapMs cannot be the only option with timing: end`,()=>{n.funnel(t.doNothing(),{minGapMs:100}),n.funnel(t.doNothing(),{triggerAt:`end`,minGapMs:100}),n.funnel(t.doNothing(),{triggerAt:`start`,minGapMs:100}),n.funnel(t.doNothing(),{triggerAt:`both`,minGapMs:100})})});
1
+ const e=require(`./dist-8XtUY3ad.cjs`),t=require(`./do-nothing.cjs`),n=require(`./funnel.cjs`);e.i(`'call' method args`,()=>{e.a(`no args`,()=>{(0,e.t.expectTypeOf)(n.funnel(t.doNothing(),{reducer:e=>`test`,triggerAt:`start`}).call).parameters.toEqualTypeOf()}),e.a(`non-optional args`,()=>{(0,e.t.expectTypeOf)(n.funnel(t.doNothing(),{reducer:(e,t,n,r)=>`test`,triggerAt:`start`}).call).parameters.toEqualTypeOf()}),e.a(`optional args`,()=>{(0,e.t.expectTypeOf)(n.funnel(t.doNothing(),{reducer:(e,t)=>`test`,triggerAt:`start`}).call).parameters.toEqualTypeOf()}),e.a(`rest args`,()=>{(0,e.t.expectTypeOf)(n.funnel(t.doNothing(),{reducer:(e,...t)=>`test`,triggerAt:`start`}).call).parameters.toEqualTypeOf()})}),e.i(`derive the reducer accumulator type from the executor param`,()=>{e.a(`simple types`,()=>{n.funnel(e=>{},{reducer:t=>((0,e.t.expectTypeOf)(t).toEqualTypeOf(),t),triggerAt:`start`})}),e.a(`arrays`,()=>{n.funnel(e=>{},{reducer:t=>((0,e.t.expectTypeOf)(t).toEqualTypeOf(),t),triggerAt:`start`})}),e.a(`objects`,()=>{n.funnel(e=>{},{reducer:t=>((0,e.t.expectTypeOf)(t).toEqualTypeOf(),t),triggerAt:`start`})})}),e.i(`prevent bad options`,()=>{e.a(`minGapMs cannot be the only option with timing: end`,()=>{n.funnel(t.doNothing(),{minGapMs:100}),n.funnel(t.doNothing(),{triggerAt:`end`,minGapMs:100}),n.funnel(t.doNothing(),{triggerAt:`start`,minGapMs:100}),n.funnel(t.doNothing(),{triggerAt:`both`,minGapMs:100})})});
@@ -1,2 +1,2 @@
1
- import{describe as e,expectTypeOf as t,it as n}from"./dist-C2nNPffG.js";import{doNothing as r}from"./do-nothing-Be29JGDG.js";import{funnel as i}from"./funnel-CEbURcmp.js";e(`'call' method args`,()=>{n(`no args`,()=>{t(i(r(),{reducer:e=>`test`,triggerAt:`start`}).call).parameters.toEqualTypeOf()}),n(`non-optional args`,()=>{t(i(r(),{reducer:(e,t,n,r)=>`test`,triggerAt:`start`}).call).parameters.toEqualTypeOf()}),n(`optional args`,()=>{t(i(r(),{reducer:(e,t)=>`test`,triggerAt:`start`}).call).parameters.toEqualTypeOf()}),n(`rest args`,()=>{t(i(r(),{reducer:(e,...t)=>`test`,triggerAt:`start`}).call).parameters.toEqualTypeOf()})}),e(`derive the reducer accumulator type from the executor param`,()=>{n(`simple types`,()=>{i(e=>{},{reducer:e=>(t(e).toEqualTypeOf(),e),triggerAt:`start`})}),n(`arrays`,()=>{i(e=>{},{reducer:e=>(t(e).toEqualTypeOf(),e),triggerAt:`start`})}),n(`objects`,()=>{i(e=>{},{reducer:e=>(t(e).toEqualTypeOf(),e),triggerAt:`start`})})}),e(`prevent bad options`,()=>{n(`minGapMs cannot be the only option with timing: end`,()=>{i(r(),{minGapMs:100}),i(r(),{triggerAt:`end`,minGapMs:100}),i(r(),{triggerAt:`start`,minGapMs:100}),i(r(),{triggerAt:`both`,minGapMs:100})})});
1
+ import{doNothing as e}from"./do-nothing.js";import{a as t,i as n,t as r}from"./dist-Bd1vawFi.js";import{funnel as i}from"./funnel.js";n(`'call' method args`,()=>{t(`no args`,()=>{r(i(e(),{reducer:e=>`test`,triggerAt:`start`}).call).parameters.toEqualTypeOf()}),t(`non-optional args`,()=>{r(i(e(),{reducer:(e,t,n,r)=>`test`,triggerAt:`start`}).call).parameters.toEqualTypeOf()}),t(`optional args`,()=>{r(i(e(),{reducer:(e,t)=>`test`,triggerAt:`start`}).call).parameters.toEqualTypeOf()}),t(`rest args`,()=>{r(i(e(),{reducer:(e,...t)=>`test`,triggerAt:`start`}).call).parameters.toEqualTypeOf()})}),n(`derive the reducer accumulator type from the executor param`,()=>{t(`simple types`,()=>{i(e=>{},{reducer:e=>(r(e).toEqualTypeOf(),e),triggerAt:`start`})}),t(`arrays`,()=>{i(e=>{},{reducer:e=>(r(e).toEqualTypeOf(),e),triggerAt:`start`})}),t(`objects`,()=>{i(e=>{},{reducer:e=>(r(e).toEqualTypeOf(),e),triggerAt:`start`})})}),n(`prevent bad options`,()=>{t(`minGapMs cannot be the only option with timing: end`,()=>{i(e(),{minGapMs:100}),i(e(),{triggerAt:`end`,minGapMs:100}),i(e(),{triggerAt:`start`,minGapMs:100}),i(e(),{triggerAt:`both`,minGapMs:100})})});
2
2
  //# sourceMappingURL=funnel.test-d.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"funnel.test-d.js","names":[],"sources":["../src/funnel.test-d.ts"],"sourcesContent":["/* eslint-disable ts/no-unused-vars -- We just want to build types, we don't care about using the params... */\n\nimport { describe, expectTypeOf, it } from 'vitest';\nimport { doNothing } from './do-nothing';\nimport { funnel } from './funnel';\n\ndescribe('\\'call\\' method args', () => {\n it('no args', () => {\n const foo = funnel(doNothing(), {\n reducer: (_: 'test' | undefined) => 'test' as const,\n triggerAt: 'start',\n });\n\n expectTypeOf(foo.call).parameters.toEqualTypeOf<[]>();\n });\n\n it('non-optional args', () => {\n const foo = funnel(doNothing(), {\n // @ts-expect-error [ts(6133)] -- We want to use explicit names, not prefixed with _\n reducer: (_: 'test' | undefined, a: string, b: number, c: boolean) =>\n 'test' as const,\n\n triggerAt: 'start',\n });\n\n expectTypeOf(foo.call).parameters.toEqualTypeOf<\n [a: string, b: number, c: boolean]\n >();\n });\n\n it('optional args', () => {\n const foo = funnel(doNothing(), {\n // @ts-expect-error [ts(6133)] -- We want to use explicit names, not prefixed with _\n reducer: (_: 'test' | undefined, a?: string) => 'test' as const,\n triggerAt: 'start',\n });\n\n expectTypeOf(foo.call).parameters.toEqualTypeOf<[a?: string | undefined]>();\n });\n\n it('rest args', () => {\n const foo = funnel(doNothing(), {\n reducer:\n // @ts-expect-error [ts(6133)] -- We want to use explicit names, not prefixed with _\n (_: 'test' | undefined, ...as: Array<string>) => 'test' as const,\n\n triggerAt: 'start',\n });\n\n expectTypeOf(foo.call).parameters.toEqualTypeOf<Array<string>>();\n });\n});\n\ndescribe('derive the reducer accumulator type from the executor param', () => {\n it('simple types', () => {\n funnel(\n (_: number) => {\n // do nothing\n },\n {\n reducer: (reduced) => {\n expectTypeOf(reduced).toEqualTypeOf<number | undefined>();\n\n return reduced!;\n },\n triggerAt: 'start',\n },\n );\n });\n\n it('arrays', () => {\n funnel(\n (_: ReadonlyArray<number>) => {\n // do nothing,\n },\n {\n reducer: (reduced) => {\n expectTypeOf(reduced).toEqualTypeOf<\n ReadonlyArray<number> | undefined\n >();\n\n return reduced!;\n },\n triggerAt: 'start',\n },\n );\n });\n\n it('objects', () => {\n funnel(\n (_: { readonly a: number }) => {\n // do nothing\n },\n {\n reducer: (reduced) => {\n expectTypeOf(reduced).toEqualTypeOf<\n { readonly a: number } | undefined\n >();\n\n return reduced!;\n },\n triggerAt: 'start',\n },\n );\n });\n});\n\ndescribe('prevent bad options', () => {\n it('minGapMs cannot be the only option with timing: end', () => {\n funnel(\n doNothing(),\n // @ts-expect-error [ts(2345)] -- minGapMs cannot be set alone]\n { minGapMs: 100 },\n );\n\n funnel(\n doNothing(),\n // @ts-expect-error [ts(2345)] -- minGapMs cannot be set alone]\n { triggerAt: 'end', minGapMs: 100 },\n );\n\n // But it works with \"start\" and \"both\"\n\n funnel(doNothing(), { triggerAt: 'start', minGapMs: 100 });\n funnel(doNothing(), { triggerAt: 'both', minGapMs: 100 });\n });\n});\n"],"mappings":"2KAMA,EAAS,yBAA8B,CACrC,EAAG,cAAiB,CAMlB,EALY,EAAO,GAAW,CAAE,CAC9B,QAAU,GAA0B,OACpC,UAAW,QACZ,CAAC,CAEe,KAAK,CAAC,WAAW,eAAmB,EACrD,CAEF,EAAG,wBAA2B,CAS5B,EARY,EAAO,GAAW,CAAE,CAE9B,SAAU,EAAuB,EAAW,EAAW,IACrD,OAEF,UAAW,QACZ,CAAC,CAEe,KAAK,CAAC,WAAW,eAE/B,EACH,CAEF,EAAG,oBAAuB,CAOxB,EANY,EAAO,GAAW,CAAE,CAE9B,SAAU,EAAuB,IAAe,OAChD,UAAW,QACZ,CAAC,CAEe,KAAK,CAAC,WAAW,eAAyC,EAC3E,CAEF,EAAG,gBAAmB,CASpB,EARY,EAAO,GAAW,CAAE,CAC9B,SAEG,EAAuB,GAAG,IAAsB,OAEnD,UAAW,QACZ,CAAC,CAEe,KAAK,CAAC,WAAW,eAA8B,EAChE,EACF,CAEF,EAAS,kEAAqE,CAC5E,EAAG,mBAAsB,CACvB,EACG,GAAc,GAGf,CACE,QAAU,IACR,EAAa,EAAQ,CAAC,eAAmC,CAElD,GAET,UAAW,QACZ,CACF,EACD,CAEF,EAAG,aAAgB,CACjB,EACG,GAA6B,GAG9B,CACE,QAAU,IACR,EAAa,EAAQ,CAAC,eAEnB,CAEI,GAET,UAAW,QACZ,CACF,EACD,CAEF,EAAG,cAAiB,CAClB,EACG,GAA8B,GAG/B,CACE,QAAU,IACR,EAAa,EAAQ,CAAC,eAEnB,CAEI,GAET,UAAW,QACZ,CACF,EACD,EACF,CAEF,EAAS,0BAA6B,CACpC,EAAG,0DAA6D,CAC9D,EACE,GAAW,CAEX,CAAE,SAAU,IAAK,CAClB,CAED,EACE,GAAW,CAEX,CAAE,UAAW,MAAO,SAAU,IAAK,CACpC,CAID,EAAO,GAAW,CAAE,CAAE,UAAW,QAAS,SAAU,IAAK,CAAC,CAC1D,EAAO,GAAW,CAAE,CAAE,UAAW,OAAQ,SAAU,IAAK,CAAC,EACzD,EACF"}
1
+ {"version":3,"file":"funnel.test-d.js","names":[],"sources":["../src/funnel.test-d.ts"],"sourcesContent":["/* eslint-disable ts/no-unused-vars -- We just want to build types, we don't care about using the params... */\n\nimport { describe, expectTypeOf, it } from 'vitest';\nimport { doNothing } from './do-nothing';\nimport { funnel } from './funnel';\n\ndescribe('\\'call\\' method args', () => {\n it('no args', () => {\n const foo = funnel(doNothing(), {\n reducer: (_: 'test' | undefined) => 'test' as const,\n triggerAt: 'start',\n });\n\n expectTypeOf(foo.call).parameters.toEqualTypeOf<[]>();\n });\n\n it('non-optional args', () => {\n const foo = funnel(doNothing(), {\n // @ts-expect-error [ts(6133)] -- We want to use explicit names, not prefixed with _\n reducer: (_: 'test' | undefined, a: string, b: number, c: boolean) =>\n 'test' as const,\n\n triggerAt: 'start',\n });\n\n expectTypeOf(foo.call).parameters.toEqualTypeOf<\n [a: string, b: number, c: boolean]\n >();\n });\n\n it('optional args', () => {\n const foo = funnel(doNothing(), {\n // @ts-expect-error [ts(6133)] -- We want to use explicit names, not prefixed with _\n reducer: (_: 'test' | undefined, a?: string) => 'test' as const,\n triggerAt: 'start',\n });\n\n expectTypeOf(foo.call).parameters.toEqualTypeOf<[a?: string | undefined]>();\n });\n\n it('rest args', () => {\n const foo = funnel(doNothing(), {\n reducer:\n // @ts-expect-error [ts(6133)] -- We want to use explicit names, not prefixed with _\n (_: 'test' | undefined, ...as: Array<string>) => 'test' as const,\n\n triggerAt: 'start',\n });\n\n expectTypeOf(foo.call).parameters.toEqualTypeOf<Array<string>>();\n });\n});\n\ndescribe('derive the reducer accumulator type from the executor param', () => {\n it('simple types', () => {\n funnel(\n (_: number) => {\n // do nothing\n },\n {\n reducer: (reduced) => {\n expectTypeOf(reduced).toEqualTypeOf<number | undefined>();\n\n return reduced!;\n },\n triggerAt: 'start',\n },\n );\n });\n\n it('arrays', () => {\n funnel(\n (_: ReadonlyArray<number>) => {\n // do nothing,\n },\n {\n reducer: (reduced) => {\n expectTypeOf(reduced).toEqualTypeOf<\n ReadonlyArray<number> | undefined\n >();\n\n return reduced!;\n },\n triggerAt: 'start',\n },\n );\n });\n\n it('objects', () => {\n funnel(\n (_: { readonly a: number }) => {\n // do nothing\n },\n {\n reducer: (reduced) => {\n expectTypeOf(reduced).toEqualTypeOf<\n { readonly a: number } | undefined\n >();\n\n return reduced!;\n },\n triggerAt: 'start',\n },\n );\n });\n});\n\ndescribe('prevent bad options', () => {\n it('minGapMs cannot be the only option with timing: end', () => {\n funnel(\n doNothing(),\n // @ts-expect-error [ts(2345)] -- minGapMs cannot be set alone]\n { minGapMs: 100 },\n );\n\n funnel(\n doNothing(),\n // @ts-expect-error [ts(2345)] -- minGapMs cannot be set alone]\n { triggerAt: 'end', minGapMs: 100 },\n );\n\n // But it works with \"start\" and \"both\"\n\n funnel(doNothing(), { triggerAt: 'start', minGapMs: 100 });\n funnel(doNothing(), { triggerAt: 'both', minGapMs: 100 });\n });\n});\n"],"mappings":"sIAMA,EAAS,yBAA8B,CACrC,EAAG,cAAiB,CAMlB,EALY,EAAO,GAAW,CAAE,CAC9B,QAAU,GAA0B,OACpC,UAAW,QACZ,CAAC,CAEe,KAAK,CAAC,WAAW,eAAmB,EACrD,CAEF,EAAG,wBAA2B,CAS5B,EARY,EAAO,GAAW,CAAE,CAE9B,SAAU,EAAuB,EAAW,EAAW,IACrD,OAEF,UAAW,QACZ,CAAC,CAEe,KAAK,CAAC,WAAW,eAE/B,EACH,CAEF,EAAG,oBAAuB,CAOxB,EANY,EAAO,GAAW,CAAE,CAE9B,SAAU,EAAuB,IAAe,OAChD,UAAW,QACZ,CAAC,CAEe,KAAK,CAAC,WAAW,eAAyC,EAC3E,CAEF,EAAG,gBAAmB,CASpB,EARY,EAAO,GAAW,CAAE,CAC9B,SAEG,EAAuB,GAAG,IAAsB,OAEnD,UAAW,QACZ,CAAC,CAEe,KAAK,CAAC,WAAW,eAA8B,EAChE,EACF,CAEF,EAAS,kEAAqE,CAC5E,EAAG,mBAAsB,CACvB,EACG,GAAc,GAGf,CACE,QAAU,IACR,EAAa,EAAQ,CAAC,eAAmC,CAElD,GAET,UAAW,QACZ,CACF,EACD,CAEF,EAAG,aAAgB,CACjB,EACG,GAA6B,GAG9B,CACE,QAAU,IACR,EAAa,EAAQ,CAAC,eAEnB,CAEI,GAET,UAAW,QACZ,CACF,EACD,CAEF,EAAG,cAAiB,CAClB,EACG,GAA8B,GAG/B,CACE,QAAU,IACR,EAAa,EAAQ,CAAC,eAEnB,CAEI,GAET,UAAW,QACZ,CACF,EACD,EACF,CAEF,EAAS,0BAA6B,CACpC,EAAG,0DAA6D,CAC9D,EACE,GAAW,CAEX,CAAE,SAAU,IAAK,CAClB,CAED,EACE,GAAW,CAEX,CAAE,UAAW,MAAO,SAAU,IAAK,CACpC,CAID,EAAO,GAAW,CAAE,CAAE,UAAW,QAAS,SAAU,IAAK,CAAC,CAC1D,EAAO,GAAW,CAAE,CAAE,UAAW,OAAQ,SAAU,IAAK,CAAC,EACzD,EACF"}
@@ -1 +1 @@
1
- const e=require(`./dist-3WF0YzcR.cjs`),t=require(`./constant-BuIJ9GIn.cjs`),n=require(`./do-nothing-Cc1faYu6.cjs`),r=require(`./funnel-CL-QFpGk.cjs`),i=require(`./sleep-1rGV3wAg.cjs`),a=16;function o(e,t){return e===void 0?[t]:[...e,t]}e.describe(`reducer behavior`,()=>{e.it(`passes the reduced arg to the executor`,()=>{let n=e.vi.fn();r.funnel(n,{reducer:t.constant(`hello world`),triggerAt:`start`,minQuietPeriodMs:16}).call(),e.globalExpect(n).toHaveBeenCalledTimes(1),e.globalExpect(n).toHaveBeenLastCalledWith(`hello world`)}),e.it(`reduces call args`,async()=>{let t=e.vi.fn(e=>{}),n=r.funnel(t,{reducer:(e,t)=>(e??0)+t,minQuietPeriodMs:32,triggerAt:`end`});n.call(1),n.call(2),n.call(3),await i.sleep(16),n.call(4),n.call(5),n.call(6),await i.sleep(32),e.globalExpect(t).toHaveBeenCalledTimes(1),e.globalExpect(t).toHaveBeenLastCalledWith(21)}),e.it(`does not invoke if reduceArgs returns undefined`,async()=>{let n=e.vi.fn();r.funnel(n,{reducer:t.constant(void 0),triggerAt:`end`,minQuietPeriodMs:16}).call(),await i.sleep(32),e.globalExpect(n).toHaveBeenCalledTimes(0)}),e.it(`supports multiple arguments`,()=>{let t=e.vi.fn();r.funnel(t,{reducer:(e,t,n,r)=>[e,t,n,r],triggerAt:`start`,minQuietPeriodMs:16}).call(1,`a`,!0),e.globalExpect(t).toHaveBeenCalledTimes(1),e.globalExpect(t).toHaveBeenLastCalledWith([void 0,1,`a`,!0])}),e.it(`reducer isn't called again when 'invokedAt: start'`,async()=>{let t=e.vi.fn(o),a=r.funnel(n.doNothing(),{reducer:t,triggerAt:`start`,minQuietPeriodMs:16});a.call(`a`),e.globalExpect(t).toHaveBeenCalledTimes(1),e.globalExpect(t).toHaveBeenLastCalledWith(void 0,`a`),a.call(`b`),a.call(`c`),e.globalExpect(t).toHaveBeenCalledTimes(1),await i.sleep(32),e.globalExpect(t).toHaveBeenCalledTimes(1)})}),e.describe(`non-trivial (>0ms) timer duration`,()=>{e.describe(`delay timer`,()=>{e.it(`invokedAt: start`,async()=>{let t=e.vi.fn(),n=r.funnel(t,{reducer:o,triggerAt:`start`,minGapMs:16});n.call(`a`),n.call(`b`),n.call(`c`),e.globalExpect(t).toHaveBeenCalledTimes(1),e.globalExpect(t).toHaveBeenLastCalledWith([`a`]),await i.sleep(16),e.globalExpect(t).toHaveBeenCalledTimes(1),n.call(`d`),e.globalExpect(t).toHaveBeenCalledTimes(2),e.globalExpect(t).toHaveBeenLastCalledWith([`d`])}),e.it(`invokedAt: both`,async()=>{let t=e.vi.fn(),n=r.funnel(t,{reducer:o,triggerAt:`both`,minGapMs:16});n.call(`a`),n.call(`b`),n.call(`c`),e.globalExpect(t).toHaveBeenCalledTimes(1),e.globalExpect(t).toHaveBeenLastCalledWith([`a`]),await i.sleep(16),e.globalExpect(t).toHaveBeenCalledTimes(2),e.globalExpect(t).toHaveBeenLastCalledWith([`b`,`c`]),n.call(`d`),n.call(`e`),n.call(`f`),e.globalExpect(t).toHaveBeenCalledTimes(2),await i.sleep(16),e.globalExpect(t).toHaveBeenCalledTimes(3),e.globalExpect(t).toHaveBeenLastCalledWith([`d`,`e`,`f`])}),e.it(`invocations in the middle of a window`,async()=>{let t=e.vi.fn(),n=r.funnel(t,{reducer:o,triggerAt:`both`,minGapMs:16});n.call(`a`),n.call(`b`),n.call(`c`),e.globalExpect(t).toHaveBeenCalledTimes(1),e.globalExpect(t).toHaveBeenLastCalledWith([`a`]),await i.sleep(.75*16),n.call(`d`),n.call(`e`),n.call(`f`),e.globalExpect(t).toHaveBeenCalledTimes(1),await i.sleep(.75*16),e.globalExpect(t).toHaveBeenCalledTimes(2),e.globalExpect(t).toHaveBeenLastCalledWith([`b`,`c`,`d`,`e`,`f`])})}),e.describe(`burst timer`,()=>{e.it(`invokedAt: start`,async()=>{let t=e.vi.fn(),n=r.funnel(t,{reducer:o,triggerAt:`start`,minQuietPeriodMs:16});n.call(`a`),n.call(`b`),n.call(`c`),e.globalExpect(t).toHaveBeenCalledTimes(1),e.globalExpect(t).toHaveBeenLastCalledWith([`a`]),await i.sleep(16),e.globalExpect(t).toHaveBeenCalledTimes(1),n.call(`d`),e.globalExpect(t).toHaveBeenCalledTimes(2),e.globalExpect(t).toHaveBeenLastCalledWith([`d`])}),e.it(`invokedAt: both`,async()=>{let t=e.vi.fn(),n=r.funnel(t,{reducer:o,triggerAt:`both`,minQuietPeriodMs:16});n.call(`a`),n.call(`b`),n.call(`c`),e.globalExpect(t).toHaveBeenCalledTimes(1),e.globalExpect(t).toHaveBeenLastCalledWith([`a`]),await i.sleep(16),e.globalExpect(t).toHaveBeenCalledTimes(2),e.globalExpect(t).toHaveBeenLastCalledWith([`b`,`c`]),n.call(`d`),n.call(`e`),n.call(`f`),e.globalExpect(t).toHaveBeenCalledTimes(3),e.globalExpect(t).toHaveBeenLastCalledWith([`d`]),await i.sleep(16),e.globalExpect(t).toHaveBeenCalledTimes(4),e.globalExpect(t).toHaveBeenLastCalledWith([`e`,`f`])}),e.it(`invokedAt: end`,async()=>{let t=e.vi.fn(),n=r.funnel(t,{reducer:o,triggerAt:`end`,minQuietPeriodMs:16});n.call(`a`),n.call(`b`),n.call(`c`),e.globalExpect(t).toHaveBeenCalledTimes(0),await i.sleep(16),e.globalExpect(t).toHaveBeenCalledTimes(1),e.globalExpect(t).toHaveBeenLastCalledWith([`a`,`b`,`c`]),n.call(`e`),n.call(`f`),n.call(`g`),e.globalExpect(t).toHaveBeenCalledTimes(1),await i.sleep(16),e.globalExpect(t).toHaveBeenCalledTimes(2),e.globalExpect(t).toHaveBeenLastCalledWith([`e`,`f`,`g`])}),e.it(`invocations in the middle of a window`,async()=>{let t=e.vi.fn(),n=r.funnel(t,{reducer:o,triggerAt:`end`,minQuietPeriodMs:16});n.call(`a`),n.call(`b`),n.call(`c`),e.globalExpect(t).toHaveBeenCalledTimes(0),await i.sleep(.9*16),n.call(`d`),n.call(`e`),n.call(`f`),e.globalExpect(t).toHaveBeenCalledTimes(0),await i.sleep(.1*16),e.globalExpect(t).toHaveBeenCalledTimes(0),await i.sleep(16),e.globalExpect(t).toHaveBeenCalledTimes(1),e.globalExpect(t).toHaveBeenLastCalledWith([`a`,`b`,`c`,`d`,`e`,`f`])}),e.it(`maxBurstDurationMs limits the burst duration`,async()=>{let t=e.vi.fn(),n=r.funnel(t,{reducer:o,minQuietPeriodMs:16,maxBurstDurationMs:32,triggerAt:`end`});n.call(`a`),await i.sleep(.75*16),n.call(`b`),await i.sleep(.75*16),n.call(`c`),e.globalExpect(t).toHaveBeenCalledTimes(0),await i.sleep(.75*16),e.globalExpect(t).toHaveBeenCalledTimes(1),e.globalExpect(t).toHaveBeenLastCalledWith([`a`,`b`,`c`])})}),e.describe(`both timers`,()=>{e.it(`delay is longer than burst`,async()=>{let t=e.vi.fn(),n=r.funnel(t,{reducer:o,minGapMs:32,minQuietPeriodMs:16,triggerAt:`both`});n.call(`a`),n.call(`b`),n.call(`c`),e.globalExpect(t).toHaveBeenCalledTimes(1),e.globalExpect(t).toHaveBeenLastCalledWith([`a`]),await i.sleep(16),n.call(`d`),n.call(`e`),n.call(`f`),e.globalExpect(t).toHaveBeenCalledTimes(1),await i.sleep(16),e.globalExpect(t).toHaveBeenCalledTimes(2),e.globalExpect(t).toHaveBeenLastCalledWith([`b`,`c`,`d`,`e`,`f`])}),e.it(`burst is longer than delay`,async()=>{let t=e.vi.fn(),n=r.funnel(t,{reducer:o,minGapMs:16,minQuietPeriodMs:32,triggerAt:`both`});n.call(`a`),n.call(`b`),n.call(`c`),e.globalExpect(t).toHaveBeenCalledTimes(1),e.globalExpect(t).toHaveBeenLastCalledWith([`a`]),await i.sleep(16),n.call(`d`),n.call(`e`),n.call(`f`),e.globalExpect(t).toHaveBeenCalledTimes(1),await i.sleep(16),e.globalExpect(t).toHaveBeenCalledTimes(1),await i.sleep(16),e.globalExpect(t).toHaveBeenCalledTimes(2),e.globalExpect(t).toHaveBeenLastCalledWith([`b`,`c`,`d`,`e`,`f`])}),e.it(`burst and delay are equal`,async()=>{let t=e.vi.fn(),n=r.funnel(t,{reducer:o,minGapMs:16,minQuietPeriodMs:16,triggerAt:`both`});n.call(`a`),n.call(`b`),n.call(`c`),e.globalExpect(t).toHaveBeenCalledTimes(1),e.globalExpect(t).toHaveBeenLastCalledWith([`a`]),await i.sleep(16),n.call(`d`),n.call(`e`),n.call(`f`),e.globalExpect(t).toHaveBeenCalledTimes(2),e.globalExpect(t).toHaveBeenLastCalledWith([`b`,`c`]),await i.sleep(16),e.globalExpect(t).toHaveBeenCalledTimes(3),e.globalExpect(t).toHaveBeenLastCalledWith([`d`,`e`,`f`])}),e.it(`delay and maxBurstDurationMs are equal`,async()=>{let t=e.vi.fn(),n=r.funnel(t,{reducer:o,minGapMs:16,minQuietPeriodMs:32,maxBurstDurationMs:16,triggerAt:`both`});n.call(`a`),n.call(`b`),n.call(`c`),e.globalExpect(t).toHaveBeenCalledTimes(1),e.globalExpect(t).toHaveBeenLastCalledWith([`a`]),await i.sleep(16),n.call(`d`),n.call(`e`),n.call(`f`),e.globalExpect(t).toHaveBeenCalledTimes(2),e.globalExpect(t).toHaveBeenLastCalledWith([`b`,`c`]),await i.sleep(16),e.globalExpect(t).toHaveBeenCalledTimes(3),e.globalExpect(t).toHaveBeenLastCalledWith([`d`,`e`,`f`])})})}),e.describe(`immediate (===0) timer durations`,()=>{e.describe(`delay timer`,()=>{e.it(`invokedAt: start`,async()=>{let t=e.vi.fn(),n=r.funnel(t,{reducer:o,triggerAt:`start`,minGapMs:0});n.call(`a`),n.call(`b`),n.call(`c`),e.globalExpect(t).toHaveBeenCalledTimes(1),e.globalExpect(t).toHaveBeenLastCalledWith([`a`]),await i.sleep(0),n.call(`d`),n.call(`e`),n.call(`f`),e.globalExpect(t).toHaveBeenCalledTimes(2),e.globalExpect(t).toHaveBeenLastCalledWith([`d`]),await i.sleep(0),e.globalExpect(t).toHaveBeenCalledTimes(2)}),e.it(`invokedAt: both`,async()=>{let t=e.vi.fn(),n=r.funnel(t,{reducer:o,triggerAt:`both`,minGapMs:0});n.call(`a`),n.call(`b`),n.call(`c`),e.globalExpect(t).toHaveBeenCalledTimes(1),e.globalExpect(t).toHaveBeenLastCalledWith([`a`]),await i.sleep(0),n.call(`d`),n.call(`e`),n.call(`f`),e.globalExpect(t).toHaveBeenCalledTimes(2),e.globalExpect(t).toHaveBeenLastCalledWith([`b`,`c`]),await i.sleep(0),e.globalExpect(t).toHaveBeenCalledTimes(3),e.globalExpect(t).toHaveBeenLastCalledWith([`d`,`e`,`f`])}),e.it(`with a non-trivial burst timer`,async()=>{let t=e.vi.fn(),n=r.funnel(t,{reducer:o,triggerAt:`both`,minGapMs:0,minQuietPeriodMs:16});n.call(`a`),e.globalExpect(t).toHaveBeenCalledTimes(1),e.globalExpect(t).toHaveBeenLastCalledWith([`a`]),n.call(`b`),e.globalExpect(t).toHaveBeenCalledTimes(1),await i.sleep(16),e.globalExpect(t).toHaveBeenCalledTimes(2),e.globalExpect(t).toHaveBeenLastCalledWith([`b`])})}),e.describe(`burst timer`,()=>{e.it(`invokedAt: start`,async()=>{let t=e.vi.fn(),n=r.funnel(t,{reducer:o,triggerAt:`start`,minQuietPeriodMs:0});n.call(`a`),n.call(`b`),n.call(`c`),e.globalExpect(t).toHaveBeenCalledTimes(1),e.globalExpect(t).toHaveBeenLastCalledWith([`a`]),await i.sleep(0),n.call(`d`),n.call(`e`),n.call(`f`),e.globalExpect(t).toHaveBeenCalledTimes(2),e.globalExpect(t).toHaveBeenLastCalledWith([`d`]),await i.sleep(0),e.globalExpect(t).toHaveBeenCalledTimes(2)}),e.it(`invokedAt: both`,async()=>{let t=e.vi.fn(),n=r.funnel(t,{reducer:o,triggerAt:`both`,minQuietPeriodMs:0});n.call(`a`),n.call(`b`),n.call(`c`),e.globalExpect(t).toHaveBeenCalledTimes(1),e.globalExpect(t).toHaveBeenLastCalledWith([`a`]),await i.sleep(0),e.globalExpect(t).toHaveBeenCalledTimes(2),e.globalExpect(t).toHaveBeenLastCalledWith([`b`,`c`]),n.call(`d`),n.call(`e`),n.call(`f`),e.globalExpect(t).toHaveBeenCalledTimes(3),e.globalExpect(t).toHaveBeenLastCalledWith([`d`]),await i.sleep(0),e.globalExpect(t).toHaveBeenCalledTimes(4),e.globalExpect(t).toHaveBeenLastCalledWith([`e`,`f`])}),e.it(`invokedAt: end`,async()=>{let t=e.vi.fn(),n=r.funnel(t,{reducer:o,triggerAt:`end`,minQuietPeriodMs:0});n.call(`a`),n.call(`b`),n.call(`c`),e.globalExpect(t).toHaveBeenCalledTimes(0),await i.sleep(0),e.globalExpect(t).toHaveBeenCalledTimes(1),e.globalExpect(t).toHaveBeenLastCalledWith([`a`,`b`,`c`]),n.call(`d`),n.call(`e`),n.call(`f`),e.globalExpect(t).toHaveBeenCalledTimes(1),await i.sleep(0),e.globalExpect(t).toHaveBeenCalledTimes(2),e.globalExpect(t).toHaveBeenLastCalledWith([`d`,`e`,`f`])}),e.it(`with a non-trivial delay timer`,async()=>{let t=e.vi.fn(),n=r.funnel(t,{reducer:o,triggerAt:`both`,minGapMs:16,minQuietPeriodMs:0});n.call(`a`),n.call(`b`),e.globalExpect(t).toHaveBeenCalledTimes(1),e.globalExpect(t).toHaveBeenLastCalledWith([`a`]),await i.sleep(0),e.globalExpect(t).toHaveBeenCalledTimes(1),await i.sleep(16),e.globalExpect(t).toHaveBeenCalledTimes(2),e.globalExpect(t).toHaveBeenLastCalledWith([`b`])}),e.it(`burst timer with non-trivial maxBurstDuration`,async()=>{let t=e.vi.fn(),n=r.funnel(t,{reducer:o,minQuietPeriodMs:0,maxBurstDurationMs:16,triggerAt:`end`});n.call(`a`),n.call(`b`),n.call(`c`),e.globalExpect(t).toHaveBeenCalledTimes(0),await i.sleep(0),e.globalExpect(t).toHaveBeenCalledTimes(1),e.globalExpect(t).toHaveBeenLastCalledWith([`a`,`b`,`c`])})}),e.it(`both timers`,async()=>{let t=e.vi.fn();r.funnel(t,{reducer:o,triggerAt:`both`,minGapMs:0,minQuietPeriodMs:0}).call(`a`),e.globalExpect(t).toHaveBeenCalledTimes(1),e.globalExpect(t).toHaveBeenLastCalledWith([`a`]),await i.sleep(0),e.globalExpect(t).toHaveBeenCalledTimes(1)}),e.it(`maxBurstDurationMs = 0 limits the burst immediately`,async()=>{let t=e.vi.fn();r.funnel(t,{reducer:o,triggerAt:`end`,minQuietPeriodMs:16,maxBurstDurationMs:0}).call(`a`),await i.sleep(0),e.globalExpect(t).toHaveBeenCalledTimes(1),e.globalExpect(t).toHaveBeenLastCalledWith([`a`])}),e.it(`all timeouts zero`,async()=>{let t=e.vi.fn(),n=r.funnel(t,{reducer:o,triggerAt:`both`,minGapMs:0,minQuietPeriodMs:0,maxBurstDurationMs:0});n.call(`a`),n.call(`b`),e.globalExpect(t).toHaveBeenCalledTimes(1),e.globalExpect(t).toHaveBeenLastCalledWith([`a`]),await i.sleep(0),e.globalExpect(t).toHaveBeenCalledTimes(2),e.globalExpect(t).toHaveBeenLastCalledWith([`b`])})}),e.describe(`default minQuietPeriodMs === 0 when minGapMs is not defined`,()=>{e.it(`invokedAt: start`,async()=>{let t=e.vi.fn(),n=r.funnel(t,{reducer:o,triggerAt:`start`});n.call(`a`),e.globalExpect(t).toHaveBeenCalledTimes(1),e.globalExpect(t).toHaveBeenLastCalledWith([`a`]),n.call(`b`),e.globalExpect(t).toHaveBeenCalledTimes(1),await i.sleep(0),e.globalExpect(t).toHaveBeenCalledTimes(1),n.call(`c`),e.globalExpect(t).toHaveBeenCalledTimes(2),e.globalExpect(t).toHaveBeenLastCalledWith([`c`])}),e.it(`invokedAt: both`,async()=>{let t=e.vi.fn(),n=r.funnel(t,{reducer:o,triggerAt:`both`});n.call(`a`),e.globalExpect(t).toHaveBeenCalledTimes(1),e.globalExpect(t).toHaveBeenLastCalledWith([`a`]),n.call(`b`),e.globalExpect(t).toHaveBeenCalledTimes(1),await i.sleep(0),e.globalExpect(t).toHaveBeenCalledTimes(2),e.globalExpect(t).toHaveBeenLastCalledWith([`b`]),n.call(`c`),e.globalExpect(t).toHaveBeenCalledTimes(3),e.globalExpect(t).toHaveBeenLastCalledWith([`c`])})}),e.describe(`utility functions`,()=>{e.describe(`flush`,()=>{e.it(`flush triggers an immediate invocation`,async()=>{let t=e.vi.fn(),n=r.funnel(t,{reducer:o,triggerAt:`end`,minQuietPeriodMs:16});n.call(`a`),n.call(`b`),n.call(`c`),n.flush(),e.globalExpect(t).toHaveBeenCalledTimes(1),e.globalExpect(t).toHaveBeenLastCalledWith([`a`,`b`,`c`]),await i.sleep(16),e.globalExpect(t).toHaveBeenCalledTimes(1)}),e.it(`flush during active burst`,async()=>{let t=e.vi.fn(),n=r.funnel(t,{reducer:o,triggerAt:`end`,minQuietPeriodMs:32});n.call(`a`),n.call(`b`),n.call(`c`),await i.sleep(16),n.flush(),e.globalExpect(t).toHaveBeenCalledTimes(1),e.globalExpect(t).toHaveBeenLastCalledWith([`a`,`b`,`c`]),await i.sleep(32),e.globalExpect(t).toHaveBeenCalledTimes(1)})}),e.describe(`cancel`,()=>{e.it(`cancel prevents invocation`,async()=>{let t=e.vi.fn(),n=r.funnel(t,{reducer:o,triggerAt:`end`,minQuietPeriodMs:16});n.call(`a`),n.call(`b`),n.call(`c`),n.cancel(),await i.sleep(16),e.globalExpect(t).toHaveBeenCalledTimes(0)}),e.it(`cancel during delay period`,async()=>{let t=e.vi.fn(),n=r.funnel(t,{reducer:o,triggerAt:`start`,minGapMs:32});n.call(`a`),n.call(`b`),await i.sleep(16),n.cancel(),await i.sleep(16),e.globalExpect(t).toHaveBeenCalledTimes(1)})}),e.describe(`isIdle`,()=>{e.it(`isIdle reflects the funnel's state`,()=>{let t=r.funnel(e.vi.fn(),{reducer:o,triggerAt:`end`,minQuietPeriodMs:16});e.globalExpect(t.isIdle).toBe(!0),t.call(`a`),e.globalExpect(t.isIdle).toBe(!1),t.cancel(),e.globalExpect(t.isIdle).toBe(!0)}),e.it(`isIdle works when burst duration is 0`,async()=>{let t=r.funnel(e.vi.fn(),{reducer:o,triggerAt:`end`,minQuietPeriodMs:0});e.globalExpect(t.isIdle).toBe(!0),t.call(`a`),t.call(`b`),t.call(`c`),e.globalExpect(t.isIdle).toBe(!1),await i.sleep(0),e.globalExpect(t.isIdle).toBe(!0)})})}),e.describe(`edge-cases`,()=>{e.it(`bursts that start late don't prevent delayed invocations`,async()=>{let t=e.vi.fn(),n=r.funnel(t,{reducer:o,triggerAt:`both`,minQuietPeriodMs:16,minGapMs:32});n.call(`a`),n.call(`b`),n.call(`c`),e.globalExpect(t).toHaveBeenCalledTimes(1),e.globalExpect(t).toHaveBeenLastCalledWith([`a`]),await i.sleep(1.5*16),e.globalExpect(t).toHaveBeenCalledTimes(1),n.call(`d`),n.call(`e`),n.call(`f`),e.globalExpect(t).toHaveBeenCalledTimes(1),await i.sleep(.5*16),e.globalExpect(t).toHaveBeenCalledTimes(2),e.globalExpect(t).toHaveBeenLastCalledWith([`b`,`c`,`d`,`e`,`f`])}),e.it(`delay timeouts don't cause an invocation in the middle of bursts`,async()=>{let t=e.vi.fn(),n=r.funnel(t,{reducer:o,triggerAt:`both`,minQuietPeriodMs:32,minGapMs:16});n.call(`a`),e.globalExpect(t).toHaveBeenCalledTimes(1),e.globalExpect(t).toHaveBeenLastCalledWith([`a`]),await i.sleep(16),n.call(`b`),e.globalExpect(t).toHaveBeenCalledTimes(1),await i.sleep(16),n.call(`c`),e.globalExpect(t).toHaveBeenCalledTimes(1),await i.sleep(16),n.call(`d`),e.globalExpect(t).toHaveBeenCalledTimes(1),await i.sleep(16),e.globalExpect(t).toHaveBeenCalledTimes(1),await i.sleep(16),e.globalExpect(t).toHaveBeenCalledTimes(2)})});
1
+ const e=require(`./dist-8XtUY3ad.cjs`),t=require(`./constant.cjs`),n=require(`./do-nothing.cjs`),r=require(`./funnel.cjs`),i=require(`./sleep.cjs`),a=16;function o(e,t){return e===void 0?[t]:[...e,t]}e.i(`reducer behavior`,()=>{e.a(`passes the reduced arg to the executor`,()=>{let n=e.r.fn();r.funnel(n,{reducer:t.constant(`hello world`),triggerAt:`start`,minQuietPeriodMs:16}).call(),e.n(n).toHaveBeenCalledTimes(1),e.n(n).toHaveBeenLastCalledWith(`hello world`)}),e.a(`reduces call args`,async()=>{let t=e.r.fn(e=>{}),n=r.funnel(t,{reducer:(e,t)=>(e??0)+t,minQuietPeriodMs:32,triggerAt:`end`});n.call(1),n.call(2),n.call(3),await i.sleep(16),n.call(4),n.call(5),n.call(6),await i.sleep(32),e.n(t).toHaveBeenCalledTimes(1),e.n(t).toHaveBeenLastCalledWith(21)}),e.a(`does not invoke if reduceArgs returns undefined`,async()=>{let n=e.r.fn();r.funnel(n,{reducer:t.constant(void 0),triggerAt:`end`,minQuietPeriodMs:16}).call(),await i.sleep(32),e.n(n).toHaveBeenCalledTimes(0)}),e.a(`supports multiple arguments`,()=>{let t=e.r.fn();r.funnel(t,{reducer:(e,t,n,r)=>[e,t,n,r],triggerAt:`start`,minQuietPeriodMs:16}).call(1,`a`,!0),e.n(t).toHaveBeenCalledTimes(1),e.n(t).toHaveBeenLastCalledWith([void 0,1,`a`,!0])}),e.a(`reducer isn't called again when 'invokedAt: start'`,async()=>{let t=e.r.fn(o),a=r.funnel(n.doNothing(),{reducer:t,triggerAt:`start`,minQuietPeriodMs:16});a.call(`a`),e.n(t).toHaveBeenCalledTimes(1),e.n(t).toHaveBeenLastCalledWith(void 0,`a`),a.call(`b`),a.call(`c`),e.n(t).toHaveBeenCalledTimes(1),await i.sleep(32),e.n(t).toHaveBeenCalledTimes(1)})}),e.i(`non-trivial (>0ms) timer duration`,()=>{e.i(`delay timer`,()=>{e.a(`invokedAt: start`,async()=>{let t=e.r.fn(),n=r.funnel(t,{reducer:o,triggerAt:`start`,minGapMs:16});n.call(`a`),n.call(`b`),n.call(`c`),e.n(t).toHaveBeenCalledTimes(1),e.n(t).toHaveBeenLastCalledWith([`a`]),await i.sleep(16),e.n(t).toHaveBeenCalledTimes(1),n.call(`d`),e.n(t).toHaveBeenCalledTimes(2),e.n(t).toHaveBeenLastCalledWith([`d`])}),e.a(`invokedAt: both`,async()=>{let t=e.r.fn(),n=r.funnel(t,{reducer:o,triggerAt:`both`,minGapMs:16});n.call(`a`),n.call(`b`),n.call(`c`),e.n(t).toHaveBeenCalledTimes(1),e.n(t).toHaveBeenLastCalledWith([`a`]),await i.sleep(16),e.n(t).toHaveBeenCalledTimes(2),e.n(t).toHaveBeenLastCalledWith([`b`,`c`]),n.call(`d`),n.call(`e`),n.call(`f`),e.n(t).toHaveBeenCalledTimes(2),await i.sleep(16),e.n(t).toHaveBeenCalledTimes(3),e.n(t).toHaveBeenLastCalledWith([`d`,`e`,`f`])}),e.a(`invocations in the middle of a window`,async()=>{let t=e.r.fn(),n=r.funnel(t,{reducer:o,triggerAt:`both`,minGapMs:16});n.call(`a`),n.call(`b`),n.call(`c`),e.n(t).toHaveBeenCalledTimes(1),e.n(t).toHaveBeenLastCalledWith([`a`]),await i.sleep(.75*16),n.call(`d`),n.call(`e`),n.call(`f`),e.n(t).toHaveBeenCalledTimes(1),await i.sleep(.75*16),e.n(t).toHaveBeenCalledTimes(2),e.n(t).toHaveBeenLastCalledWith([`b`,`c`,`d`,`e`,`f`])})}),e.i(`burst timer`,()=>{e.a(`invokedAt: start`,async()=>{let t=e.r.fn(),n=r.funnel(t,{reducer:o,triggerAt:`start`,minQuietPeriodMs:16});n.call(`a`),n.call(`b`),n.call(`c`),e.n(t).toHaveBeenCalledTimes(1),e.n(t).toHaveBeenLastCalledWith([`a`]),await i.sleep(16),e.n(t).toHaveBeenCalledTimes(1),n.call(`d`),e.n(t).toHaveBeenCalledTimes(2),e.n(t).toHaveBeenLastCalledWith([`d`])}),e.a(`invokedAt: both`,async()=>{let t=e.r.fn(),n=r.funnel(t,{reducer:o,triggerAt:`both`,minQuietPeriodMs:16});n.call(`a`),n.call(`b`),n.call(`c`),e.n(t).toHaveBeenCalledTimes(1),e.n(t).toHaveBeenLastCalledWith([`a`]),await i.sleep(16),e.n(t).toHaveBeenCalledTimes(2),e.n(t).toHaveBeenLastCalledWith([`b`,`c`]),n.call(`d`),n.call(`e`),n.call(`f`),e.n(t).toHaveBeenCalledTimes(3),e.n(t).toHaveBeenLastCalledWith([`d`]),await i.sleep(16),e.n(t).toHaveBeenCalledTimes(4),e.n(t).toHaveBeenLastCalledWith([`e`,`f`])}),e.a(`invokedAt: end`,async()=>{let t=e.r.fn(),n=r.funnel(t,{reducer:o,triggerAt:`end`,minQuietPeriodMs:16});n.call(`a`),n.call(`b`),n.call(`c`),e.n(t).toHaveBeenCalledTimes(0),await i.sleep(16),e.n(t).toHaveBeenCalledTimes(1),e.n(t).toHaveBeenLastCalledWith([`a`,`b`,`c`]),n.call(`e`),n.call(`f`),n.call(`g`),e.n(t).toHaveBeenCalledTimes(1),await i.sleep(16),e.n(t).toHaveBeenCalledTimes(2),e.n(t).toHaveBeenLastCalledWith([`e`,`f`,`g`])}),e.a(`invocations in the middle of a window`,async()=>{let t=e.r.fn(),n=r.funnel(t,{reducer:o,triggerAt:`end`,minQuietPeriodMs:16});n.call(`a`),n.call(`b`),n.call(`c`),e.n(t).toHaveBeenCalledTimes(0),await i.sleep(.9*16),n.call(`d`),n.call(`e`),n.call(`f`),e.n(t).toHaveBeenCalledTimes(0),await i.sleep(.1*16),e.n(t).toHaveBeenCalledTimes(0),await i.sleep(16),e.n(t).toHaveBeenCalledTimes(1),e.n(t).toHaveBeenLastCalledWith([`a`,`b`,`c`,`d`,`e`,`f`])}),e.a(`maxBurstDurationMs limits the burst duration`,async()=>{let t=e.r.fn(),n=r.funnel(t,{reducer:o,minQuietPeriodMs:16,maxBurstDurationMs:32,triggerAt:`end`});n.call(`a`),await i.sleep(.75*16),n.call(`b`),await i.sleep(.75*16),n.call(`c`),e.n(t).toHaveBeenCalledTimes(0),await i.sleep(.75*16),e.n(t).toHaveBeenCalledTimes(1),e.n(t).toHaveBeenLastCalledWith([`a`,`b`,`c`])})}),e.i(`both timers`,()=>{e.a(`delay is longer than burst`,async()=>{let t=e.r.fn(),n=r.funnel(t,{reducer:o,minGapMs:32,minQuietPeriodMs:16,triggerAt:`both`});n.call(`a`),n.call(`b`),n.call(`c`),e.n(t).toHaveBeenCalledTimes(1),e.n(t).toHaveBeenLastCalledWith([`a`]),await i.sleep(16),n.call(`d`),n.call(`e`),n.call(`f`),e.n(t).toHaveBeenCalledTimes(1),await i.sleep(16),e.n(t).toHaveBeenCalledTimes(2),e.n(t).toHaveBeenLastCalledWith([`b`,`c`,`d`,`e`,`f`])}),e.a(`burst is longer than delay`,async()=>{let t=e.r.fn(),n=r.funnel(t,{reducer:o,minGapMs:16,minQuietPeriodMs:32,triggerAt:`both`});n.call(`a`),n.call(`b`),n.call(`c`),e.n(t).toHaveBeenCalledTimes(1),e.n(t).toHaveBeenLastCalledWith([`a`]),await i.sleep(16),n.call(`d`),n.call(`e`),n.call(`f`),e.n(t).toHaveBeenCalledTimes(1),await i.sleep(16),e.n(t).toHaveBeenCalledTimes(1),await i.sleep(16),e.n(t).toHaveBeenCalledTimes(2),e.n(t).toHaveBeenLastCalledWith([`b`,`c`,`d`,`e`,`f`])}),e.a(`burst and delay are equal`,async()=>{let t=e.r.fn(),n=r.funnel(t,{reducer:o,minGapMs:16,minQuietPeriodMs:16,triggerAt:`both`});n.call(`a`),n.call(`b`),n.call(`c`),e.n(t).toHaveBeenCalledTimes(1),e.n(t).toHaveBeenLastCalledWith([`a`]),await i.sleep(16),n.call(`d`),n.call(`e`),n.call(`f`),e.n(t).toHaveBeenCalledTimes(2),e.n(t).toHaveBeenLastCalledWith([`b`,`c`]),await i.sleep(16),e.n(t).toHaveBeenCalledTimes(3),e.n(t).toHaveBeenLastCalledWith([`d`,`e`,`f`])}),e.a(`delay and maxBurstDurationMs are equal`,async()=>{let t=e.r.fn(),n=r.funnel(t,{reducer:o,minGapMs:16,minQuietPeriodMs:32,maxBurstDurationMs:16,triggerAt:`both`});n.call(`a`),n.call(`b`),n.call(`c`),e.n(t).toHaveBeenCalledTimes(1),e.n(t).toHaveBeenLastCalledWith([`a`]),await i.sleep(16),n.call(`d`),n.call(`e`),n.call(`f`),e.n(t).toHaveBeenCalledTimes(2),e.n(t).toHaveBeenLastCalledWith([`b`,`c`]),await i.sleep(16),e.n(t).toHaveBeenCalledTimes(3),e.n(t).toHaveBeenLastCalledWith([`d`,`e`,`f`])})})}),e.i(`immediate (===0) timer durations`,()=>{e.i(`delay timer`,()=>{e.a(`invokedAt: start`,async()=>{let t=e.r.fn(),n=r.funnel(t,{reducer:o,triggerAt:`start`,minGapMs:0});n.call(`a`),n.call(`b`),n.call(`c`),e.n(t).toHaveBeenCalledTimes(1),e.n(t).toHaveBeenLastCalledWith([`a`]),await i.sleep(0),n.call(`d`),n.call(`e`),n.call(`f`),e.n(t).toHaveBeenCalledTimes(2),e.n(t).toHaveBeenLastCalledWith([`d`]),await i.sleep(0),e.n(t).toHaveBeenCalledTimes(2)}),e.a(`invokedAt: both`,async()=>{let t=e.r.fn(),n=r.funnel(t,{reducer:o,triggerAt:`both`,minGapMs:0});n.call(`a`),n.call(`b`),n.call(`c`),e.n(t).toHaveBeenCalledTimes(1),e.n(t).toHaveBeenLastCalledWith([`a`]),await i.sleep(0),n.call(`d`),n.call(`e`),n.call(`f`),e.n(t).toHaveBeenCalledTimes(2),e.n(t).toHaveBeenLastCalledWith([`b`,`c`]),await i.sleep(0),e.n(t).toHaveBeenCalledTimes(3),e.n(t).toHaveBeenLastCalledWith([`d`,`e`,`f`])}),e.a(`with a non-trivial burst timer`,async()=>{let t=e.r.fn(),n=r.funnel(t,{reducer:o,triggerAt:`both`,minGapMs:0,minQuietPeriodMs:16});n.call(`a`),e.n(t).toHaveBeenCalledTimes(1),e.n(t).toHaveBeenLastCalledWith([`a`]),n.call(`b`),e.n(t).toHaveBeenCalledTimes(1),await i.sleep(16),e.n(t).toHaveBeenCalledTimes(2),e.n(t).toHaveBeenLastCalledWith([`b`])})}),e.i(`burst timer`,()=>{e.a(`invokedAt: start`,async()=>{let t=e.r.fn(),n=r.funnel(t,{reducer:o,triggerAt:`start`,minQuietPeriodMs:0});n.call(`a`),n.call(`b`),n.call(`c`),e.n(t).toHaveBeenCalledTimes(1),e.n(t).toHaveBeenLastCalledWith([`a`]),await i.sleep(0),n.call(`d`),n.call(`e`),n.call(`f`),e.n(t).toHaveBeenCalledTimes(2),e.n(t).toHaveBeenLastCalledWith([`d`]),await i.sleep(0),e.n(t).toHaveBeenCalledTimes(2)}),e.a(`invokedAt: both`,async()=>{let t=e.r.fn(),n=r.funnel(t,{reducer:o,triggerAt:`both`,minQuietPeriodMs:0});n.call(`a`),n.call(`b`),n.call(`c`),e.n(t).toHaveBeenCalledTimes(1),e.n(t).toHaveBeenLastCalledWith([`a`]),await i.sleep(0),e.n(t).toHaveBeenCalledTimes(2),e.n(t).toHaveBeenLastCalledWith([`b`,`c`]),n.call(`d`),n.call(`e`),n.call(`f`),e.n(t).toHaveBeenCalledTimes(3),e.n(t).toHaveBeenLastCalledWith([`d`]),await i.sleep(0),e.n(t).toHaveBeenCalledTimes(4),e.n(t).toHaveBeenLastCalledWith([`e`,`f`])}),e.a(`invokedAt: end`,async()=>{let t=e.r.fn(),n=r.funnel(t,{reducer:o,triggerAt:`end`,minQuietPeriodMs:0});n.call(`a`),n.call(`b`),n.call(`c`),e.n(t).toHaveBeenCalledTimes(0),await i.sleep(0),e.n(t).toHaveBeenCalledTimes(1),e.n(t).toHaveBeenLastCalledWith([`a`,`b`,`c`]),n.call(`d`),n.call(`e`),n.call(`f`),e.n(t).toHaveBeenCalledTimes(1),await i.sleep(0),e.n(t).toHaveBeenCalledTimes(2),e.n(t).toHaveBeenLastCalledWith([`d`,`e`,`f`])}),e.a(`with a non-trivial delay timer`,async()=>{let t=e.r.fn(),n=r.funnel(t,{reducer:o,triggerAt:`both`,minGapMs:16,minQuietPeriodMs:0});n.call(`a`),n.call(`b`),e.n(t).toHaveBeenCalledTimes(1),e.n(t).toHaveBeenLastCalledWith([`a`]),await i.sleep(0),e.n(t).toHaveBeenCalledTimes(1),await i.sleep(16),e.n(t).toHaveBeenCalledTimes(2),e.n(t).toHaveBeenLastCalledWith([`b`])}),e.a(`burst timer with non-trivial maxBurstDuration`,async()=>{let t=e.r.fn(),n=r.funnel(t,{reducer:o,minQuietPeriodMs:0,maxBurstDurationMs:16,triggerAt:`end`});n.call(`a`),n.call(`b`),n.call(`c`),e.n(t).toHaveBeenCalledTimes(0),await i.sleep(0),e.n(t).toHaveBeenCalledTimes(1),e.n(t).toHaveBeenLastCalledWith([`a`,`b`,`c`])})}),e.a(`both timers`,async()=>{let t=e.r.fn();r.funnel(t,{reducer:o,triggerAt:`both`,minGapMs:0,minQuietPeriodMs:0}).call(`a`),e.n(t).toHaveBeenCalledTimes(1),e.n(t).toHaveBeenLastCalledWith([`a`]),await i.sleep(0),e.n(t).toHaveBeenCalledTimes(1)}),e.a(`maxBurstDurationMs = 0 limits the burst immediately`,async()=>{let t=e.r.fn();r.funnel(t,{reducer:o,triggerAt:`end`,minQuietPeriodMs:16,maxBurstDurationMs:0}).call(`a`),await i.sleep(0),e.n(t).toHaveBeenCalledTimes(1),e.n(t).toHaveBeenLastCalledWith([`a`])}),e.a(`all timeouts zero`,async()=>{let t=e.r.fn(),n=r.funnel(t,{reducer:o,triggerAt:`both`,minGapMs:0,minQuietPeriodMs:0,maxBurstDurationMs:0});n.call(`a`),n.call(`b`),e.n(t).toHaveBeenCalledTimes(1),e.n(t).toHaveBeenLastCalledWith([`a`]),await i.sleep(0),e.n(t).toHaveBeenCalledTimes(2),e.n(t).toHaveBeenLastCalledWith([`b`])})}),e.i(`default minQuietPeriodMs === 0 when minGapMs is not defined`,()=>{e.a(`invokedAt: start`,async()=>{let t=e.r.fn(),n=r.funnel(t,{reducer:o,triggerAt:`start`});n.call(`a`),e.n(t).toHaveBeenCalledTimes(1),e.n(t).toHaveBeenLastCalledWith([`a`]),n.call(`b`),e.n(t).toHaveBeenCalledTimes(1),await i.sleep(0),e.n(t).toHaveBeenCalledTimes(1),n.call(`c`),e.n(t).toHaveBeenCalledTimes(2),e.n(t).toHaveBeenLastCalledWith([`c`])}),e.a(`invokedAt: both`,async()=>{let t=e.r.fn(),n=r.funnel(t,{reducer:o,triggerAt:`both`});n.call(`a`),e.n(t).toHaveBeenCalledTimes(1),e.n(t).toHaveBeenLastCalledWith([`a`]),n.call(`b`),e.n(t).toHaveBeenCalledTimes(1),await i.sleep(0),e.n(t).toHaveBeenCalledTimes(2),e.n(t).toHaveBeenLastCalledWith([`b`]),n.call(`c`),e.n(t).toHaveBeenCalledTimes(3),e.n(t).toHaveBeenLastCalledWith([`c`])})}),e.i(`utility functions`,()=>{e.i(`flush`,()=>{e.a(`flush triggers an immediate invocation`,async()=>{let t=e.r.fn(),n=r.funnel(t,{reducer:o,triggerAt:`end`,minQuietPeriodMs:16});n.call(`a`),n.call(`b`),n.call(`c`),n.flush(),e.n(t).toHaveBeenCalledTimes(1),e.n(t).toHaveBeenLastCalledWith([`a`,`b`,`c`]),await i.sleep(16),e.n(t).toHaveBeenCalledTimes(1)}),e.a(`flush during active burst`,async()=>{let t=e.r.fn(),n=r.funnel(t,{reducer:o,triggerAt:`end`,minQuietPeriodMs:32});n.call(`a`),n.call(`b`),n.call(`c`),await i.sleep(16),n.flush(),e.n(t).toHaveBeenCalledTimes(1),e.n(t).toHaveBeenLastCalledWith([`a`,`b`,`c`]),await i.sleep(32),e.n(t).toHaveBeenCalledTimes(1)})}),e.i(`cancel`,()=>{e.a(`cancel prevents invocation`,async()=>{let t=e.r.fn(),n=r.funnel(t,{reducer:o,triggerAt:`end`,minQuietPeriodMs:16});n.call(`a`),n.call(`b`),n.call(`c`),n.cancel(),await i.sleep(16),e.n(t).toHaveBeenCalledTimes(0)}),e.a(`cancel during delay period`,async()=>{let t=e.r.fn(),n=r.funnel(t,{reducer:o,triggerAt:`start`,minGapMs:32});n.call(`a`),n.call(`b`),await i.sleep(16),n.cancel(),await i.sleep(16),e.n(t).toHaveBeenCalledTimes(1)})}),e.i(`isIdle`,()=>{e.a(`isIdle reflects the funnel's state`,()=>{let t=r.funnel(e.r.fn(),{reducer:o,triggerAt:`end`,minQuietPeriodMs:16});e.n(t.isIdle).toBe(!0),t.call(`a`),e.n(t.isIdle).toBe(!1),t.cancel(),e.n(t.isIdle).toBe(!0)}),e.a(`isIdle works when burst duration is 0`,async()=>{let t=r.funnel(e.r.fn(),{reducer:o,triggerAt:`end`,minQuietPeriodMs:0});e.n(t.isIdle).toBe(!0),t.call(`a`),t.call(`b`),t.call(`c`),e.n(t.isIdle).toBe(!1),await i.sleep(0),e.n(t.isIdle).toBe(!0)})})}),e.i(`edge-cases`,()=>{e.a(`bursts that start late don't prevent delayed invocations`,async()=>{let t=e.r.fn(),n=r.funnel(t,{reducer:o,triggerAt:`both`,minQuietPeriodMs:16,minGapMs:32});n.call(`a`),n.call(`b`),n.call(`c`),e.n(t).toHaveBeenCalledTimes(1),e.n(t).toHaveBeenLastCalledWith([`a`]),await i.sleep(1.5*16),e.n(t).toHaveBeenCalledTimes(1),n.call(`d`),n.call(`e`),n.call(`f`),e.n(t).toHaveBeenCalledTimes(1),await i.sleep(.5*16),e.n(t).toHaveBeenCalledTimes(2),e.n(t).toHaveBeenLastCalledWith([`b`,`c`,`d`,`e`,`f`])}),e.a(`delay timeouts don't cause an invocation in the middle of bursts`,async()=>{let t=e.r.fn(),n=r.funnel(t,{reducer:o,triggerAt:`both`,minQuietPeriodMs:32,minGapMs:16});n.call(`a`),e.n(t).toHaveBeenCalledTimes(1),e.n(t).toHaveBeenLastCalledWith([`a`]),await i.sleep(16),n.call(`b`),e.n(t).toHaveBeenCalledTimes(1),await i.sleep(16),n.call(`c`),e.n(t).toHaveBeenCalledTimes(1),await i.sleep(16),n.call(`d`),e.n(t).toHaveBeenCalledTimes(1),await i.sleep(16),e.n(t).toHaveBeenCalledTimes(1),await i.sleep(16),e.n(t).toHaveBeenCalledTimes(2)})});
@@ -1,2 +1,2 @@
1
- import{describe as e,globalExpect as t,it as n,vi as r}from"./dist-C2nNPffG.js";import{constant as i}from"./constant-DrpDXHc7.js";import{doNothing as a}from"./do-nothing-Be29JGDG.js";import{funnel as o}from"./funnel-CEbURcmp.js";import{sleep as s}from"./sleep-DvzRMgY-.js";function c(e,t){return e===void 0?[t]:[...e,t]}e(`reducer behavior`,()=>{n(`passes the reduced arg to the executor`,()=>{let e=r.fn();o(e,{reducer:i(`hello world`),triggerAt:`start`,minQuietPeriodMs:16}).call(),t(e).toHaveBeenCalledTimes(1),t(e).toHaveBeenLastCalledWith(`hello world`)}),n(`reduces call args`,async()=>{let e=r.fn(e=>{}),n=o(e,{reducer:(e,t)=>(e??0)+t,minQuietPeriodMs:32,triggerAt:`end`});n.call(1),n.call(2),n.call(3),await s(16),n.call(4),n.call(5),n.call(6),await s(32),t(e).toHaveBeenCalledTimes(1),t(e).toHaveBeenLastCalledWith(21)}),n(`does not invoke if reduceArgs returns undefined`,async()=>{let e=r.fn();o(e,{reducer:i(void 0),triggerAt:`end`,minQuietPeriodMs:16}).call(),await s(32),t(e).toHaveBeenCalledTimes(0)}),n(`supports multiple arguments`,()=>{let e=r.fn();o(e,{reducer:(e,t,n,r)=>[e,t,n,r],triggerAt:`start`,minQuietPeriodMs:16}).call(1,`a`,!0),t(e).toHaveBeenCalledTimes(1),t(e).toHaveBeenLastCalledWith([void 0,1,`a`,!0])}),n(`reducer isn't called again when 'invokedAt: start'`,async()=>{let e=r.fn(c),n=o(a(),{reducer:e,triggerAt:`start`,minQuietPeriodMs:16});n.call(`a`),t(e).toHaveBeenCalledTimes(1),t(e).toHaveBeenLastCalledWith(void 0,`a`),n.call(`b`),n.call(`c`),t(e).toHaveBeenCalledTimes(1),await s(32),t(e).toHaveBeenCalledTimes(1)})}),e(`non-trivial (>0ms) timer duration`,()=>{e(`delay timer`,()=>{n(`invokedAt: start`,async()=>{let e=r.fn(),n=o(e,{reducer:c,triggerAt:`start`,minGapMs:16});n.call(`a`),n.call(`b`),n.call(`c`),t(e).toHaveBeenCalledTimes(1),t(e).toHaveBeenLastCalledWith([`a`]),await s(16),t(e).toHaveBeenCalledTimes(1),n.call(`d`),t(e).toHaveBeenCalledTimes(2),t(e).toHaveBeenLastCalledWith([`d`])}),n(`invokedAt: both`,async()=>{let e=r.fn(),n=o(e,{reducer:c,triggerAt:`both`,minGapMs:16});n.call(`a`),n.call(`b`),n.call(`c`),t(e).toHaveBeenCalledTimes(1),t(e).toHaveBeenLastCalledWith([`a`]),await s(16),t(e).toHaveBeenCalledTimes(2),t(e).toHaveBeenLastCalledWith([`b`,`c`]),n.call(`d`),n.call(`e`),n.call(`f`),t(e).toHaveBeenCalledTimes(2),await s(16),t(e).toHaveBeenCalledTimes(3),t(e).toHaveBeenLastCalledWith([`d`,`e`,`f`])}),n(`invocations in the middle of a window`,async()=>{let e=r.fn(),n=o(e,{reducer:c,triggerAt:`both`,minGapMs:16});n.call(`a`),n.call(`b`),n.call(`c`),t(e).toHaveBeenCalledTimes(1),t(e).toHaveBeenLastCalledWith([`a`]),await s(.75*16),n.call(`d`),n.call(`e`),n.call(`f`),t(e).toHaveBeenCalledTimes(1),await s(.75*16),t(e).toHaveBeenCalledTimes(2),t(e).toHaveBeenLastCalledWith([`b`,`c`,`d`,`e`,`f`])})}),e(`burst timer`,()=>{n(`invokedAt: start`,async()=>{let e=r.fn(),n=o(e,{reducer:c,triggerAt:`start`,minQuietPeriodMs:16});n.call(`a`),n.call(`b`),n.call(`c`),t(e).toHaveBeenCalledTimes(1),t(e).toHaveBeenLastCalledWith([`a`]),await s(16),t(e).toHaveBeenCalledTimes(1),n.call(`d`),t(e).toHaveBeenCalledTimes(2),t(e).toHaveBeenLastCalledWith([`d`])}),n(`invokedAt: both`,async()=>{let e=r.fn(),n=o(e,{reducer:c,triggerAt:`both`,minQuietPeriodMs:16});n.call(`a`),n.call(`b`),n.call(`c`),t(e).toHaveBeenCalledTimes(1),t(e).toHaveBeenLastCalledWith([`a`]),await s(16),t(e).toHaveBeenCalledTimes(2),t(e).toHaveBeenLastCalledWith([`b`,`c`]),n.call(`d`),n.call(`e`),n.call(`f`),t(e).toHaveBeenCalledTimes(3),t(e).toHaveBeenLastCalledWith([`d`]),await s(16),t(e).toHaveBeenCalledTimes(4),t(e).toHaveBeenLastCalledWith([`e`,`f`])}),n(`invokedAt: end`,async()=>{let e=r.fn(),n=o(e,{reducer:c,triggerAt:`end`,minQuietPeriodMs:16});n.call(`a`),n.call(`b`),n.call(`c`),t(e).toHaveBeenCalledTimes(0),await s(16),t(e).toHaveBeenCalledTimes(1),t(e).toHaveBeenLastCalledWith([`a`,`b`,`c`]),n.call(`e`),n.call(`f`),n.call(`g`),t(e).toHaveBeenCalledTimes(1),await s(16),t(e).toHaveBeenCalledTimes(2),t(e).toHaveBeenLastCalledWith([`e`,`f`,`g`])}),n(`invocations in the middle of a window`,async()=>{let e=r.fn(),n=o(e,{reducer:c,triggerAt:`end`,minQuietPeriodMs:16});n.call(`a`),n.call(`b`),n.call(`c`),t(e).toHaveBeenCalledTimes(0),await s(.9*16),n.call(`d`),n.call(`e`),n.call(`f`),t(e).toHaveBeenCalledTimes(0),await s(.1*16),t(e).toHaveBeenCalledTimes(0),await s(16),t(e).toHaveBeenCalledTimes(1),t(e).toHaveBeenLastCalledWith([`a`,`b`,`c`,`d`,`e`,`f`])}),n(`maxBurstDurationMs limits the burst duration`,async()=>{let e=r.fn(),n=o(e,{reducer:c,minQuietPeriodMs:16,maxBurstDurationMs:32,triggerAt:`end`});n.call(`a`),await s(.75*16),n.call(`b`),await s(.75*16),n.call(`c`),t(e).toHaveBeenCalledTimes(0),await s(.75*16),t(e).toHaveBeenCalledTimes(1),t(e).toHaveBeenLastCalledWith([`a`,`b`,`c`])})}),e(`both timers`,()=>{n(`delay is longer than burst`,async()=>{let e=r.fn(),n=o(e,{reducer:c,minGapMs:32,minQuietPeriodMs:16,triggerAt:`both`});n.call(`a`),n.call(`b`),n.call(`c`),t(e).toHaveBeenCalledTimes(1),t(e).toHaveBeenLastCalledWith([`a`]),await s(16),n.call(`d`),n.call(`e`),n.call(`f`),t(e).toHaveBeenCalledTimes(1),await s(16),t(e).toHaveBeenCalledTimes(2),t(e).toHaveBeenLastCalledWith([`b`,`c`,`d`,`e`,`f`])}),n(`burst is longer than delay`,async()=>{let e=r.fn(),n=o(e,{reducer:c,minGapMs:16,minQuietPeriodMs:32,triggerAt:`both`});n.call(`a`),n.call(`b`),n.call(`c`),t(e).toHaveBeenCalledTimes(1),t(e).toHaveBeenLastCalledWith([`a`]),await s(16),n.call(`d`),n.call(`e`),n.call(`f`),t(e).toHaveBeenCalledTimes(1),await s(16),t(e).toHaveBeenCalledTimes(1),await s(16),t(e).toHaveBeenCalledTimes(2),t(e).toHaveBeenLastCalledWith([`b`,`c`,`d`,`e`,`f`])}),n(`burst and delay are equal`,async()=>{let e=r.fn(),n=o(e,{reducer:c,minGapMs:16,minQuietPeriodMs:16,triggerAt:`both`});n.call(`a`),n.call(`b`),n.call(`c`),t(e).toHaveBeenCalledTimes(1),t(e).toHaveBeenLastCalledWith([`a`]),await s(16),n.call(`d`),n.call(`e`),n.call(`f`),t(e).toHaveBeenCalledTimes(2),t(e).toHaveBeenLastCalledWith([`b`,`c`]),await s(16),t(e).toHaveBeenCalledTimes(3),t(e).toHaveBeenLastCalledWith([`d`,`e`,`f`])}),n(`delay and maxBurstDurationMs are equal`,async()=>{let e=r.fn(),n=o(e,{reducer:c,minGapMs:16,minQuietPeriodMs:32,maxBurstDurationMs:16,triggerAt:`both`});n.call(`a`),n.call(`b`),n.call(`c`),t(e).toHaveBeenCalledTimes(1),t(e).toHaveBeenLastCalledWith([`a`]),await s(16),n.call(`d`),n.call(`e`),n.call(`f`),t(e).toHaveBeenCalledTimes(2),t(e).toHaveBeenLastCalledWith([`b`,`c`]),await s(16),t(e).toHaveBeenCalledTimes(3),t(e).toHaveBeenLastCalledWith([`d`,`e`,`f`])})})}),e(`immediate (===0) timer durations`,()=>{e(`delay timer`,()=>{n(`invokedAt: start`,async()=>{let e=r.fn(),n=o(e,{reducer:c,triggerAt:`start`,minGapMs:0});n.call(`a`),n.call(`b`),n.call(`c`),t(e).toHaveBeenCalledTimes(1),t(e).toHaveBeenLastCalledWith([`a`]),await s(0),n.call(`d`),n.call(`e`),n.call(`f`),t(e).toHaveBeenCalledTimes(2),t(e).toHaveBeenLastCalledWith([`d`]),await s(0),t(e).toHaveBeenCalledTimes(2)}),n(`invokedAt: both`,async()=>{let e=r.fn(),n=o(e,{reducer:c,triggerAt:`both`,minGapMs:0});n.call(`a`),n.call(`b`),n.call(`c`),t(e).toHaveBeenCalledTimes(1),t(e).toHaveBeenLastCalledWith([`a`]),await s(0),n.call(`d`),n.call(`e`),n.call(`f`),t(e).toHaveBeenCalledTimes(2),t(e).toHaveBeenLastCalledWith([`b`,`c`]),await s(0),t(e).toHaveBeenCalledTimes(3),t(e).toHaveBeenLastCalledWith([`d`,`e`,`f`])}),n(`with a non-trivial burst timer`,async()=>{let e=r.fn(),n=o(e,{reducer:c,triggerAt:`both`,minGapMs:0,minQuietPeriodMs:16});n.call(`a`),t(e).toHaveBeenCalledTimes(1),t(e).toHaveBeenLastCalledWith([`a`]),n.call(`b`),t(e).toHaveBeenCalledTimes(1),await s(16),t(e).toHaveBeenCalledTimes(2),t(e).toHaveBeenLastCalledWith([`b`])})}),e(`burst timer`,()=>{n(`invokedAt: start`,async()=>{let e=r.fn(),n=o(e,{reducer:c,triggerAt:`start`,minQuietPeriodMs:0});n.call(`a`),n.call(`b`),n.call(`c`),t(e).toHaveBeenCalledTimes(1),t(e).toHaveBeenLastCalledWith([`a`]),await s(0),n.call(`d`),n.call(`e`),n.call(`f`),t(e).toHaveBeenCalledTimes(2),t(e).toHaveBeenLastCalledWith([`d`]),await s(0),t(e).toHaveBeenCalledTimes(2)}),n(`invokedAt: both`,async()=>{let e=r.fn(),n=o(e,{reducer:c,triggerAt:`both`,minQuietPeriodMs:0});n.call(`a`),n.call(`b`),n.call(`c`),t(e).toHaveBeenCalledTimes(1),t(e).toHaveBeenLastCalledWith([`a`]),await s(0),t(e).toHaveBeenCalledTimes(2),t(e).toHaveBeenLastCalledWith([`b`,`c`]),n.call(`d`),n.call(`e`),n.call(`f`),t(e).toHaveBeenCalledTimes(3),t(e).toHaveBeenLastCalledWith([`d`]),await s(0),t(e).toHaveBeenCalledTimes(4),t(e).toHaveBeenLastCalledWith([`e`,`f`])}),n(`invokedAt: end`,async()=>{let e=r.fn(),n=o(e,{reducer:c,triggerAt:`end`,minQuietPeriodMs:0});n.call(`a`),n.call(`b`),n.call(`c`),t(e).toHaveBeenCalledTimes(0),await s(0),t(e).toHaveBeenCalledTimes(1),t(e).toHaveBeenLastCalledWith([`a`,`b`,`c`]),n.call(`d`),n.call(`e`),n.call(`f`),t(e).toHaveBeenCalledTimes(1),await s(0),t(e).toHaveBeenCalledTimes(2),t(e).toHaveBeenLastCalledWith([`d`,`e`,`f`])}),n(`with a non-trivial delay timer`,async()=>{let e=r.fn(),n=o(e,{reducer:c,triggerAt:`both`,minGapMs:16,minQuietPeriodMs:0});n.call(`a`),n.call(`b`),t(e).toHaveBeenCalledTimes(1),t(e).toHaveBeenLastCalledWith([`a`]),await s(0),t(e).toHaveBeenCalledTimes(1),await s(16),t(e).toHaveBeenCalledTimes(2),t(e).toHaveBeenLastCalledWith([`b`])}),n(`burst timer with non-trivial maxBurstDuration`,async()=>{let e=r.fn(),n=o(e,{reducer:c,minQuietPeriodMs:0,maxBurstDurationMs:16,triggerAt:`end`});n.call(`a`),n.call(`b`),n.call(`c`),t(e).toHaveBeenCalledTimes(0),await s(0),t(e).toHaveBeenCalledTimes(1),t(e).toHaveBeenLastCalledWith([`a`,`b`,`c`])})}),n(`both timers`,async()=>{let e=r.fn();o(e,{reducer:c,triggerAt:`both`,minGapMs:0,minQuietPeriodMs:0}).call(`a`),t(e).toHaveBeenCalledTimes(1),t(e).toHaveBeenLastCalledWith([`a`]),await s(0),t(e).toHaveBeenCalledTimes(1)}),n(`maxBurstDurationMs = 0 limits the burst immediately`,async()=>{let e=r.fn();o(e,{reducer:c,triggerAt:`end`,minQuietPeriodMs:16,maxBurstDurationMs:0}).call(`a`),await s(0),t(e).toHaveBeenCalledTimes(1),t(e).toHaveBeenLastCalledWith([`a`])}),n(`all timeouts zero`,async()=>{let e=r.fn(),n=o(e,{reducer:c,triggerAt:`both`,minGapMs:0,minQuietPeriodMs:0,maxBurstDurationMs:0});n.call(`a`),n.call(`b`),t(e).toHaveBeenCalledTimes(1),t(e).toHaveBeenLastCalledWith([`a`]),await s(0),t(e).toHaveBeenCalledTimes(2),t(e).toHaveBeenLastCalledWith([`b`])})}),e(`default minQuietPeriodMs === 0 when minGapMs is not defined`,()=>{n(`invokedAt: start`,async()=>{let e=r.fn(),n=o(e,{reducer:c,triggerAt:`start`});n.call(`a`),t(e).toHaveBeenCalledTimes(1),t(e).toHaveBeenLastCalledWith([`a`]),n.call(`b`),t(e).toHaveBeenCalledTimes(1),await s(0),t(e).toHaveBeenCalledTimes(1),n.call(`c`),t(e).toHaveBeenCalledTimes(2),t(e).toHaveBeenLastCalledWith([`c`])}),n(`invokedAt: both`,async()=>{let e=r.fn(),n=o(e,{reducer:c,triggerAt:`both`});n.call(`a`),t(e).toHaveBeenCalledTimes(1),t(e).toHaveBeenLastCalledWith([`a`]),n.call(`b`),t(e).toHaveBeenCalledTimes(1),await s(0),t(e).toHaveBeenCalledTimes(2),t(e).toHaveBeenLastCalledWith([`b`]),n.call(`c`),t(e).toHaveBeenCalledTimes(3),t(e).toHaveBeenLastCalledWith([`c`])})}),e(`utility functions`,()=>{e(`flush`,()=>{n(`flush triggers an immediate invocation`,async()=>{let e=r.fn(),n=o(e,{reducer:c,triggerAt:`end`,minQuietPeriodMs:16});n.call(`a`),n.call(`b`),n.call(`c`),n.flush(),t(e).toHaveBeenCalledTimes(1),t(e).toHaveBeenLastCalledWith([`a`,`b`,`c`]),await s(16),t(e).toHaveBeenCalledTimes(1)}),n(`flush during active burst`,async()=>{let e=r.fn(),n=o(e,{reducer:c,triggerAt:`end`,minQuietPeriodMs:32});n.call(`a`),n.call(`b`),n.call(`c`),await s(16),n.flush(),t(e).toHaveBeenCalledTimes(1),t(e).toHaveBeenLastCalledWith([`a`,`b`,`c`]),await s(32),t(e).toHaveBeenCalledTimes(1)})}),e(`cancel`,()=>{n(`cancel prevents invocation`,async()=>{let e=r.fn(),n=o(e,{reducer:c,triggerAt:`end`,minQuietPeriodMs:16});n.call(`a`),n.call(`b`),n.call(`c`),n.cancel(),await s(16),t(e).toHaveBeenCalledTimes(0)}),n(`cancel during delay period`,async()=>{let e=r.fn(),n=o(e,{reducer:c,triggerAt:`start`,minGapMs:32});n.call(`a`),n.call(`b`),await s(16),n.cancel(),await s(16),t(e).toHaveBeenCalledTimes(1)})}),e(`isIdle`,()=>{n(`isIdle reflects the funnel's state`,()=>{let e=o(r.fn(),{reducer:c,triggerAt:`end`,minQuietPeriodMs:16});t(e.isIdle).toBe(!0),e.call(`a`),t(e.isIdle).toBe(!1),e.cancel(),t(e.isIdle).toBe(!0)}),n(`isIdle works when burst duration is 0`,async()=>{let e=o(r.fn(),{reducer:c,triggerAt:`end`,minQuietPeriodMs:0});t(e.isIdle).toBe(!0),e.call(`a`),e.call(`b`),e.call(`c`),t(e.isIdle).toBe(!1),await s(0),t(e.isIdle).toBe(!0)})})}),e(`edge-cases`,()=>{n(`bursts that start late don't prevent delayed invocations`,async()=>{let e=r.fn(),n=o(e,{reducer:c,triggerAt:`both`,minQuietPeriodMs:16,minGapMs:32});n.call(`a`),n.call(`b`),n.call(`c`),t(e).toHaveBeenCalledTimes(1),t(e).toHaveBeenLastCalledWith([`a`]),await s(1.5*16),t(e).toHaveBeenCalledTimes(1),n.call(`d`),n.call(`e`),n.call(`f`),t(e).toHaveBeenCalledTimes(1),await s(.5*16),t(e).toHaveBeenCalledTimes(2),t(e).toHaveBeenLastCalledWith([`b`,`c`,`d`,`e`,`f`])}),n(`delay timeouts don't cause an invocation in the middle of bursts`,async()=>{let e=r.fn(),n=o(e,{reducer:c,triggerAt:`both`,minQuietPeriodMs:32,minGapMs:16});n.call(`a`),t(e).toHaveBeenCalledTimes(1),t(e).toHaveBeenLastCalledWith([`a`]),await s(16),n.call(`b`),t(e).toHaveBeenCalledTimes(1),await s(16),n.call(`c`),t(e).toHaveBeenCalledTimes(1),await s(16),n.call(`d`),t(e).toHaveBeenCalledTimes(1),await s(16),t(e).toHaveBeenCalledTimes(1),await s(16),t(e).toHaveBeenCalledTimes(2)})});
1
+ import{constant as e}from"./constant.js";import{doNothing as t}from"./do-nothing.js";import{a as n,i as r,n as i,r as a}from"./dist-Bd1vawFi.js";import{funnel as o}from"./funnel.js";import{sleep as s}from"./sleep.js";function c(e,t){return e===void 0?[t]:[...e,t]}r(`reducer behavior`,()=>{n(`passes the reduced arg to the executor`,()=>{let t=a.fn();o(t,{reducer:e(`hello world`),triggerAt:`start`,minQuietPeriodMs:16}).call(),i(t).toHaveBeenCalledTimes(1),i(t).toHaveBeenLastCalledWith(`hello world`)}),n(`reduces call args`,async()=>{let e=a.fn(e=>{}),t=o(e,{reducer:(e,t)=>(e??0)+t,minQuietPeriodMs:32,triggerAt:`end`});t.call(1),t.call(2),t.call(3),await s(16),t.call(4),t.call(5),t.call(6),await s(32),i(e).toHaveBeenCalledTimes(1),i(e).toHaveBeenLastCalledWith(21)}),n(`does not invoke if reduceArgs returns undefined`,async()=>{let t=a.fn();o(t,{reducer:e(void 0),triggerAt:`end`,minQuietPeriodMs:16}).call(),await s(32),i(t).toHaveBeenCalledTimes(0)}),n(`supports multiple arguments`,()=>{let e=a.fn();o(e,{reducer:(e,t,n,r)=>[e,t,n,r],triggerAt:`start`,minQuietPeriodMs:16}).call(1,`a`,!0),i(e).toHaveBeenCalledTimes(1),i(e).toHaveBeenLastCalledWith([void 0,1,`a`,!0])}),n(`reducer isn't called again when 'invokedAt: start'`,async()=>{let e=a.fn(c),n=o(t(),{reducer:e,triggerAt:`start`,minQuietPeriodMs:16});n.call(`a`),i(e).toHaveBeenCalledTimes(1),i(e).toHaveBeenLastCalledWith(void 0,`a`),n.call(`b`),n.call(`c`),i(e).toHaveBeenCalledTimes(1),await s(32),i(e).toHaveBeenCalledTimes(1)})}),r(`non-trivial (>0ms) timer duration`,()=>{r(`delay timer`,()=>{n(`invokedAt: start`,async()=>{let e=a.fn(),t=o(e,{reducer:c,triggerAt:`start`,minGapMs:16});t.call(`a`),t.call(`b`),t.call(`c`),i(e).toHaveBeenCalledTimes(1),i(e).toHaveBeenLastCalledWith([`a`]),await s(16),i(e).toHaveBeenCalledTimes(1),t.call(`d`),i(e).toHaveBeenCalledTimes(2),i(e).toHaveBeenLastCalledWith([`d`])}),n(`invokedAt: both`,async()=>{let e=a.fn(),t=o(e,{reducer:c,triggerAt:`both`,minGapMs:16});t.call(`a`),t.call(`b`),t.call(`c`),i(e).toHaveBeenCalledTimes(1),i(e).toHaveBeenLastCalledWith([`a`]),await s(16),i(e).toHaveBeenCalledTimes(2),i(e).toHaveBeenLastCalledWith([`b`,`c`]),t.call(`d`),t.call(`e`),t.call(`f`),i(e).toHaveBeenCalledTimes(2),await s(16),i(e).toHaveBeenCalledTimes(3),i(e).toHaveBeenLastCalledWith([`d`,`e`,`f`])}),n(`invocations in the middle of a window`,async()=>{let e=a.fn(),t=o(e,{reducer:c,triggerAt:`both`,minGapMs:16});t.call(`a`),t.call(`b`),t.call(`c`),i(e).toHaveBeenCalledTimes(1),i(e).toHaveBeenLastCalledWith([`a`]),await s(.75*16),t.call(`d`),t.call(`e`),t.call(`f`),i(e).toHaveBeenCalledTimes(1),await s(.75*16),i(e).toHaveBeenCalledTimes(2),i(e).toHaveBeenLastCalledWith([`b`,`c`,`d`,`e`,`f`])})}),r(`burst timer`,()=>{n(`invokedAt: start`,async()=>{let e=a.fn(),t=o(e,{reducer:c,triggerAt:`start`,minQuietPeriodMs:16});t.call(`a`),t.call(`b`),t.call(`c`),i(e).toHaveBeenCalledTimes(1),i(e).toHaveBeenLastCalledWith([`a`]),await s(16),i(e).toHaveBeenCalledTimes(1),t.call(`d`),i(e).toHaveBeenCalledTimes(2),i(e).toHaveBeenLastCalledWith([`d`])}),n(`invokedAt: both`,async()=>{let e=a.fn(),t=o(e,{reducer:c,triggerAt:`both`,minQuietPeriodMs:16});t.call(`a`),t.call(`b`),t.call(`c`),i(e).toHaveBeenCalledTimes(1),i(e).toHaveBeenLastCalledWith([`a`]),await s(16),i(e).toHaveBeenCalledTimes(2),i(e).toHaveBeenLastCalledWith([`b`,`c`]),t.call(`d`),t.call(`e`),t.call(`f`),i(e).toHaveBeenCalledTimes(3),i(e).toHaveBeenLastCalledWith([`d`]),await s(16),i(e).toHaveBeenCalledTimes(4),i(e).toHaveBeenLastCalledWith([`e`,`f`])}),n(`invokedAt: end`,async()=>{let e=a.fn(),t=o(e,{reducer:c,triggerAt:`end`,minQuietPeriodMs:16});t.call(`a`),t.call(`b`),t.call(`c`),i(e).toHaveBeenCalledTimes(0),await s(16),i(e).toHaveBeenCalledTimes(1),i(e).toHaveBeenLastCalledWith([`a`,`b`,`c`]),t.call(`e`),t.call(`f`),t.call(`g`),i(e).toHaveBeenCalledTimes(1),await s(16),i(e).toHaveBeenCalledTimes(2),i(e).toHaveBeenLastCalledWith([`e`,`f`,`g`])}),n(`invocations in the middle of a window`,async()=>{let e=a.fn(),t=o(e,{reducer:c,triggerAt:`end`,minQuietPeriodMs:16});t.call(`a`),t.call(`b`),t.call(`c`),i(e).toHaveBeenCalledTimes(0),await s(.9*16),t.call(`d`),t.call(`e`),t.call(`f`),i(e).toHaveBeenCalledTimes(0),await s(.1*16),i(e).toHaveBeenCalledTimes(0),await s(16),i(e).toHaveBeenCalledTimes(1),i(e).toHaveBeenLastCalledWith([`a`,`b`,`c`,`d`,`e`,`f`])}),n(`maxBurstDurationMs limits the burst duration`,async()=>{let e=a.fn(),t=o(e,{reducer:c,minQuietPeriodMs:16,maxBurstDurationMs:32,triggerAt:`end`});t.call(`a`),await s(.75*16),t.call(`b`),await s(.75*16),t.call(`c`),i(e).toHaveBeenCalledTimes(0),await s(.75*16),i(e).toHaveBeenCalledTimes(1),i(e).toHaveBeenLastCalledWith([`a`,`b`,`c`])})}),r(`both timers`,()=>{n(`delay is longer than burst`,async()=>{let e=a.fn(),t=o(e,{reducer:c,minGapMs:32,minQuietPeriodMs:16,triggerAt:`both`});t.call(`a`),t.call(`b`),t.call(`c`),i(e).toHaveBeenCalledTimes(1),i(e).toHaveBeenLastCalledWith([`a`]),await s(16),t.call(`d`),t.call(`e`),t.call(`f`),i(e).toHaveBeenCalledTimes(1),await s(16),i(e).toHaveBeenCalledTimes(2),i(e).toHaveBeenLastCalledWith([`b`,`c`,`d`,`e`,`f`])}),n(`burst is longer than delay`,async()=>{let e=a.fn(),t=o(e,{reducer:c,minGapMs:16,minQuietPeriodMs:32,triggerAt:`both`});t.call(`a`),t.call(`b`),t.call(`c`),i(e).toHaveBeenCalledTimes(1),i(e).toHaveBeenLastCalledWith([`a`]),await s(16),t.call(`d`),t.call(`e`),t.call(`f`),i(e).toHaveBeenCalledTimes(1),await s(16),i(e).toHaveBeenCalledTimes(1),await s(16),i(e).toHaveBeenCalledTimes(2),i(e).toHaveBeenLastCalledWith([`b`,`c`,`d`,`e`,`f`])}),n(`burst and delay are equal`,async()=>{let e=a.fn(),t=o(e,{reducer:c,minGapMs:16,minQuietPeriodMs:16,triggerAt:`both`});t.call(`a`),t.call(`b`),t.call(`c`),i(e).toHaveBeenCalledTimes(1),i(e).toHaveBeenLastCalledWith([`a`]),await s(16),t.call(`d`),t.call(`e`),t.call(`f`),i(e).toHaveBeenCalledTimes(2),i(e).toHaveBeenLastCalledWith([`b`,`c`]),await s(16),i(e).toHaveBeenCalledTimes(3),i(e).toHaveBeenLastCalledWith([`d`,`e`,`f`])}),n(`delay and maxBurstDurationMs are equal`,async()=>{let e=a.fn(),t=o(e,{reducer:c,minGapMs:16,minQuietPeriodMs:32,maxBurstDurationMs:16,triggerAt:`both`});t.call(`a`),t.call(`b`),t.call(`c`),i(e).toHaveBeenCalledTimes(1),i(e).toHaveBeenLastCalledWith([`a`]),await s(16),t.call(`d`),t.call(`e`),t.call(`f`),i(e).toHaveBeenCalledTimes(2),i(e).toHaveBeenLastCalledWith([`b`,`c`]),await s(16),i(e).toHaveBeenCalledTimes(3),i(e).toHaveBeenLastCalledWith([`d`,`e`,`f`])})})}),r(`immediate (===0) timer durations`,()=>{r(`delay timer`,()=>{n(`invokedAt: start`,async()=>{let e=a.fn(),t=o(e,{reducer:c,triggerAt:`start`,minGapMs:0});t.call(`a`),t.call(`b`),t.call(`c`),i(e).toHaveBeenCalledTimes(1),i(e).toHaveBeenLastCalledWith([`a`]),await s(0),t.call(`d`),t.call(`e`),t.call(`f`),i(e).toHaveBeenCalledTimes(2),i(e).toHaveBeenLastCalledWith([`d`]),await s(0),i(e).toHaveBeenCalledTimes(2)}),n(`invokedAt: both`,async()=>{let e=a.fn(),t=o(e,{reducer:c,triggerAt:`both`,minGapMs:0});t.call(`a`),t.call(`b`),t.call(`c`),i(e).toHaveBeenCalledTimes(1),i(e).toHaveBeenLastCalledWith([`a`]),await s(0),t.call(`d`),t.call(`e`),t.call(`f`),i(e).toHaveBeenCalledTimes(2),i(e).toHaveBeenLastCalledWith([`b`,`c`]),await s(0),i(e).toHaveBeenCalledTimes(3),i(e).toHaveBeenLastCalledWith([`d`,`e`,`f`])}),n(`with a non-trivial burst timer`,async()=>{let e=a.fn(),t=o(e,{reducer:c,triggerAt:`both`,minGapMs:0,minQuietPeriodMs:16});t.call(`a`),i(e).toHaveBeenCalledTimes(1),i(e).toHaveBeenLastCalledWith([`a`]),t.call(`b`),i(e).toHaveBeenCalledTimes(1),await s(16),i(e).toHaveBeenCalledTimes(2),i(e).toHaveBeenLastCalledWith([`b`])})}),r(`burst timer`,()=>{n(`invokedAt: start`,async()=>{let e=a.fn(),t=o(e,{reducer:c,triggerAt:`start`,minQuietPeriodMs:0});t.call(`a`),t.call(`b`),t.call(`c`),i(e).toHaveBeenCalledTimes(1),i(e).toHaveBeenLastCalledWith([`a`]),await s(0),t.call(`d`),t.call(`e`),t.call(`f`),i(e).toHaveBeenCalledTimes(2),i(e).toHaveBeenLastCalledWith([`d`]),await s(0),i(e).toHaveBeenCalledTimes(2)}),n(`invokedAt: both`,async()=>{let e=a.fn(),t=o(e,{reducer:c,triggerAt:`both`,minQuietPeriodMs:0});t.call(`a`),t.call(`b`),t.call(`c`),i(e).toHaveBeenCalledTimes(1),i(e).toHaveBeenLastCalledWith([`a`]),await s(0),i(e).toHaveBeenCalledTimes(2),i(e).toHaveBeenLastCalledWith([`b`,`c`]),t.call(`d`),t.call(`e`),t.call(`f`),i(e).toHaveBeenCalledTimes(3),i(e).toHaveBeenLastCalledWith([`d`]),await s(0),i(e).toHaveBeenCalledTimes(4),i(e).toHaveBeenLastCalledWith([`e`,`f`])}),n(`invokedAt: end`,async()=>{let e=a.fn(),t=o(e,{reducer:c,triggerAt:`end`,minQuietPeriodMs:0});t.call(`a`),t.call(`b`),t.call(`c`),i(e).toHaveBeenCalledTimes(0),await s(0),i(e).toHaveBeenCalledTimes(1),i(e).toHaveBeenLastCalledWith([`a`,`b`,`c`]),t.call(`d`),t.call(`e`),t.call(`f`),i(e).toHaveBeenCalledTimes(1),await s(0),i(e).toHaveBeenCalledTimes(2),i(e).toHaveBeenLastCalledWith([`d`,`e`,`f`])}),n(`with a non-trivial delay timer`,async()=>{let e=a.fn(),t=o(e,{reducer:c,triggerAt:`both`,minGapMs:16,minQuietPeriodMs:0});t.call(`a`),t.call(`b`),i(e).toHaveBeenCalledTimes(1),i(e).toHaveBeenLastCalledWith([`a`]),await s(0),i(e).toHaveBeenCalledTimes(1),await s(16),i(e).toHaveBeenCalledTimes(2),i(e).toHaveBeenLastCalledWith([`b`])}),n(`burst timer with non-trivial maxBurstDuration`,async()=>{let e=a.fn(),t=o(e,{reducer:c,minQuietPeriodMs:0,maxBurstDurationMs:16,triggerAt:`end`});t.call(`a`),t.call(`b`),t.call(`c`),i(e).toHaveBeenCalledTimes(0),await s(0),i(e).toHaveBeenCalledTimes(1),i(e).toHaveBeenLastCalledWith([`a`,`b`,`c`])})}),n(`both timers`,async()=>{let e=a.fn();o(e,{reducer:c,triggerAt:`both`,minGapMs:0,minQuietPeriodMs:0}).call(`a`),i(e).toHaveBeenCalledTimes(1),i(e).toHaveBeenLastCalledWith([`a`]),await s(0),i(e).toHaveBeenCalledTimes(1)}),n(`maxBurstDurationMs = 0 limits the burst immediately`,async()=>{let e=a.fn();o(e,{reducer:c,triggerAt:`end`,minQuietPeriodMs:16,maxBurstDurationMs:0}).call(`a`),await s(0),i(e).toHaveBeenCalledTimes(1),i(e).toHaveBeenLastCalledWith([`a`])}),n(`all timeouts zero`,async()=>{let e=a.fn(),t=o(e,{reducer:c,triggerAt:`both`,minGapMs:0,minQuietPeriodMs:0,maxBurstDurationMs:0});t.call(`a`),t.call(`b`),i(e).toHaveBeenCalledTimes(1),i(e).toHaveBeenLastCalledWith([`a`]),await s(0),i(e).toHaveBeenCalledTimes(2),i(e).toHaveBeenLastCalledWith([`b`])})}),r(`default minQuietPeriodMs === 0 when minGapMs is not defined`,()=>{n(`invokedAt: start`,async()=>{let e=a.fn(),t=o(e,{reducer:c,triggerAt:`start`});t.call(`a`),i(e).toHaveBeenCalledTimes(1),i(e).toHaveBeenLastCalledWith([`a`]),t.call(`b`),i(e).toHaveBeenCalledTimes(1),await s(0),i(e).toHaveBeenCalledTimes(1),t.call(`c`),i(e).toHaveBeenCalledTimes(2),i(e).toHaveBeenLastCalledWith([`c`])}),n(`invokedAt: both`,async()=>{let e=a.fn(),t=o(e,{reducer:c,triggerAt:`both`});t.call(`a`),i(e).toHaveBeenCalledTimes(1),i(e).toHaveBeenLastCalledWith([`a`]),t.call(`b`),i(e).toHaveBeenCalledTimes(1),await s(0),i(e).toHaveBeenCalledTimes(2),i(e).toHaveBeenLastCalledWith([`b`]),t.call(`c`),i(e).toHaveBeenCalledTimes(3),i(e).toHaveBeenLastCalledWith([`c`])})}),r(`utility functions`,()=>{r(`flush`,()=>{n(`flush triggers an immediate invocation`,async()=>{let e=a.fn(),t=o(e,{reducer:c,triggerAt:`end`,minQuietPeriodMs:16});t.call(`a`),t.call(`b`),t.call(`c`),t.flush(),i(e).toHaveBeenCalledTimes(1),i(e).toHaveBeenLastCalledWith([`a`,`b`,`c`]),await s(16),i(e).toHaveBeenCalledTimes(1)}),n(`flush during active burst`,async()=>{let e=a.fn(),t=o(e,{reducer:c,triggerAt:`end`,minQuietPeriodMs:32});t.call(`a`),t.call(`b`),t.call(`c`),await s(16),t.flush(),i(e).toHaveBeenCalledTimes(1),i(e).toHaveBeenLastCalledWith([`a`,`b`,`c`]),await s(32),i(e).toHaveBeenCalledTimes(1)})}),r(`cancel`,()=>{n(`cancel prevents invocation`,async()=>{let e=a.fn(),t=o(e,{reducer:c,triggerAt:`end`,minQuietPeriodMs:16});t.call(`a`),t.call(`b`),t.call(`c`),t.cancel(),await s(16),i(e).toHaveBeenCalledTimes(0)}),n(`cancel during delay period`,async()=>{let e=a.fn(),t=o(e,{reducer:c,triggerAt:`start`,minGapMs:32});t.call(`a`),t.call(`b`),await s(16),t.cancel(),await s(16),i(e).toHaveBeenCalledTimes(1)})}),r(`isIdle`,()=>{n(`isIdle reflects the funnel's state`,()=>{let e=o(a.fn(),{reducer:c,triggerAt:`end`,minQuietPeriodMs:16});i(e.isIdle).toBe(!0),e.call(`a`),i(e.isIdle).toBe(!1),e.cancel(),i(e.isIdle).toBe(!0)}),n(`isIdle works when burst duration is 0`,async()=>{let e=o(a.fn(),{reducer:c,triggerAt:`end`,minQuietPeriodMs:0});i(e.isIdle).toBe(!0),e.call(`a`),e.call(`b`),e.call(`c`),i(e.isIdle).toBe(!1),await s(0),i(e.isIdle).toBe(!0)})})}),r(`edge-cases`,()=>{n(`bursts that start late don't prevent delayed invocations`,async()=>{let e=a.fn(),t=o(e,{reducer:c,triggerAt:`both`,minQuietPeriodMs:16,minGapMs:32});t.call(`a`),t.call(`b`),t.call(`c`),i(e).toHaveBeenCalledTimes(1),i(e).toHaveBeenLastCalledWith([`a`]),await s(1.5*16),i(e).toHaveBeenCalledTimes(1),t.call(`d`),t.call(`e`),t.call(`f`),i(e).toHaveBeenCalledTimes(1),await s(.5*16),i(e).toHaveBeenCalledTimes(2),i(e).toHaveBeenLastCalledWith([`b`,`c`,`d`,`e`,`f`])}),n(`delay timeouts don't cause an invocation in the middle of bursts`,async()=>{let e=a.fn(),t=o(e,{reducer:c,triggerAt:`both`,minQuietPeriodMs:32,minGapMs:16});t.call(`a`),i(e).toHaveBeenCalledTimes(1),i(e).toHaveBeenLastCalledWith([`a`]),await s(16),t.call(`b`),i(e).toHaveBeenCalledTimes(1),await s(16),t.call(`c`),i(e).toHaveBeenCalledTimes(1),await s(16),t.call(`d`),i(e).toHaveBeenCalledTimes(1),await s(16),i(e).toHaveBeenCalledTimes(1),await s(16),i(e).toHaveBeenCalledTimes(2)})});
2
2
  //# sourceMappingURL=funnel.test.js.map