fp-pack 0.1.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 (927) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +664 -0
  3. package/dist/fp-pack-stream.umd.js +2 -0
  4. package/dist/fp-pack-stream.umd.js.map +1 -0
  5. package/dist/fp-pack.umd.js +2 -0
  6. package/dist/fp-pack.umd.js.map +1 -0
  7. package/dist/implement/array/append.d.ts +7 -0
  8. package/dist/implement/array/append.d.ts.map +1 -0
  9. package/dist/implement/array/append.mjs +9 -0
  10. package/dist/implement/array/append.mjs.map +1 -0
  11. package/dist/implement/array/chunk.d.ts +7 -0
  12. package/dist/implement/array/chunk.d.ts.map +1 -0
  13. package/dist/implement/array/chunk.mjs +15 -0
  14. package/dist/implement/array/chunk.mjs.map +1 -0
  15. package/dist/implement/array/concat.d.ts +7 -0
  16. package/dist/implement/array/concat.d.ts.map +1 -0
  17. package/dist/implement/array/concat.mjs +9 -0
  18. package/dist/implement/array/concat.mjs.map +1 -0
  19. package/dist/implement/array/drop.d.ts +7 -0
  20. package/dist/implement/array/drop.d.ts.map +1 -0
  21. package/dist/implement/array/drop.mjs +10 -0
  22. package/dist/implement/array/drop.mjs.map +1 -0
  23. package/dist/implement/array/dropWhile.d.ts +7 -0
  24. package/dist/implement/array/dropWhile.d.ts.map +1 -0
  25. package/dist/implement/array/dropWhile.mjs +13 -0
  26. package/dist/implement/array/dropWhile.mjs.map +1 -0
  27. package/dist/implement/array/every.d.ts +7 -0
  28. package/dist/implement/array/every.d.ts.map +1 -0
  29. package/dist/implement/array/every.mjs +9 -0
  30. package/dist/implement/array/every.mjs.map +1 -0
  31. package/dist/implement/array/filter.d.ts +7 -0
  32. package/dist/implement/array/filter.d.ts.map +1 -0
  33. package/dist/implement/array/filter.mjs +9 -0
  34. package/dist/implement/array/filter.mjs.map +1 -0
  35. package/dist/implement/array/find.d.ts +7 -0
  36. package/dist/implement/array/find.d.ts.map +1 -0
  37. package/dist/implement/array/find.mjs +9 -0
  38. package/dist/implement/array/find.mjs.map +1 -0
  39. package/dist/implement/array/flatMap.d.ts +7 -0
  40. package/dist/implement/array/flatMap.d.ts.map +1 -0
  41. package/dist/implement/array/flatMap.mjs +9 -0
  42. package/dist/implement/array/flatMap.mjs.map +1 -0
  43. package/dist/implement/array/flatten.d.ts +6 -0
  44. package/dist/implement/array/flatten.d.ts.map +1 -0
  45. package/dist/implement/array/flatten.mjs +7 -0
  46. package/dist/implement/array/flatten.mjs.map +1 -0
  47. package/dist/implement/array/flattenDeep.d.ts +6 -0
  48. package/dist/implement/array/flattenDeep.d.ts.map +1 -0
  49. package/dist/implement/array/flattenDeep.mjs +11 -0
  50. package/dist/implement/array/flattenDeep.mjs.map +1 -0
  51. package/dist/implement/array/groupBy.d.ts +7 -0
  52. package/dist/implement/array/groupBy.d.ts.map +1 -0
  53. package/dist/implement/array/groupBy.mjs +12 -0
  54. package/dist/implement/array/groupBy.mjs.map +1 -0
  55. package/dist/implement/array/head.d.ts +6 -0
  56. package/dist/implement/array/head.d.ts.map +1 -0
  57. package/dist/implement/array/head.mjs +7 -0
  58. package/dist/implement/array/head.mjs.map +1 -0
  59. package/dist/implement/array/index.d.ts +34 -0
  60. package/dist/implement/array/index.d.ts.map +1 -0
  61. package/dist/implement/array/init.d.ts +6 -0
  62. package/dist/implement/array/init.d.ts.map +1 -0
  63. package/dist/implement/array/init.mjs +7 -0
  64. package/dist/implement/array/init.mjs.map +1 -0
  65. package/dist/implement/array/last.d.ts +6 -0
  66. package/dist/implement/array/last.d.ts.map +1 -0
  67. package/dist/implement/array/last.mjs +8 -0
  68. package/dist/implement/array/last.mjs.map +1 -0
  69. package/dist/implement/array/map.d.ts +7 -0
  70. package/dist/implement/array/map.d.ts.map +1 -0
  71. package/dist/implement/array/map.mjs +9 -0
  72. package/dist/implement/array/map.mjs.map +1 -0
  73. package/dist/implement/array/partition.d.ts +7 -0
  74. package/dist/implement/array/partition.d.ts.map +1 -0
  75. package/dist/implement/array/partition.mjs +12 -0
  76. package/dist/implement/array/partition.mjs.map +1 -0
  77. package/dist/implement/array/prepend.d.ts +7 -0
  78. package/dist/implement/array/prepend.d.ts.map +1 -0
  79. package/dist/implement/array/prepend.mjs +9 -0
  80. package/dist/implement/array/prepend.mjs.map +1 -0
  81. package/dist/implement/array/range.d.ts +6 -0
  82. package/dist/implement/array/range.d.ts.map +1 -0
  83. package/dist/implement/array/range.mjs +12 -0
  84. package/dist/implement/array/range.mjs.map +1 -0
  85. package/dist/implement/array/reduce.d.ts +8 -0
  86. package/dist/implement/array/reduce.d.ts.map +1 -0
  87. package/dist/implement/array/reduce.mjs +9 -0
  88. package/dist/implement/array/reduce.mjs.map +1 -0
  89. package/dist/implement/array/scan.d.ts +8 -0
  90. package/dist/implement/array/scan.d.ts.map +1 -0
  91. package/dist/implement/array/scan.mjs +13 -0
  92. package/dist/implement/array/scan.mjs.map +1 -0
  93. package/dist/implement/array/some.d.ts +7 -0
  94. package/dist/implement/array/some.d.ts.map +1 -0
  95. package/dist/implement/array/some.mjs +11 -0
  96. package/dist/implement/array/some.mjs.map +1 -0
  97. package/dist/implement/array/sort.d.ts +7 -0
  98. package/dist/implement/array/sort.d.ts.map +1 -0
  99. package/dist/implement/array/sort.mjs +9 -0
  100. package/dist/implement/array/sort.mjs.map +1 -0
  101. package/dist/implement/array/sortBy.d.ts +7 -0
  102. package/dist/implement/array/sortBy.d.ts.map +1 -0
  103. package/dist/implement/array/sortBy.mjs +12 -0
  104. package/dist/implement/array/sortBy.mjs.map +1 -0
  105. package/dist/implement/array/tail.d.ts +6 -0
  106. package/dist/implement/array/tail.d.ts.map +1 -0
  107. package/dist/implement/array/tail.mjs +7 -0
  108. package/dist/implement/array/tail.mjs.map +1 -0
  109. package/dist/implement/array/take.d.ts +7 -0
  110. package/dist/implement/array/take.d.ts.map +1 -0
  111. package/dist/implement/array/take.mjs +9 -0
  112. package/dist/implement/array/take.mjs.map +1 -0
  113. package/dist/implement/array/takeWhile.d.ts +7 -0
  114. package/dist/implement/array/takeWhile.d.ts.map +1 -0
  115. package/dist/implement/array/takeWhile.mjs +15 -0
  116. package/dist/implement/array/takeWhile.mjs.map +1 -0
  117. package/dist/implement/array/uniq.d.ts +6 -0
  118. package/dist/implement/array/uniq.d.ts.map +1 -0
  119. package/dist/implement/array/uniq.mjs +10 -0
  120. package/dist/implement/array/uniq.mjs.map +1 -0
  121. package/dist/implement/array/uniqBy.d.ts +7 -0
  122. package/dist/implement/array/uniqBy.d.ts.map +1 -0
  123. package/dist/implement/array/uniqBy.mjs +14 -0
  124. package/dist/implement/array/uniqBy.mjs.map +1 -0
  125. package/dist/implement/array/unzip.d.ts +6 -0
  126. package/dist/implement/array/unzip.d.ts.map +1 -0
  127. package/dist/implement/array/unzip.mjs +10 -0
  128. package/dist/implement/array/unzip.mjs.map +1 -0
  129. package/dist/implement/array/zip.d.ts +7 -0
  130. package/dist/implement/array/zip.d.ts.map +1 -0
  131. package/dist/implement/array/zip.mjs +12 -0
  132. package/dist/implement/array/zip.mjs.map +1 -0
  133. package/dist/implement/array/zipIndex.d.ts +6 -0
  134. package/dist/implement/array/zipIndex.d.ts.map +1 -0
  135. package/dist/implement/array/zipIndex.mjs +7 -0
  136. package/dist/implement/array/zipIndex.mjs.map +1 -0
  137. package/dist/implement/array/zipWith.d.ts +8 -0
  138. package/dist/implement/array/zipWith.d.ts.map +1 -0
  139. package/dist/implement/array/zipWith.mjs +12 -0
  140. package/dist/implement/array/zipWith.mjs.map +1 -0
  141. package/dist/implement/async/debounce.d.ts +7 -0
  142. package/dist/implement/async/debounce.d.ts.map +1 -0
  143. package/dist/implement/async/debounce.mjs +16 -0
  144. package/dist/implement/async/debounce.mjs.map +1 -0
  145. package/dist/implement/async/debounceLeading.d.ts +7 -0
  146. package/dist/implement/async/debounceLeading.d.ts.map +1 -0
  147. package/dist/implement/async/debounceLeading.mjs +14 -0
  148. package/dist/implement/async/debounceLeading.mjs.map +1 -0
  149. package/dist/implement/async/debounceLeadingTrailing.d.ts +7 -0
  150. package/dist/implement/async/debounceLeadingTrailing.d.ts.map +1 -0
  151. package/dist/implement/async/debounceLeadingTrailing.mjs +19 -0
  152. package/dist/implement/async/debounceLeadingTrailing.mjs.map +1 -0
  153. package/dist/implement/async/delay.d.ts +4 -0
  154. package/dist/implement/async/delay.d.ts.map +1 -0
  155. package/dist/implement/async/delay.mjs +9 -0
  156. package/dist/implement/async/delay.mjs.map +1 -0
  157. package/dist/implement/async/index.d.ts +10 -0
  158. package/dist/implement/async/index.d.ts.map +1 -0
  159. package/dist/implement/async/pipeAsync.d.ts +14 -0
  160. package/dist/implement/async/pipeAsync.d.ts.map +1 -0
  161. package/dist/implement/async/pipeAsync.mjs +12 -0
  162. package/dist/implement/async/pipeAsync.mjs.map +1 -0
  163. package/dist/implement/async/pipeAsyncSideEffect.d.ts +21 -0
  164. package/dist/implement/async/pipeAsyncSideEffect.d.ts.map +1 -0
  165. package/dist/implement/async/pipeAsyncSideEffect.mjs +16 -0
  166. package/dist/implement/async/pipeAsyncSideEffect.mjs.map +1 -0
  167. package/dist/implement/async/retry.d.ts +7 -0
  168. package/dist/implement/async/retry.d.ts.map +1 -0
  169. package/dist/implement/async/retry.mjs +19 -0
  170. package/dist/implement/async/retry.mjs.map +1 -0
  171. package/dist/implement/async/throttle.d.ts +7 -0
  172. package/dist/implement/async/throttle.d.ts.map +1 -0
  173. package/dist/implement/async/throttle.mjs +18 -0
  174. package/dist/implement/async/throttle.mjs.map +1 -0
  175. package/dist/implement/async/timeout.d.ts +7 -0
  176. package/dist/implement/async/timeout.d.ts.map +1 -0
  177. package/dist/implement/async/timeout.mjs +16 -0
  178. package/dist/implement/async/timeout.mjs.map +1 -0
  179. package/dist/implement/composition/complement.d.ts +7 -0
  180. package/dist/implement/composition/complement.d.ts.map +1 -0
  181. package/dist/implement/composition/complement.mjs +7 -0
  182. package/dist/implement/composition/complement.mjs.map +1 -0
  183. package/dist/implement/composition/compose.d.ts +16 -0
  184. package/dist/implement/composition/compose.d.ts.map +1 -0
  185. package/dist/implement/composition/compose.mjs +7 -0
  186. package/dist/implement/composition/compose.mjs.map +1 -0
  187. package/dist/implement/composition/constant.d.ts +6 -0
  188. package/dist/implement/composition/constant.d.ts.map +1 -0
  189. package/dist/implement/composition/constant.mjs +7 -0
  190. package/dist/implement/composition/constant.mjs.map +1 -0
  191. package/dist/implement/composition/curry.d.ts +32 -0
  192. package/dist/implement/composition/curry.d.ts.map +1 -0
  193. package/dist/implement/composition/curry.mjs +8 -0
  194. package/dist/implement/composition/curry.mjs.map +1 -0
  195. package/dist/implement/composition/flip.d.ts +10 -0
  196. package/dist/implement/composition/flip.d.ts.map +1 -0
  197. package/dist/implement/composition/flip.mjs +10 -0
  198. package/dist/implement/composition/flip.mjs.map +1 -0
  199. package/dist/implement/composition/identity.d.ts +6 -0
  200. package/dist/implement/composition/identity.d.ts.map +1 -0
  201. package/dist/implement/composition/identity.mjs +7 -0
  202. package/dist/implement/composition/identity.mjs.map +1 -0
  203. package/dist/implement/composition/index.d.ts +16 -0
  204. package/dist/implement/composition/index.d.ts.map +1 -0
  205. package/dist/implement/composition/memoize.d.ts +7 -0
  206. package/dist/implement/composition/memoize.d.ts.map +1 -0
  207. package/dist/implement/composition/memoize.mjs +16 -0
  208. package/dist/implement/composition/memoize.mjs.map +1 -0
  209. package/dist/implement/composition/once.d.ts +7 -0
  210. package/dist/implement/composition/once.d.ts.map +1 -0
  211. package/dist/implement/composition/once.mjs +10 -0
  212. package/dist/implement/composition/once.mjs.map +1 -0
  213. package/dist/implement/composition/partial.d.ts +6 -0
  214. package/dist/implement/composition/partial.d.ts.map +1 -0
  215. package/dist/implement/composition/partial.mjs +10 -0
  216. package/dist/implement/composition/partial.mjs.map +1 -0
  217. package/dist/implement/composition/pipe.d.ts +13 -0
  218. package/dist/implement/composition/pipe.d.ts.map +1 -0
  219. package/dist/implement/composition/pipe.mjs +7 -0
  220. package/dist/implement/composition/pipe.mjs.map +1 -0
  221. package/dist/implement/composition/pipe.type-test.d.ts +20 -0
  222. package/dist/implement/composition/pipe.type-test.d.ts.map +1 -0
  223. package/dist/implement/composition/pipeSideEffect.d.ts +17 -0
  224. package/dist/implement/composition/pipeSideEffect.d.ts.map +1 -0
  225. package/dist/implement/composition/pipeSideEffect.mjs +16 -0
  226. package/dist/implement/composition/pipeSideEffect.mjs.map +1 -0
  227. package/dist/implement/composition/sideEffect.d.ts +18 -0
  228. package/dist/implement/composition/sideEffect.d.ts.map +1 -0
  229. package/dist/implement/composition/sideEffect.mjs +27 -0
  230. package/dist/implement/composition/sideEffect.mjs.map +1 -0
  231. package/dist/implement/composition/tap.d.ts +6 -0
  232. package/dist/implement/composition/tap.d.ts.map +1 -0
  233. package/dist/implement/composition/tap.mjs +7 -0
  234. package/dist/implement/composition/tap.mjs.map +1 -0
  235. package/dist/implement/control/cond.d.ts +6 -0
  236. package/dist/implement/control/cond.d.ts.map +1 -0
  237. package/dist/implement/control/cond.mjs +11 -0
  238. package/dist/implement/control/cond.mjs.map +1 -0
  239. package/dist/implement/control/guard.d.ts +8 -0
  240. package/dist/implement/control/guard.d.ts.map +1 -0
  241. package/dist/implement/control/guard.mjs +9 -0
  242. package/dist/implement/control/guard.mjs.map +1 -0
  243. package/dist/implement/control/ifElse.d.ts +18 -0
  244. package/dist/implement/control/ifElse.d.ts.map +1 -0
  245. package/dist/implement/control/ifElse.mjs +9 -0
  246. package/dist/implement/control/ifElse.mjs.map +1 -0
  247. package/dist/implement/control/index.d.ts +7 -0
  248. package/dist/implement/control/index.d.ts.map +1 -0
  249. package/dist/implement/control/tryCatch.d.ts +12 -0
  250. package/dist/implement/control/tryCatch.d.ts.map +1 -0
  251. package/dist/implement/control/tryCatch.mjs +14 -0
  252. package/dist/implement/control/tryCatch.mjs.map +1 -0
  253. package/dist/implement/control/unless.d.ts +9 -0
  254. package/dist/implement/control/unless.d.ts.map +1 -0
  255. package/dist/implement/control/unless.mjs +9 -0
  256. package/dist/implement/control/unless.mjs.map +1 -0
  257. package/dist/implement/control/when.d.ts +9 -0
  258. package/dist/implement/control/when.d.ts.map +1 -0
  259. package/dist/implement/control/when.mjs +9 -0
  260. package/dist/implement/control/when.mjs.map +1 -0
  261. package/dist/implement/debug/assert.d.ts +6 -0
  262. package/dist/implement/debug/assert.d.ts.map +1 -0
  263. package/dist/implement/debug/assert.mjs +10 -0
  264. package/dist/implement/debug/assert.mjs.map +1 -0
  265. package/dist/implement/debug/index.d.ts +4 -0
  266. package/dist/implement/debug/index.d.ts.map +1 -0
  267. package/dist/implement/debug/invariant.d.ts +6 -0
  268. package/dist/implement/debug/invariant.d.ts.map +1 -0
  269. package/dist/implement/debug/invariant.mjs +10 -0
  270. package/dist/implement/debug/invariant.mjs.map +1 -0
  271. package/dist/implement/debug/log.d.ts +4 -0
  272. package/dist/implement/debug/log.d.ts.map +1 -0
  273. package/dist/implement/debug/log.mjs +7 -0
  274. package/dist/implement/debug/log.mjs.map +1 -0
  275. package/dist/implement/equality/clamp.d.ts +7 -0
  276. package/dist/implement/equality/clamp.d.ts.map +1 -0
  277. package/dist/implement/equality/clamp.mjs +9 -0
  278. package/dist/implement/equality/clamp.mjs.map +1 -0
  279. package/dist/implement/equality/equals.d.ts +6 -0
  280. package/dist/implement/equality/equals.d.ts.map +1 -0
  281. package/dist/implement/equality/equals.mjs +59 -0
  282. package/dist/implement/equality/equals.mjs.map +1 -0
  283. package/dist/implement/equality/gt.d.ts +4 -0
  284. package/dist/implement/equality/gt.d.ts.map +1 -0
  285. package/dist/implement/equality/gt.mjs +7 -0
  286. package/dist/implement/equality/gt.mjs.map +1 -0
  287. package/dist/implement/equality/gte.d.ts +4 -0
  288. package/dist/implement/equality/gte.d.ts.map +1 -0
  289. package/dist/implement/equality/gte.mjs +7 -0
  290. package/dist/implement/equality/gte.mjs.map +1 -0
  291. package/dist/implement/equality/includes.d.ts +4 -0
  292. package/dist/implement/equality/includes.d.ts.map +1 -0
  293. package/dist/implement/equality/includes.mjs +15 -0
  294. package/dist/implement/equality/includes.mjs.map +1 -0
  295. package/dist/implement/equality/index.d.ts +11 -0
  296. package/dist/implement/equality/index.d.ts.map +1 -0
  297. package/dist/implement/equality/isEmpty.d.ts +4 -0
  298. package/dist/implement/equality/isEmpty.d.ts.map +1 -0
  299. package/dist/implement/equality/isEmpty.mjs +7 -0
  300. package/dist/implement/equality/isEmpty.mjs.map +1 -0
  301. package/dist/implement/equality/isNil.d.ts +4 -0
  302. package/dist/implement/equality/isNil.d.ts.map +1 -0
  303. package/dist/implement/equality/isNil.mjs +7 -0
  304. package/dist/implement/equality/isNil.mjs.map +1 -0
  305. package/dist/implement/equality/isType.d.ts +4 -0
  306. package/dist/implement/equality/isType.d.ts.map +1 -0
  307. package/dist/implement/equality/isType.mjs +13 -0
  308. package/dist/implement/equality/isType.mjs.map +1 -0
  309. package/dist/implement/equality/lt.d.ts +4 -0
  310. package/dist/implement/equality/lt.d.ts.map +1 -0
  311. package/dist/implement/equality/lt.mjs +7 -0
  312. package/dist/implement/equality/lt.mjs.map +1 -0
  313. package/dist/implement/equality/lte.d.ts +4 -0
  314. package/dist/implement/equality/lte.d.ts.map +1 -0
  315. package/dist/implement/equality/lte.mjs +7 -0
  316. package/dist/implement/equality/lte.mjs.map +1 -0
  317. package/dist/implement/math/add.d.ts +6 -0
  318. package/dist/implement/math/add.d.ts.map +1 -0
  319. package/dist/implement/math/add.mjs +9 -0
  320. package/dist/implement/math/add.mjs.map +1 -0
  321. package/dist/implement/math/ceil.d.ts +4 -0
  322. package/dist/implement/math/ceil.d.ts.map +1 -0
  323. package/dist/implement/math/ceil.mjs +7 -0
  324. package/dist/implement/math/ceil.mjs.map +1 -0
  325. package/dist/implement/math/div.d.ts +6 -0
  326. package/dist/implement/math/div.d.ts.map +1 -0
  327. package/dist/implement/math/div.mjs +9 -0
  328. package/dist/implement/math/div.mjs.map +1 -0
  329. package/dist/implement/math/floor.d.ts +4 -0
  330. package/dist/implement/math/floor.d.ts.map +1 -0
  331. package/dist/implement/math/floor.mjs +7 -0
  332. package/dist/implement/math/floor.mjs.map +1 -0
  333. package/dist/implement/math/index.d.ts +13 -0
  334. package/dist/implement/math/index.d.ts.map +1 -0
  335. package/dist/implement/math/max.d.ts +4 -0
  336. package/dist/implement/math/max.d.ts.map +1 -0
  337. package/dist/implement/math/max.mjs +7 -0
  338. package/dist/implement/math/max.mjs.map +1 -0
  339. package/dist/implement/math/mean.d.ts +4 -0
  340. package/dist/implement/math/mean.d.ts.map +1 -0
  341. package/dist/implement/math/mean.mjs +7 -0
  342. package/dist/implement/math/mean.mjs.map +1 -0
  343. package/dist/implement/math/min.d.ts +4 -0
  344. package/dist/implement/math/min.d.ts.map +1 -0
  345. package/dist/implement/math/min.mjs +7 -0
  346. package/dist/implement/math/min.mjs.map +1 -0
  347. package/dist/implement/math/mul.d.ts +6 -0
  348. package/dist/implement/math/mul.d.ts.map +1 -0
  349. package/dist/implement/math/mul.mjs +9 -0
  350. package/dist/implement/math/mul.mjs.map +1 -0
  351. package/dist/implement/math/randomInt.d.ts +6 -0
  352. package/dist/implement/math/randomInt.d.ts.map +1 -0
  353. package/dist/implement/math/randomInt.mjs +10 -0
  354. package/dist/implement/math/randomInt.mjs.map +1 -0
  355. package/dist/implement/math/round.d.ts +4 -0
  356. package/dist/implement/math/round.d.ts.map +1 -0
  357. package/dist/implement/math/round.mjs +7 -0
  358. package/dist/implement/math/round.mjs.map +1 -0
  359. package/dist/implement/math/sub.d.ts +6 -0
  360. package/dist/implement/math/sub.d.ts.map +1 -0
  361. package/dist/implement/math/sub.mjs +9 -0
  362. package/dist/implement/math/sub.mjs.map +1 -0
  363. package/dist/implement/math/sum.d.ts +4 -0
  364. package/dist/implement/math/sum.d.ts.map +1 -0
  365. package/dist/implement/math/sum.mjs +7 -0
  366. package/dist/implement/math/sum.mjs.map +1 -0
  367. package/dist/implement/nullable/fold.d.ts +8 -0
  368. package/dist/implement/nullable/fold.d.ts.map +1 -0
  369. package/dist/implement/nullable/fold.mjs +9 -0
  370. package/dist/implement/nullable/fold.mjs.map +1 -0
  371. package/dist/implement/nullable/getOrElse.d.ts +4 -0
  372. package/dist/implement/nullable/getOrElse.d.ts.map +1 -0
  373. package/dist/implement/nullable/getOrElse.mjs +7 -0
  374. package/dist/implement/nullable/getOrElse.mjs.map +1 -0
  375. package/dist/implement/nullable/index.d.ts +6 -0
  376. package/dist/implement/nullable/index.d.ts.map +1 -0
  377. package/dist/implement/nullable/mapMaybe.d.ts +4 -0
  378. package/dist/implement/nullable/mapMaybe.d.ts.map +1 -0
  379. package/dist/implement/nullable/mapMaybe.mjs +14 -0
  380. package/dist/implement/nullable/mapMaybe.mjs.map +1 -0
  381. package/dist/implement/nullable/maybe.d.ts +4 -0
  382. package/dist/implement/nullable/maybe.d.ts.map +1 -0
  383. package/dist/implement/nullable/maybe.mjs +7 -0
  384. package/dist/implement/nullable/maybe.mjs.map +1 -0
  385. package/dist/implement/nullable/result.d.ts +10 -0
  386. package/dist/implement/nullable/result.d.ts.map +1 -0
  387. package/dist/implement/nullable/result.mjs +11 -0
  388. package/dist/implement/nullable/result.mjs.map +1 -0
  389. package/dist/implement/object/assoc.d.ts +11 -0
  390. package/dist/implement/object/assoc.d.ts.map +1 -0
  391. package/dist/implement/object/assoc.mjs +16 -0
  392. package/dist/implement/object/assoc.mjs.map +1 -0
  393. package/dist/implement/object/assoc.type-test.d.ts +30 -0
  394. package/dist/implement/object/assoc.type-test.d.ts.map +1 -0
  395. package/dist/implement/object/assocPath.d.ts +9 -0
  396. package/dist/implement/object/assocPath.d.ts.map +1 -0
  397. package/dist/implement/object/assocPath.mjs +21 -0
  398. package/dist/implement/object/assocPath.mjs.map +1 -0
  399. package/dist/implement/object/dissoc.d.ts +7 -0
  400. package/dist/implement/object/dissoc.d.ts.map +1 -0
  401. package/dist/implement/object/dissoc.mjs +15 -0
  402. package/dist/implement/object/dissoc.mjs.map +1 -0
  403. package/dist/implement/object/dissocPath.d.ts +8 -0
  404. package/dist/implement/object/dissocPath.d.ts.map +1 -0
  405. package/dist/implement/object/dissocPath.mjs +33 -0
  406. package/dist/implement/object/dissocPath.mjs.map +1 -0
  407. package/dist/implement/object/entries.d.ts +6 -0
  408. package/dist/implement/object/entries.d.ts.map +1 -0
  409. package/dist/implement/object/entries.mjs +7 -0
  410. package/dist/implement/object/entries.mjs.map +1 -0
  411. package/dist/implement/object/evolve.d.ts +9 -0
  412. package/dist/implement/object/evolve.d.ts.map +1 -0
  413. package/dist/implement/object/evolve.mjs +14 -0
  414. package/dist/implement/object/evolve.mjs.map +1 -0
  415. package/dist/implement/object/has.d.ts +7 -0
  416. package/dist/implement/object/has.d.ts.map +1 -0
  417. package/dist/implement/object/has.mjs +9 -0
  418. package/dist/implement/object/has.mjs.map +1 -0
  419. package/dist/implement/object/hasPath.d.ts +6 -0
  420. package/dist/implement/object/hasPath.d.ts.map +1 -0
  421. package/dist/implement/object/hasPath.mjs +15 -0
  422. package/dist/implement/object/hasPath.mjs.map +1 -0
  423. package/dist/implement/object/index.d.ts +21 -0
  424. package/dist/implement/object/index.d.ts.map +1 -0
  425. package/dist/implement/object/keys.d.ts +6 -0
  426. package/dist/implement/object/keys.d.ts.map +1 -0
  427. package/dist/implement/object/keys.mjs +7 -0
  428. package/dist/implement/object/keys.mjs.map +1 -0
  429. package/dist/implement/object/mapValues.d.ts +6 -0
  430. package/dist/implement/object/mapValues.d.ts.map +1 -0
  431. package/dist/implement/object/mapValues.mjs +12 -0
  432. package/dist/implement/object/mapValues.mjs.map +1 -0
  433. package/dist/implement/object/merge.d.ts +7 -0
  434. package/dist/implement/object/merge.d.ts.map +1 -0
  435. package/dist/implement/object/merge.mjs +12 -0
  436. package/dist/implement/object/merge.mjs.map +1 -0
  437. package/dist/implement/object/mergeAll.d.ts +6 -0
  438. package/dist/implement/object/mergeAll.d.ts.map +1 -0
  439. package/dist/implement/object/mergeAll.mjs +10 -0
  440. package/dist/implement/object/mergeAll.mjs.map +1 -0
  441. package/dist/implement/object/mergeDeep.d.ts +7 -0
  442. package/dist/implement/object/mergeDeep.d.ts.map +1 -0
  443. package/dist/implement/object/mergeDeep.mjs +20 -0
  444. package/dist/implement/object/mergeDeep.mjs.map +1 -0
  445. package/dist/implement/object/omit.d.ts +7 -0
  446. package/dist/implement/object/omit.d.ts.map +1 -0
  447. package/dist/implement/object/omit.mjs +12 -0
  448. package/dist/implement/object/omit.mjs.map +1 -0
  449. package/dist/implement/object/path.d.ts +7 -0
  450. package/dist/implement/object/path.d.ts.map +1 -0
  451. package/dist/implement/object/path.mjs +9 -0
  452. package/dist/implement/object/path.mjs.map +1 -0
  453. package/dist/implement/object/pathOr.d.ts +8 -0
  454. package/dist/implement/object/pathOr.d.ts.map +1 -0
  455. package/dist/implement/object/pathOr.mjs +10 -0
  456. package/dist/implement/object/pathOr.mjs.map +1 -0
  457. package/dist/implement/object/pick.d.ts +7 -0
  458. package/dist/implement/object/pick.d.ts.map +1 -0
  459. package/dist/implement/object/pick.mjs +12 -0
  460. package/dist/implement/object/pick.mjs.map +1 -0
  461. package/dist/implement/object/prop.d.ts +7 -0
  462. package/dist/implement/object/prop.d.ts.map +1 -0
  463. package/dist/implement/object/prop.mjs +9 -0
  464. package/dist/implement/object/prop.mjs.map +1 -0
  465. package/dist/implement/object/propOr.d.ts +8 -0
  466. package/dist/implement/object/propOr.d.ts.map +1 -0
  467. package/dist/implement/object/propOr.mjs +10 -0
  468. package/dist/implement/object/propOr.mjs.map +1 -0
  469. package/dist/implement/object/values.d.ts +6 -0
  470. package/dist/implement/object/values.d.ts.map +1 -0
  471. package/dist/implement/object/values.mjs +7 -0
  472. package/dist/implement/object/values.mjs.map +1 -0
  473. package/dist/implement/string/endsWith.d.ts +5 -0
  474. package/dist/implement/string/endsWith.d.ts.map +1 -0
  475. package/dist/implement/string/endsWith.mjs +18 -0
  476. package/dist/implement/string/endsWith.mjs.map +1 -0
  477. package/dist/implement/string/index.d.ts +10 -0
  478. package/dist/implement/string/index.d.ts.map +1 -0
  479. package/dist/implement/string/join.d.ts +6 -0
  480. package/dist/implement/string/join.d.ts.map +1 -0
  481. package/dist/implement/string/join.mjs +9 -0
  482. package/dist/implement/string/join.mjs.map +1 -0
  483. package/dist/implement/string/match.d.ts +6 -0
  484. package/dist/implement/string/match.d.ts.map +1 -0
  485. package/dist/implement/string/match.mjs +9 -0
  486. package/dist/implement/string/match.mjs.map +1 -0
  487. package/dist/implement/string/replace.d.ts +7 -0
  488. package/dist/implement/string/replace.d.ts.map +1 -0
  489. package/dist/implement/string/replace.mjs +9 -0
  490. package/dist/implement/string/replace.mjs.map +1 -0
  491. package/dist/implement/string/split.d.ts +6 -0
  492. package/dist/implement/string/split.d.ts.map +1 -0
  493. package/dist/implement/string/split.mjs +9 -0
  494. package/dist/implement/string/split.mjs.map +1 -0
  495. package/dist/implement/string/startsWith.d.ts +5 -0
  496. package/dist/implement/string/startsWith.d.ts.map +1 -0
  497. package/dist/implement/string/startsWith.mjs +16 -0
  498. package/dist/implement/string/startsWith.mjs.map +1 -0
  499. package/dist/implement/string/toLower.d.ts +4 -0
  500. package/dist/implement/string/toLower.d.ts.map +1 -0
  501. package/dist/implement/string/toLower.mjs +7 -0
  502. package/dist/implement/string/toLower.mjs.map +1 -0
  503. package/dist/implement/string/toUpper.d.ts +4 -0
  504. package/dist/implement/string/toUpper.d.ts.map +1 -0
  505. package/dist/implement/string/toUpper.mjs +7 -0
  506. package/dist/implement/string/toUpper.mjs.map +1 -0
  507. package/dist/implement/string/trim.d.ts +4 -0
  508. package/dist/implement/string/trim.d.ts.map +1 -0
  509. package/dist/implement/string/trim.mjs +7 -0
  510. package/dist/implement/string/trim.mjs.map +1 -0
  511. package/dist/index.d.ts +11 -0
  512. package/dist/index.d.ts.map +1 -0
  513. package/dist/index.mjs +247 -0
  514. package/dist/index.mjs.map +1 -0
  515. package/dist/skills/fp-pack.md +1644 -0
  516. package/dist/stream/append.d.ts +8 -0
  517. package/dist/stream/append.d.ts.map +1 -0
  518. package/dist/stream/append.mjs +23 -0
  519. package/dist/stream/append.mjs.map +1 -0
  520. package/dist/stream/chunk.d.ts +7 -0
  521. package/dist/stream/chunk.d.ts.map +1 -0
  522. package/dist/stream/chunk.mjs +37 -0
  523. package/dist/stream/chunk.mjs.map +1 -0
  524. package/dist/stream/concat.d.ts +8 -0
  525. package/dist/stream/concat.d.ts.map +1 -0
  526. package/dist/stream/concat.mjs +25 -0
  527. package/dist/stream/concat.mjs.map +1 -0
  528. package/dist/stream/drop.d.ts +8 -0
  529. package/dist/stream/drop.d.ts.map +1 -0
  530. package/dist/stream/drop.mjs +42 -0
  531. package/dist/stream/drop.mjs.map +1 -0
  532. package/dist/stream/dropWhile.d.ts +8 -0
  533. package/dist/stream/dropWhile.d.ts.map +1 -0
  534. package/dist/stream/dropWhile.mjs +23 -0
  535. package/dist/stream/dropWhile.mjs.map +1 -0
  536. package/dist/stream/every.d.ts +8 -0
  537. package/dist/stream/every.d.ts.map +1 -0
  538. package/dist/stream/every.mjs +24 -0
  539. package/dist/stream/every.mjs.map +1 -0
  540. package/dist/stream/filter.d.ts +8 -0
  541. package/dist/stream/filter.d.ts.map +1 -0
  542. package/dist/stream/filter.mjs +21 -0
  543. package/dist/stream/filter.mjs.map +1 -0
  544. package/dist/stream/find.d.ts +8 -0
  545. package/dist/stream/find.d.ts.map +1 -0
  546. package/dist/stream/find.mjs +23 -0
  547. package/dist/stream/find.mjs.map +1 -0
  548. package/dist/stream/flatMap.d.ts +8 -0
  549. package/dist/stream/flatMap.d.ts.map +1 -0
  550. package/dist/stream/flatMap.mjs +27 -0
  551. package/dist/stream/flatMap.mjs.map +1 -0
  552. package/dist/stream/flatten.d.ts +6 -0
  553. package/dist/stream/flatten.d.ts.map +1 -0
  554. package/dist/stream/flatten.mjs +23 -0
  555. package/dist/stream/flatten.mjs.map +1 -0
  556. package/dist/stream/flattenDeep.d.ts +6 -0
  557. package/dist/stream/flattenDeep.d.ts.map +1 -0
  558. package/dist/stream/flattenDeep.mjs +30 -0
  559. package/dist/stream/flattenDeep.mjs.map +1 -0
  560. package/dist/stream/index.d.ts +24 -0
  561. package/dist/stream/index.d.ts.map +1 -0
  562. package/dist/stream/index.mjs +49 -0
  563. package/dist/stream/index.mjs.map +1 -0
  564. package/dist/stream/map.d.ts +8 -0
  565. package/dist/stream/map.d.ts.map +1 -0
  566. package/dist/stream/map.mjs +21 -0
  567. package/dist/stream/map.mjs.map +1 -0
  568. package/dist/stream/prepend.d.ts +8 -0
  569. package/dist/stream/prepend.d.ts.map +1 -0
  570. package/dist/stream/prepend.mjs +23 -0
  571. package/dist/stream/prepend.mjs.map +1 -0
  572. package/dist/stream/range.d.ts +4 -0
  573. package/dist/stream/range.d.ts.map +1 -0
  574. package/dist/stream/range.mjs +17 -0
  575. package/dist/stream/range.mjs.map +1 -0
  576. package/dist/stream/reduce.d.ts +8 -0
  577. package/dist/stream/reduce.d.ts.map +1 -0
  578. package/dist/stream/reduce.mjs +24 -0
  579. package/dist/stream/reduce.mjs.map +1 -0
  580. package/dist/stream/scan.d.ts +8 -0
  581. package/dist/stream/scan.d.ts.map +1 -0
  582. package/dist/stream/scan.mjs +23 -0
  583. package/dist/stream/scan.mjs.map +1 -0
  584. package/dist/stream/some.d.ts +8 -0
  585. package/dist/stream/some.d.ts.map +1 -0
  586. package/dist/stream/some.mjs +24 -0
  587. package/dist/stream/some.mjs.map +1 -0
  588. package/dist/stream/take.d.ts +8 -0
  589. package/dist/stream/take.d.ts.map +1 -0
  590. package/dist/stream/take.mjs +30 -0
  591. package/dist/stream/take.mjs.map +1 -0
  592. package/dist/stream/takeWhile.d.ts +8 -0
  593. package/dist/stream/takeWhile.d.ts.map +1 -0
  594. package/dist/stream/takeWhile.mjs +27 -0
  595. package/dist/stream/takeWhile.mjs.map +1 -0
  596. package/dist/stream/toArray.d.ts +5 -0
  597. package/dist/stream/toArray.d.ts.map +1 -0
  598. package/dist/stream/toArray.mjs +19 -0
  599. package/dist/stream/toArray.mjs.map +1 -0
  600. package/dist/stream/toAsync.d.ts +6 -0
  601. package/dist/stream/toAsync.d.ts.map +1 -0
  602. package/dist/stream/toAsync.mjs +21 -0
  603. package/dist/stream/toAsync.mjs.map +1 -0
  604. package/dist/stream/utils.d.ts +12 -0
  605. package/dist/stream/utils.d.ts.map +1 -0
  606. package/dist/stream/utils.mjs +10 -0
  607. package/dist/stream/utils.mjs.map +1 -0
  608. package/dist/stream/zip.d.ts +8 -0
  609. package/dist/stream/zip.d.ts.map +1 -0
  610. package/dist/stream/zip.mjs +31 -0
  611. package/dist/stream/zip.mjs.map +1 -0
  612. package/dist/stream/zipWith.d.ts +8 -0
  613. package/dist/stream/zipWith.d.ts.map +1 -0
  614. package/dist/stream/zipWith.mjs +31 -0
  615. package/dist/stream/zipWith.mjs.map +1 -0
  616. package/package.json +87 -0
  617. package/src/implement/array/append.test.ts +13 -0
  618. package/src/implement/array/append.ts +16 -0
  619. package/src/implement/array/chunk.test.ts +23 -0
  620. package/src/implement/array/chunk.ts +25 -0
  621. package/src/implement/array/concat.test.ts +13 -0
  622. package/src/implement/array/concat.ts +16 -0
  623. package/src/implement/array/curried.test.ts +91 -0
  624. package/src/implement/array/drop.test.ts +22 -0
  625. package/src/implement/array/drop.ts +20 -0
  626. package/src/implement/array/dropWhile.test.ts +13 -0
  627. package/src/implement/array/dropWhile.ts +26 -0
  628. package/src/implement/array/every.test.ts +16 -0
  629. package/src/implement/array/every.ts +16 -0
  630. package/src/implement/array/filter.test.ts +16 -0
  631. package/src/implement/array/filter.ts +16 -0
  632. package/src/implement/array/find.test.ts +16 -0
  633. package/src/implement/array/find.ts +16 -0
  634. package/src/implement/array/flatMap.test.ts +13 -0
  635. package/src/implement/array/flatMap.ts +16 -0
  636. package/src/implement/array/flatten.test.ts +8 -0
  637. package/src/implement/array/flatten.ts +8 -0
  638. package/src/implement/array/flattenDeep.test.ts +13 -0
  639. package/src/implement/array/flattenDeep.ts +21 -0
  640. package/src/implement/array/groupBy.test.ts +13 -0
  641. package/src/implement/array/groupBy.ts +23 -0
  642. package/src/implement/array/head.test.ts +12 -0
  643. package/src/implement/array/head.ts +8 -0
  644. package/src/implement/array/index.ts +33 -0
  645. package/src/implement/array/init.test.ts +13 -0
  646. package/src/implement/array/init.ts +9 -0
  647. package/src/implement/array/last.test.ts +12 -0
  648. package/src/implement/array/last.ts +9 -0
  649. package/src/implement/array/map.test.ts +12 -0
  650. package/src/implement/array/map.ts +16 -0
  651. package/src/implement/array/partition.test.ts +14 -0
  652. package/src/implement/array/partition.ts +27 -0
  653. package/src/implement/array/prepend.test.ts +13 -0
  654. package/src/implement/array/prepend.ts +16 -0
  655. package/src/implement/array/range.test.ts +16 -0
  656. package/src/implement/array/range.ts +18 -0
  657. package/src/implement/array/reduce.test.ts +25 -0
  658. package/src/implement/array/reduce.ts +21 -0
  659. package/src/implement/array/scan.test.ts +13 -0
  660. package/src/implement/array/scan.ts +23 -0
  661. package/src/implement/array/some.test.ts +25 -0
  662. package/src/implement/array/some.ts +19 -0
  663. package/src/implement/array/sort.test.ts +25 -0
  664. package/src/implement/array/sort.ts +16 -0
  665. package/src/implement/array/sortBy.test.ts +28 -0
  666. package/src/implement/array/sortBy.ts +22 -0
  667. package/src/implement/array/tail.test.ts +13 -0
  668. package/src/implement/array/tail.ts +8 -0
  669. package/src/implement/array/take.test.ts +20 -0
  670. package/src/implement/array/take.ts +18 -0
  671. package/src/implement/array/takeWhile.test.ts +13 -0
  672. package/src/implement/array/takeWhile.ts +23 -0
  673. package/src/implement/array/uniq.test.ts +18 -0
  674. package/src/implement/array/uniq.ts +16 -0
  675. package/src/implement/array/uniqBy.test.ts +22 -0
  676. package/src/implement/array/uniqBy.ts +25 -0
  677. package/src/implement/array/unzip.test.ts +22 -0
  678. package/src/implement/array/unzip.ts +16 -0
  679. package/src/implement/array/zip.test.ts +16 -0
  680. package/src/implement/array/zip.ts +23 -0
  681. package/src/implement/array/zipIndex.test.ts +16 -0
  682. package/src/implement/array/zipIndex.ts +8 -0
  683. package/src/implement/array/zipWith.test.ts +13 -0
  684. package/src/implement/array/zipWith.ts +22 -0
  685. package/src/implement/async/curried.test.ts +133 -0
  686. package/src/implement/async/debounce.test.ts +21 -0
  687. package/src/implement/async/debounce.ts +26 -0
  688. package/src/implement/async/debounceLeading.test.ts +24 -0
  689. package/src/implement/async/debounceLeading.ts +25 -0
  690. package/src/implement/async/debounceLeadingTrailing.test.ts +37 -0
  691. package/src/implement/async/debounceLeadingTrailing.ts +41 -0
  692. package/src/implement/async/delay.test.ts +22 -0
  693. package/src/implement/async/delay.ts +7 -0
  694. package/src/implement/async/index.ts +9 -0
  695. package/src/implement/async/pipeAsync.test.ts +23 -0
  696. package/src/implement/async/pipeAsync.ts +48 -0
  697. package/src/implement/async/pipeAsyncSideEffect.test.ts +23 -0
  698. package/src/implement/async/pipeAsyncSideEffect.ts +68 -0
  699. package/src/implement/async/retry.test.ts +49 -0
  700. package/src/implement/async/retry.ts +27 -0
  701. package/src/implement/async/throttle.test.ts +38 -0
  702. package/src/implement/async/throttle.ts +47 -0
  703. package/src/implement/async/timeout.test.ts +20 -0
  704. package/src/implement/async/timeout.ts +24 -0
  705. package/src/implement/composition/complement.test.ts +17 -0
  706. package/src/implement/composition/complement.ts +13 -0
  707. package/src/implement/composition/compose.test.ts +30 -0
  708. package/src/implement/composition/compose.ts +48 -0
  709. package/src/implement/composition/constant.test.ts +16 -0
  710. package/src/implement/composition/constant.ts +8 -0
  711. package/src/implement/composition/curry.test.ts +31 -0
  712. package/src/implement/composition/curry.ts +71 -0
  713. package/src/implement/composition/flip.test.ts +41 -0
  714. package/src/implement/composition/flip.ts +16 -0
  715. package/src/implement/composition/identity.test.ts +14 -0
  716. package/src/implement/composition/identity.ts +8 -0
  717. package/src/implement/composition/index.ts +15 -0
  718. package/src/implement/composition/memoize.test.ts +46 -0
  719. package/src/implement/composition/memoize.ts +31 -0
  720. package/src/implement/composition/once.test.ts +30 -0
  721. package/src/implement/composition/once.ts +21 -0
  722. package/src/implement/composition/partial.test.ts +25 -0
  723. package/src/implement/composition/partial.ts +14 -0
  724. package/src/implement/composition/pipe.test.ts +31 -0
  725. package/src/implement/composition/pipe.ts +39 -0
  726. package/src/implement/composition/pipe.type-test.ts +54 -0
  727. package/src/implement/composition/pipeSideEffect.test.ts +23 -0
  728. package/src/implement/composition/pipeSideEffect.ts +60 -0
  729. package/src/implement/composition/sideEffect.test.ts +43 -0
  730. package/src/implement/composition/sideEffect.ts +44 -0
  731. package/src/implement/composition/tap.test.ts +17 -0
  732. package/src/implement/composition/tap.ts +11 -0
  733. package/src/implement/control/cond.test.ts +33 -0
  734. package/src/implement/control/cond.ts +17 -0
  735. package/src/implement/control/curried.test.ts +71 -0
  736. package/src/implement/control/guard.test.ts +17 -0
  737. package/src/implement/control/guard.ts +27 -0
  738. package/src/implement/control/ifElse.test.ts +68 -0
  739. package/src/implement/control/ifElse.ts +40 -0
  740. package/src/implement/control/index.ts +6 -0
  741. package/src/implement/control/tryCatch.test.ts +35 -0
  742. package/src/implement/control/tryCatch.ts +36 -0
  743. package/src/implement/control/unless.test.ts +22 -0
  744. package/src/implement/control/unless.ts +29 -0
  745. package/src/implement/control/when.test.ts +22 -0
  746. package/src/implement/control/when.ts +29 -0
  747. package/src/implement/debug/assert.test.ts +16 -0
  748. package/src/implement/debug/assert.ts +9 -0
  749. package/src/implement/debug/curried.test.ts +17 -0
  750. package/src/implement/debug/index.ts +3 -0
  751. package/src/implement/debug/invariant.test.ts +16 -0
  752. package/src/implement/debug/invariant.ts +9 -0
  753. package/src/implement/debug/log.test.ts +20 -0
  754. package/src/implement/debug/log.ts +12 -0
  755. package/src/implement/equality/clamp.test.ts +16 -0
  756. package/src/implement/equality/clamp.ts +9 -0
  757. package/src/implement/equality/curried.test.ts +13 -0
  758. package/src/implement/equality/equals.test.ts +63 -0
  759. package/src/implement/equality/equals.ts +87 -0
  760. package/src/implement/equality/gt.test.ts +13 -0
  761. package/src/implement/equality/gt.ts +5 -0
  762. package/src/implement/equality/gte.test.ts +13 -0
  763. package/src/implement/equality/gte.ts +5 -0
  764. package/src/implement/equality/includes.test.ts +16 -0
  765. package/src/implement/equality/includes.ts +21 -0
  766. package/src/implement/equality/index.ts +10 -0
  767. package/src/implement/equality/isEmpty.test.ts +24 -0
  768. package/src/implement/equality/isEmpty.ts +19 -0
  769. package/src/implement/equality/isNil.test.ts +16 -0
  770. package/src/implement/equality/isNil.ts +5 -0
  771. package/src/implement/equality/isType.test.ts +28 -0
  772. package/src/implement/equality/isType.ts +13 -0
  773. package/src/implement/equality/lt.test.ts +13 -0
  774. package/src/implement/equality/lt.ts +5 -0
  775. package/src/implement/equality/lte.test.ts +13 -0
  776. package/src/implement/equality/lte.ts +5 -0
  777. package/src/implement/math/add.test.ts +9 -0
  778. package/src/implement/math/add.ts +7 -0
  779. package/src/implement/math/ceil.test.ts +10 -0
  780. package/src/implement/math/ceil.ts +5 -0
  781. package/src/implement/math/curried.test.ts +30 -0
  782. package/src/implement/math/div.test.ts +9 -0
  783. package/src/implement/math/div.ts +7 -0
  784. package/src/implement/math/floor.test.ts +10 -0
  785. package/src/implement/math/floor.ts +5 -0
  786. package/src/implement/math/index.ts +12 -0
  787. package/src/implement/math/max.test.ts +13 -0
  788. package/src/implement/math/max.ts +6 -0
  789. package/src/implement/math/mean.test.ts +12 -0
  790. package/src/implement/math/mean.ts +7 -0
  791. package/src/implement/math/min.test.ts +12 -0
  792. package/src/implement/math/min.ts +6 -0
  793. package/src/implement/math/mul.test.ts +9 -0
  794. package/src/implement/math/mul.ts +7 -0
  795. package/src/implement/math/randomInt.test.ts +22 -0
  796. package/src/implement/math/randomInt.ts +14 -0
  797. package/src/implement/math/round.test.ts +10 -0
  798. package/src/implement/math/round.ts +5 -0
  799. package/src/implement/math/sub.test.ts +9 -0
  800. package/src/implement/math/sub.ts +7 -0
  801. package/src/implement/math/sum.test.ts +10 -0
  802. package/src/implement/math/sum.ts +5 -0
  803. package/src/implement/nullable/curried.test.ts +13 -0
  804. package/src/implement/nullable/fold.test.ts +31 -0
  805. package/src/implement/nullable/fold.ts +27 -0
  806. package/src/implement/nullable/getOrElse.test.ts +17 -0
  807. package/src/implement/nullable/getOrElse.ts +10 -0
  808. package/src/implement/nullable/index.ts +5 -0
  809. package/src/implement/nullable/mapMaybe.test.ts +23 -0
  810. package/src/implement/nullable/mapMaybe.ts +18 -0
  811. package/src/implement/nullable/maybe.test.ts +15 -0
  812. package/src/implement/nullable/maybe.ts +10 -0
  813. package/src/implement/nullable/result.test.ts +17 -0
  814. package/src/implement/nullable/result.ts +10 -0
  815. package/src/implement/object/assoc.test.ts +27 -0
  816. package/src/implement/object/assoc.ts +43 -0
  817. package/src/implement/object/assoc.type-test.ts +38 -0
  818. package/src/implement/object/assocPath.test.ts +33 -0
  819. package/src/implement/object/assocPath.ts +64 -0
  820. package/src/implement/object/curried.test.ts +49 -0
  821. package/src/implement/object/dissoc.test.ts +20 -0
  822. package/src/implement/object/dissoc.ts +26 -0
  823. package/src/implement/object/dissocPath.test.ts +18 -0
  824. package/src/implement/object/dissocPath.ts +80 -0
  825. package/src/implement/object/entries.test.ts +12 -0
  826. package/src/implement/object/entries.ts +8 -0
  827. package/src/implement/object/evolve.test.ts +14 -0
  828. package/src/implement/object/evolve.ts +31 -0
  829. package/src/implement/object/has.test.ts +10 -0
  830. package/src/implement/object/has.ts +16 -0
  831. package/src/implement/object/hasPath.test.ts +13 -0
  832. package/src/implement/object/hasPath.ts +17 -0
  833. package/src/implement/object/index.ts +20 -0
  834. package/src/implement/object/keys.test.ts +9 -0
  835. package/src/implement/object/keys.ts +8 -0
  836. package/src/implement/object/mapValues.test.ts +11 -0
  837. package/src/implement/object/mapValues.ts +16 -0
  838. package/src/implement/object/merge.test.ts +22 -0
  839. package/src/implement/object/merge.ts +19 -0
  840. package/src/implement/object/mergeAll.test.ts +13 -0
  841. package/src/implement/object/mergeAll.ts +12 -0
  842. package/src/implement/object/mergeDeep.test.ts +11 -0
  843. package/src/implement/object/mergeDeep.ts +41 -0
  844. package/src/implement/object/omit.test.ts +12 -0
  845. package/src/implement/object/omit.ts +20 -0
  846. package/src/implement/object/path.test.ts +9 -0
  847. package/src/implement/object/path.ts +16 -0
  848. package/src/implement/object/pathOr.test.ts +15 -0
  849. package/src/implement/object/pathOr.ts +18 -0
  850. package/src/implement/object/pick.test.ts +12 -0
  851. package/src/implement/object/pick.ts +22 -0
  852. package/src/implement/object/prop.test.ts +9 -0
  853. package/src/implement/object/prop.ts +16 -0
  854. package/src/implement/object/propOr.test.ts +15 -0
  855. package/src/implement/object/propOr.ts +22 -0
  856. package/src/implement/object/values.test.ts +9 -0
  857. package/src/implement/object/values.ts +8 -0
  858. package/src/implement/string/curried.test.ts +21 -0
  859. package/src/implement/string/endsWith.test.ts +23 -0
  860. package/src/implement/string/endsWith.ts +21 -0
  861. package/src/implement/string/index.ts +9 -0
  862. package/src/implement/string/join.test.ts +16 -0
  863. package/src/implement/string/join.ts +7 -0
  864. package/src/implement/string/match.test.ts +13 -0
  865. package/src/implement/string/match.ts +7 -0
  866. package/src/implement/string/replace.test.ts +12 -0
  867. package/src/implement/string/replace.ts +7 -0
  868. package/src/implement/string/split.test.ts +12 -0
  869. package/src/implement/string/split.ts +7 -0
  870. package/src/implement/string/startsWith.test.ts +21 -0
  871. package/src/implement/string/startsWith.ts +20 -0
  872. package/src/implement/string/toLower.test.ts +13 -0
  873. package/src/implement/string/toLower.ts +5 -0
  874. package/src/implement/string/toUpper.test.ts +13 -0
  875. package/src/implement/string/toUpper.ts +5 -0
  876. package/src/implement/string/trim.test.ts +12 -0
  877. package/src/implement/string/trim.ts +5 -0
  878. package/src/index.ts +32 -0
  879. package/src/stream/append.test.ts +20 -0
  880. package/src/stream/append.ts +39 -0
  881. package/src/stream/chunk.test.ts +62 -0
  882. package/src/stream/chunk.ts +74 -0
  883. package/src/stream/concat.test.ts +20 -0
  884. package/src/stream/concat.ts +43 -0
  885. package/src/stream/drop.test.ts +19 -0
  886. package/src/stream/drop.ts +59 -0
  887. package/src/stream/dropWhile.test.ts +20 -0
  888. package/src/stream/dropWhile.ts +51 -0
  889. package/src/stream/every.test.ts +19 -0
  890. package/src/stream/every.ts +46 -0
  891. package/src/stream/filter.test.ts +19 -0
  892. package/src/stream/filter.ts +46 -0
  893. package/src/stream/find.test.ts +18 -0
  894. package/src/stream/find.ts +43 -0
  895. package/src/stream/flatMap.test.ts +20 -0
  896. package/src/stream/flatMap.ts +48 -0
  897. package/src/stream/flatten.test.ts +17 -0
  898. package/src/stream/flatten.ts +33 -0
  899. package/src/stream/flattenDeep.test.ts +17 -0
  900. package/src/stream/flattenDeep.ts +41 -0
  901. package/src/stream/index.ts +23 -0
  902. package/src/stream/map.test.ts +19 -0
  903. package/src/stream/map.ts +39 -0
  904. package/src/stream/pipeAsync.test.ts +27 -0
  905. package/src/stream/prepend.test.ts +20 -0
  906. package/src/stream/prepend.ts +39 -0
  907. package/src/stream/range.test.ts +16 -0
  908. package/src/stream/range.ts +20 -0
  909. package/src/stream/reduce.test.ts +18 -0
  910. package/src/stream/reduce.ts +47 -0
  911. package/src/stream/scan.test.ts +22 -0
  912. package/src/stream/scan.ts +49 -0
  913. package/src/stream/some.test.ts +19 -0
  914. package/src/stream/some.ts +46 -0
  915. package/src/stream/take.test.ts +19 -0
  916. package/src/stream/take.ts +51 -0
  917. package/src/stream/takeWhile.test.ts +20 -0
  918. package/src/stream/takeWhile.ts +45 -0
  919. package/src/stream/toArray.test.ts +19 -0
  920. package/src/stream/toArray.ts +26 -0
  921. package/src/stream/toAsync.test.ts +11 -0
  922. package/src/stream/toAsync.ts +30 -0
  923. package/src/stream/utils.ts +30 -0
  924. package/src/stream/zip.test.ts +29 -0
  925. package/src/stream/zip.ts +56 -0
  926. package/src/stream/zipWith.test.ts +22 -0
  927. package/src/stream/zipWith.ts +62 -0
@@ -0,0 +1,8 @@
1
+ import { AnyIterableInput, PromiseLikeValue } from './utils';
2
+ /** append - lazily append a value to the end */
3
+ declare function append<T>(value: T): (iterable: Iterable<T>) => IterableIterator<T>;
4
+ declare function append<T>(value: PromiseLikeValue<T>): (iterable: AnyIterableInput<PromiseLikeValue<T>>) => AsyncIterableIterator<T>;
5
+ declare function append<T>(value: T, iterable: Iterable<T>): IterableIterator<T>;
6
+ declare function append<T>(value: PromiseLikeValue<T>, iterable: AnyIterableInput<PromiseLikeValue<T>>): AsyncIterableIterator<T>;
7
+ export default append;
8
+ //# sourceMappingURL=append.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"append.d.ts","sourceRoot":"","sources":["../../src/stream/append.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAIlE,gDAAgD;AAChD,iBAAS,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC,CAAC,CAAC,CAAC;AAC7E,iBAAS,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,KAAK,qBAAqB,CAAC,CAAC,CAAC,CAAC;AAC9H,iBAAS,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC;AACzE,iBAAS,MAAM,CAAC,CAAC,EACf,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAC1B,QAAQ,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,GAC9C,qBAAqB,CAAC,CAAC,CAAC,CAAC;AA2B5B,eAAe,MAAM,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { isAsyncInput as o, awaitValue as r, isIterable as f } from "./utils.mjs";
2
+ import e from "./toAsync.mjs";
3
+ function p(i, n) {
4
+ if (n === void 0)
5
+ return (t) => p(i, t);
6
+ if (o(n))
7
+ return (async function* () {
8
+ for await (const t of e(n))
9
+ yield t;
10
+ yield await r(i);
11
+ })();
12
+ if (f(n))
13
+ return (function* () {
14
+ for (const t of n)
15
+ yield t;
16
+ yield i;
17
+ })();
18
+ throw new TypeError("append: input is not iterable");
19
+ }
20
+ export {
21
+ p as default
22
+ };
23
+ //# sourceMappingURL=append.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"append.mjs","sources":["../../src/stream/append.ts"],"sourcesContent":["import type { AnyIterableInput, PromiseLikeValue } from './utils';\nimport { awaitValue, isAsyncInput, isIterable } from './utils';\nimport toAsync from './toAsync';\n\n/** append - lazily append a value to the end */\nfunction append<T>(value: T): (iterable: Iterable<T>) => IterableIterator<T>;\nfunction append<T>(value: PromiseLikeValue<T>): (iterable: AnyIterableInput<PromiseLikeValue<T>>) => AsyncIterableIterator<T>;\nfunction append<T>(value: T, iterable: Iterable<T>): IterableIterator<T>;\nfunction append<T>(\n value: PromiseLikeValue<T>,\n iterable: AnyIterableInput<PromiseLikeValue<T>>\n): AsyncIterableIterator<T>;\nfunction append<T>(value: PromiseLikeValue<T>, iterable?: AnyIterableInput<PromiseLikeValue<T>>): any {\n if (iterable === undefined) {\n return (next: AnyIterableInput<PromiseLikeValue<T>>) => append(value, next);\n }\n\n if (isAsyncInput(iterable)) {\n return (async function* () {\n for await (const item of toAsync(iterable)) {\n yield item as T;\n }\n yield await awaitValue(value);\n })();\n }\n\n if (isIterable(iterable)) {\n return (function* () {\n for (const item of iterable) {\n yield item as T;\n }\n yield value as T;\n })();\n }\n\n throw new TypeError('append: input is not iterable');\n}\n\nexport default append;\n"],"names":["append","value","iterable","next","isAsyncInput","item","toAsync","awaitValue","isIterable"],"mappings":";;AAYA,SAASA,EAAUC,GAA4BC,GAAuD;AACpG,MAAIA,MAAa;AACf,WAAO,CAACC,MAAgDH,EAAOC,GAAOE,CAAI;AAG5E,MAAIC,EAAaF,CAAQ;AACvB,YAAQ,mBAAmB;AACzB,uBAAiBG,KAAQC,EAAQJ,CAAQ;AACvC,cAAMG;AAER,YAAM,MAAME,EAAWN,CAAK;AAAA,IAC9B,GAAA;AAGF,MAAIO,EAAWN,CAAQ;AACrB,YAAQ,aAAa;AACnB,iBAAWG,KAAQH;AACjB,cAAMG;AAER,YAAMJ;AAAA,IACR,GAAA;AAGF,QAAM,IAAI,UAAU,+BAA+B;AACrD;"}
@@ -0,0 +1,7 @@
1
+ import { AnyIterableInput, PromiseLikeValue } from './utils';
2
+ type ChunkFn<T> = (iterable: AnyIterableInput<PromiseLikeValue<T>>) => AsyncIterableIterator<T[]> | IterableIterator<T[]>;
3
+ declare function chunk<T>(size: number): ChunkFn<T>;
4
+ declare function chunk<T>(size: number, iterable: Iterable<T>): IterableIterator<T[]>;
5
+ declare function chunk<T>(size: number, iterable: AnyIterableInput<PromiseLikeValue<T>>): AsyncIterableIterator<T[]> | IterableIterator<T[]>;
6
+ export default chunk;
7
+ //# sourceMappingURL=chunk.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk.d.ts","sourceRoot":"","sources":["../../src/stream/chunk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AA4ClE,KAAK,OAAO,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,KAAK,qBAAqB,CAAC,CAAC,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC;AAE1H,iBAAS,KAAK,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AAC5C,iBAAS,KAAK,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC;AAC9E,iBAAS,KAAK,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,GAAG,qBAAqB,CAAC,CAAC,EAAE,CAAC,GAAG,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC;AAyBrI,eAAe,KAAK,CAAC"}
@@ -0,0 +1,37 @@
1
+ import { isPromiseLike as f, isAsyncIterable as u, awaitValue as c, isIterable as s } from "./utils.mjs";
2
+ import h from "./toAsync.mjs";
3
+ const a = function* (o, t) {
4
+ const i = Math.floor(o);
5
+ if (!Number.isFinite(i) || i <= 0)
6
+ return;
7
+ let n = [];
8
+ for (const e of t)
9
+ n.push(e), n.length >= i && (yield n, n = []);
10
+ n.length > 0 && (yield n);
11
+ }, r = async function* (o, t) {
12
+ const i = Math.floor(o);
13
+ if (!Number.isFinite(i) || i <= 0)
14
+ return;
15
+ let n = [];
16
+ for await (const e of t)
17
+ n.push(e), n.length >= i && (yield n, n = []);
18
+ n.length > 0 && (yield n);
19
+ };
20
+ function l(o, t) {
21
+ if (t === void 0)
22
+ return (i) => l(o, i);
23
+ if (f(t))
24
+ return r(o, h(t));
25
+ if (u(t))
26
+ return r(o, (async function* () {
27
+ for await (const i of t)
28
+ yield await c(i);
29
+ })());
30
+ if (s(t))
31
+ return a(o, t);
32
+ throw new TypeError("chunk: input is not iterable");
33
+ }
34
+ export {
35
+ l as default
36
+ };
37
+ //# sourceMappingURL=chunk.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk.mjs","sources":["../../src/stream/chunk.ts"],"sourcesContent":["import type { AnyIterableInput, PromiseLikeValue } from './utils';\nimport { awaitValue, isAsyncIterable, isIterable, isPromiseLike } from './utils';\nimport toAsync from './toAsync';\n\nconst chunkIterable = function* <T>(size: number, iterable: Iterable<T>): IterableIterator<T[]> {\n const chunkSize = Math.floor(size);\n if (!Number.isFinite(chunkSize) || chunkSize <= 0) {\n return;\n }\n\n let buffer: T[] = [];\n for (const item of iterable) {\n buffer.push(item);\n if (buffer.length >= chunkSize) {\n yield buffer;\n buffer = [];\n }\n }\n\n if (buffer.length > 0) {\n yield buffer;\n }\n};\n\nconst chunkAsyncIterable = async function* <T>(size: number, iterable: AsyncIterable<T>): AsyncIterableIterator<T[]> {\n const chunkSize = Math.floor(size);\n if (!Number.isFinite(chunkSize) || chunkSize <= 0) {\n return;\n }\n\n let buffer: T[] = [];\n for await (const item of iterable) {\n buffer.push(item);\n if (buffer.length >= chunkSize) {\n yield buffer;\n buffer = [];\n }\n }\n\n if (buffer.length > 0) {\n yield buffer;\n }\n};\n\ntype ChunkFn<T> = (iterable: AnyIterableInput<PromiseLikeValue<T>>) => AsyncIterableIterator<T[]> | IterableIterator<T[]>;\n\nfunction chunk<T>(size: number): ChunkFn<T>;\nfunction chunk<T>(size: number, iterable: Iterable<T>): IterableIterator<T[]>;\nfunction chunk<T>(size: number, iterable: AnyIterableInput<PromiseLikeValue<T>>): AsyncIterableIterator<T[]> | IterableIterator<T[]>;\nfunction chunk<T>(size: number, iterable?: AnyIterableInput<PromiseLikeValue<T>>) {\n if (iterable === undefined) {\n return (nextIterable: AnyIterableInput<PromiseLikeValue<T>>) => chunk(size, nextIterable);\n }\n\n if (isPromiseLike(iterable)) {\n return chunkAsyncIterable(size, toAsync(iterable));\n }\n\n if (isAsyncIterable(iterable)) {\n return chunkAsyncIterable(size, (async function* () {\n for await (const item of iterable) {\n yield await awaitValue(item as PromiseLikeValue<T>);\n }\n })());\n }\n\n if (isIterable(iterable)) {\n return chunkIterable(size, iterable as Iterable<T>);\n }\n\n throw new TypeError('chunk: input is not iterable');\n}\n\nexport default chunk;\n"],"names":["chunkIterable","size","iterable","chunkSize","buffer","item","chunkAsyncIterable","chunk","nextIterable","isPromiseLike","toAsync","isAsyncIterable","awaitValue","isIterable"],"mappings":";;AAIA,MAAMA,IAAgB,WAAcC,GAAcC,GAA8C;AAC9F,QAAMC,IAAY,KAAK,MAAMF,CAAI;AACjC,MAAI,CAAC,OAAO,SAASE,CAAS,KAAKA,KAAa;AAC9C;AAGF,MAAIC,IAAc,CAAA;AAClB,aAAWC,KAAQH;AACjB,IAAAE,EAAO,KAAKC,CAAI,GACZD,EAAO,UAAUD,MACnB,MAAMC,GACNA,IAAS,CAAA;AAIb,EAAIA,EAAO,SAAS,MAClB,MAAMA;AAEV,GAEME,IAAqB,iBAAoBL,GAAcC,GAAwD;AACnH,QAAMC,IAAY,KAAK,MAAMF,CAAI;AACjC,MAAI,CAAC,OAAO,SAASE,CAAS,KAAKA,KAAa;AAC9C;AAGF,MAAIC,IAAc,CAAA;AAClB,mBAAiBC,KAAQH;AACvB,IAAAE,EAAO,KAAKC,CAAI,GACZD,EAAO,UAAUD,MACnB,MAAMC,GACNA,IAAS,CAAA;AAIb,EAAIA,EAAO,SAAS,MAClB,MAAMA;AAEV;AAOA,SAASG,EAASN,GAAcC,GAAkD;AAChF,MAAIA,MAAa;AACf,WAAO,CAACM,MAAwDD,EAAMN,GAAMO,CAAY;AAG1F,MAAIC,EAAcP,CAAQ;AACxB,WAAOI,EAAmBL,GAAMS,EAAQR,CAAQ,CAAC;AAGnD,MAAIS,EAAgBT,CAAQ;AAC1B,WAAOI,EAAmBL,IAAO,mBAAmB;AAClD,uBAAiBI,KAAQH;AACvB,cAAM,MAAMU,EAAWP,CAA2B;AAAA,IAEtD,IAAI;AAGN,MAAIQ,EAAWX,CAAQ;AACrB,WAAOF,EAAcC,GAAMC,CAAuB;AAGpD,QAAM,IAAI,UAAU,8BAA8B;AACpD;"}
@@ -0,0 +1,8 @@
1
+ import { AnyIterableInput, PromiseLikeValue } from './utils';
2
+ /** concat - lazily concatenate two iterables */
3
+ declare function concat<T>(other: Iterable<T>): (iterable: Iterable<T>) => IterableIterator<T>;
4
+ declare function concat<T>(other: AnyIterableInput<PromiseLikeValue<T>>): (iterable: AnyIterableInput<PromiseLikeValue<T>>) => AsyncIterableIterator<T>;
5
+ declare function concat<T>(other: Iterable<T>, iterable: Iterable<T>): IterableIterator<T>;
6
+ declare function concat<T>(other: AnyIterableInput<PromiseLikeValue<T>>, iterable: AnyIterableInput<PromiseLikeValue<T>>): AsyncIterableIterator<T>;
7
+ export default concat;
8
+ //# sourceMappingURL=concat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"concat.d.ts","sourceRoot":"","sources":["../../src/stream/concat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAIlE,gDAAgD;AAChD,iBAAS,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC,CAAC,CAAC,CAAC;AACvF,iBAAS,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,KAAK,qBAAqB,CAAC,CAAC,CAAC,CAAC;AAChJ,iBAAS,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC;AACnF,iBAAS,MAAM,CAAC,CAAC,EACf,KAAK,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAC5C,QAAQ,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,GAC9C,qBAAqB,CAAC,CAAC,CAAC,CAAC;AA+B5B,eAAe,MAAM,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { isAsyncInput as i, isIterable as f } from "./utils.mjs";
2
+ import c from "./toAsync.mjs";
3
+ function r(n, t) {
4
+ if (t === void 0)
5
+ return (o) => r(n, o);
6
+ if (i(n) || i(t))
7
+ return (async function* () {
8
+ for await (const o of c(t))
9
+ yield o;
10
+ for await (const o of c(n))
11
+ yield o;
12
+ })();
13
+ if (f(t) && f(n))
14
+ return (function* () {
15
+ for (const o of t)
16
+ yield o;
17
+ for (const o of n)
18
+ yield o;
19
+ })();
20
+ throw new TypeError("concat: input is not iterable");
21
+ }
22
+ export {
23
+ r as default
24
+ };
25
+ //# sourceMappingURL=concat.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"concat.mjs","sources":["../../src/stream/concat.ts"],"sourcesContent":["import type { AnyIterableInput, PromiseLikeValue } from './utils';\nimport { isAsyncInput, isIterable } from './utils';\nimport toAsync from './toAsync';\n\n/** concat - lazily concatenate two iterables */\nfunction concat<T>(other: Iterable<T>): (iterable: Iterable<T>) => IterableIterator<T>;\nfunction concat<T>(other: AnyIterableInput<PromiseLikeValue<T>>): (iterable: AnyIterableInput<PromiseLikeValue<T>>) => AsyncIterableIterator<T>;\nfunction concat<T>(other: Iterable<T>, iterable: Iterable<T>): IterableIterator<T>;\nfunction concat<T>(\n other: AnyIterableInput<PromiseLikeValue<T>>,\n iterable: AnyIterableInput<PromiseLikeValue<T>>\n): AsyncIterableIterator<T>;\nfunction concat<T>(other: AnyIterableInput<PromiseLikeValue<T>>, iterable?: AnyIterableInput<PromiseLikeValue<T>>): any {\n if (iterable === undefined) {\n return (next: AnyIterableInput<PromiseLikeValue<T>>) => concat(other, next);\n }\n\n if (isAsyncInput(other) || isAsyncInput(iterable)) {\n return (async function* () {\n for await (const item of toAsync(iterable)) {\n yield item as T;\n }\n for await (const item of toAsync(other)) {\n yield item as T;\n }\n })();\n }\n\n if (isIterable(iterable) && isIterable(other)) {\n return (function* () {\n for (const item of iterable) {\n yield item as T;\n }\n for (const item of other as Iterable<T>) {\n yield item as T;\n }\n })();\n }\n\n throw new TypeError('concat: input is not iterable');\n}\n\nexport default concat;\n"],"names":["concat","other","iterable","next","isAsyncInput","item","toAsync","isIterable"],"mappings":";;AAYA,SAASA,EAAUC,GAA8CC,GAAuD;AACtH,MAAIA,MAAa;AACf,WAAO,CAACC,MAAgDH,EAAOC,GAAOE,CAAI;AAG5E,MAAIC,EAAaH,CAAK,KAAKG,EAAaF,CAAQ;AAC9C,YAAQ,mBAAmB;AACzB,uBAAiBG,KAAQC,EAAQJ,CAAQ;AACvC,cAAMG;AAER,uBAAiBA,KAAQC,EAAQL,CAAK;AACpC,cAAMI;AAAA,IAEV,GAAA;AAGF,MAAIE,EAAWL,CAAQ,KAAKK,EAAWN,CAAK;AAC1C,YAAQ,aAAa;AACnB,iBAAWI,KAAQH;AACjB,cAAMG;AAER,iBAAWA,KAAQJ;AACjB,cAAMI;AAAA,IAEV,GAAA;AAGF,QAAM,IAAI,UAAU,+BAA+B;AACrD;"}
@@ -0,0 +1,8 @@
1
+ import { AnyIterableInput, PromiseLikeValue } from './utils';
2
+ /** drop - lazily skip first n values */
3
+ declare function drop<T>(count: number): (iterable: Iterable<T>) => IterableIterator<T>;
4
+ declare function drop<T>(count: number): (iterable: AnyIterableInput<PromiseLikeValue<T>>) => AsyncIterableIterator<T>;
5
+ declare function drop<T>(count: number, iterable: Iterable<T>): IterableIterator<T>;
6
+ declare function drop<T>(count: number, iterable: AnyIterableInput<PromiseLikeValue<T>>): AsyncIterableIterator<T>;
7
+ export default drop;
8
+ //# sourceMappingURL=drop.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drop.d.ts","sourceRoot":"","sources":["../../src/stream/drop.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAIlE,wCAAwC;AACxC,iBAAS,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC,CAAC,CAAC,CAAC;AAChF,iBAAS,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC,QAAQ,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,KAAK,qBAAqB,CAAC,CAAC,CAAC,CAAC;AAC/G,iBAAS,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC;AAC5E,iBAAS,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAAC;AAkD3G,eAAe,IAAI,CAAC"}
@@ -0,0 +1,42 @@
1
+ import { isAsyncInput as r, isIterable as c } from "./utils.mjs";
2
+ import s from "./toAsync.mjs";
3
+ function e(f, i) {
4
+ if (i === void 0)
5
+ return (o) => e(f, o);
6
+ const n = Math.floor(f);
7
+ if (!Number.isFinite(n) || n <= 0)
8
+ return r(i) ? (async function* () {
9
+ for await (const o of s(i))
10
+ yield o;
11
+ })() : (function* () {
12
+ for (const o of i)
13
+ yield o;
14
+ })();
15
+ if (r(i))
16
+ return (async function* () {
17
+ let o = 0;
18
+ for await (const t of s(i)) {
19
+ if (o < n) {
20
+ o += 1;
21
+ continue;
22
+ }
23
+ yield t;
24
+ }
25
+ })();
26
+ if (c(i))
27
+ return (function* () {
28
+ let o = 0;
29
+ for (const t of i) {
30
+ if (o < n) {
31
+ o += 1;
32
+ continue;
33
+ }
34
+ yield t;
35
+ }
36
+ })();
37
+ throw new TypeError("drop: input is not iterable");
38
+ }
39
+ export {
40
+ e as default
41
+ };
42
+ //# sourceMappingURL=drop.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drop.mjs","sources":["../../src/stream/drop.ts"],"sourcesContent":["import type { AnyIterableInput, PromiseLikeValue } from './utils';\nimport { isAsyncInput, isIterable } from './utils';\nimport toAsync from './toAsync';\n\n/** drop - lazily skip first n values */\nfunction drop<T>(count: number): (iterable: Iterable<T>) => IterableIterator<T>;\nfunction drop<T>(count: number): (iterable: AnyIterableInput<PromiseLikeValue<T>>) => AsyncIterableIterator<T>;\nfunction drop<T>(count: number, iterable: Iterable<T>): IterableIterator<T>;\nfunction drop<T>(count: number, iterable: AnyIterableInput<PromiseLikeValue<T>>): AsyncIterableIterator<T>;\nfunction drop<T>(count: number, iterable?: AnyIterableInput<PromiseLikeValue<T>>): any {\n if (iterable === undefined) {\n return (next: AnyIterableInput<PromiseLikeValue<T>>) => drop(count, next);\n }\n\n const limit = Math.floor(count);\n if (!Number.isFinite(limit) || limit <= 0) {\n return isAsyncInput(iterable)\n ? (async function* () {\n for await (const item of toAsync(iterable)) {\n yield item as T;\n }\n })()\n : (function* () {\n for (const item of iterable as Iterable<T>) {\n yield item as T;\n }\n })();\n }\n\n if (isAsyncInput(iterable)) {\n return (async function* () {\n let skipped = 0;\n for await (const item of toAsync(iterable)) {\n if (skipped < limit) {\n skipped += 1;\n continue;\n }\n yield item as T;\n }\n })();\n }\n\n if (isIterable(iterable)) {\n return (function* () {\n let skipped = 0;\n for (const item of iterable) {\n if (skipped < limit) {\n skipped += 1;\n continue;\n }\n yield item as T;\n }\n })();\n }\n\n throw new TypeError('drop: input is not iterable');\n}\n\nexport default drop;\n"],"names":["drop","count","iterable","next","limit","isAsyncInput","item","toAsync","skipped","isIterable"],"mappings":";;AASA,SAASA,EAAQC,GAAeC,GAAuD;AACrF,MAAIA,MAAa;AACf,WAAO,CAACC,MAAgDH,EAAKC,GAAOE,CAAI;AAG1E,QAAMC,IAAQ,KAAK,MAAMH,CAAK;AAC9B,MAAI,CAAC,OAAO,SAASG,CAAK,KAAKA,KAAS;AACtC,WAAOC,EAAaH,CAAQ,KACvB,mBAAmB;AAClB,uBAAiBI,KAAQC,EAAQL,CAAQ;AACvC,cAAMI;AAAA,IAEV,GAAA,KACC,aAAa;AACZ,iBAAWA,KAAQJ;AACjB,cAAMI;AAAA,IAEV,GAAA;AAGN,MAAID,EAAaH,CAAQ;AACvB,YAAQ,mBAAmB;AACzB,UAAIM,IAAU;AACd,uBAAiBF,KAAQC,EAAQL,CAAQ,GAAG;AAC1C,YAAIM,IAAUJ,GAAO;AACnB,UAAAI,KAAW;AACX;AAAA,QACF;AACA,cAAMF;AAAA,MACR;AAAA,IACF,GAAA;AAGF,MAAIG,EAAWP,CAAQ;AACrB,YAAQ,aAAa;AACnB,UAAIM,IAAU;AACd,iBAAWF,KAAQJ,GAAU;AAC3B,YAAIM,IAAUJ,GAAO;AACnB,UAAAI,KAAW;AACX;AAAA,QACF;AACA,cAAMF;AAAA,MACR;AAAA,IACF,GAAA;AAGF,QAAM,IAAI,UAAU,6BAA6B;AACnD;"}
@@ -0,0 +1,8 @@
1
+ import { AnyIterableInput, PromiseLikeValue } from './utils';
2
+ /** dropWhile - lazily drop values while predicate holds */
3
+ declare function dropWhile<T>(predicate: (value: T) => boolean): (iterable: Iterable<T>) => IterableIterator<T>;
4
+ declare function dropWhile<T>(predicate: (value: T) => boolean | Promise<boolean>): (iterable: AnyIterableInput<PromiseLikeValue<T>>) => AsyncIterableIterator<T>;
5
+ declare function dropWhile<T>(predicate: (value: T) => boolean, iterable: Iterable<T>): IterableIterator<T>;
6
+ declare function dropWhile<T>(predicate: (value: T) => boolean | Promise<boolean>, iterable: AnyIterableInput<PromiseLikeValue<T>>): AsyncIterableIterator<T>;
7
+ export default dropWhile;
8
+ //# sourceMappingURL=dropWhile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dropWhile.d.ts","sourceRoot":"","sources":["../../src/stream/dropWhile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAIlE,2DAA2D;AAC3D,iBAAS,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC,CAAC,CAAC,CAAC;AACxG,iBAAS,SAAS,CAAC,CAAC,EAClB,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,GAClD,CAAC,QAAQ,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,KAAK,qBAAqB,CAAC,CAAC,CAAC,CAAC;AACjF,iBAAS,SAAS,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC;AACpG,iBAAS,SAAS,CAAC,CAAC,EAClB,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,EACnD,QAAQ,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,GAC9C,qBAAqB,CAAC,CAAC,CAAC,CAAC;AAqC5B,eAAe,SAAS,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { isAsyncInput as f, isIterable as r } from "./utils.mjs";
2
+ import e from "./toAsync.mjs";
3
+ function s(n, i) {
4
+ if (i === void 0)
5
+ return (o) => s(n, o);
6
+ if (f(i))
7
+ return (async function* () {
8
+ let o = !0;
9
+ for await (const t of e(i))
10
+ o && !await n(t) && (o = !1), o || (yield t);
11
+ })();
12
+ if (r(i))
13
+ return (function* () {
14
+ let o = !0;
15
+ for (const t of i)
16
+ o && !n(t) && (o = !1), o || (yield t);
17
+ })();
18
+ throw new TypeError("dropWhile: input is not iterable");
19
+ }
20
+ export {
21
+ s as default
22
+ };
23
+ //# sourceMappingURL=dropWhile.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dropWhile.mjs","sources":["../../src/stream/dropWhile.ts"],"sourcesContent":["import type { AnyIterableInput, PromiseLikeValue } from './utils';\nimport { isAsyncInput, isIterable } from './utils';\nimport toAsync from './toAsync';\n\n/** dropWhile - lazily drop values while predicate holds */\nfunction dropWhile<T>(predicate: (value: T) => boolean): (iterable: Iterable<T>) => IterableIterator<T>;\nfunction dropWhile<T>(\n predicate: (value: T) => boolean | Promise<boolean>\n): (iterable: AnyIterableInput<PromiseLikeValue<T>>) => AsyncIterableIterator<T>;\nfunction dropWhile<T>(predicate: (value: T) => boolean, iterable: Iterable<T>): IterableIterator<T>;\nfunction dropWhile<T>(\n predicate: (value: T) => boolean | Promise<boolean>,\n iterable: AnyIterableInput<PromiseLikeValue<T>>\n): AsyncIterableIterator<T>;\nfunction dropWhile<T>(predicate: (value: T) => boolean | Promise<boolean>, iterable?: AnyIterableInput<PromiseLikeValue<T>>): any {\n if (iterable === undefined) {\n return (next: AnyIterableInput<PromiseLikeValue<T>>) => dropWhile(predicate, next);\n }\n\n if (isAsyncInput(iterable)) {\n return (async function* () {\n let dropping = true;\n for await (const item of toAsync(iterable)) {\n if (dropping && !(await predicate(item as T))) {\n dropping = false;\n }\n if (!dropping) {\n yield item as T;\n }\n }\n })();\n }\n\n if (isIterable(iterable)) {\n return (function* () {\n let dropping = true;\n for (const item of iterable) {\n if (dropping && !predicate(item as T)) {\n dropping = false;\n }\n if (!dropping) {\n yield item as T;\n }\n }\n })();\n }\n\n throw new TypeError('dropWhile: input is not iterable');\n}\n\nexport default dropWhile;\n"],"names":["dropWhile","predicate","iterable","next","isAsyncInput","dropping","item","toAsync","isIterable"],"mappings":";;AAcA,SAASA,EAAaC,GAAqDC,GAAuD;AAChI,MAAIA,MAAa;AACf,WAAO,CAACC,MAAgDH,EAAUC,GAAWE,CAAI;AAGnF,MAAIC,EAAaF,CAAQ;AACvB,YAAQ,mBAAmB;AACzB,UAAIG,IAAW;AACf,uBAAiBC,KAAQC,EAAQL,CAAQ;AACvC,QAAIG,KAAY,CAAE,MAAMJ,EAAUK,CAAS,MACzCD,IAAW,KAERA,MACH,MAAMC;AAAA,IAGZ,GAAA;AAGF,MAAIE,EAAWN,CAAQ;AACrB,YAAQ,aAAa;AACnB,UAAIG,IAAW;AACf,iBAAWC,KAAQJ;AACjB,QAAIG,KAAY,CAACJ,EAAUK,CAAS,MAClCD,IAAW,KAERA,MACH,MAAMC;AAAA,IAGZ,GAAA;AAGF,QAAM,IAAI,UAAU,kCAAkC;AACxD;"}
@@ -0,0 +1,8 @@
1
+ import { AnyIterableInput, PromiseLikeValue } from './utils';
2
+ /** every - check all values match */
3
+ declare function every<T>(predicate: (value: T) => boolean): (iterable: Iterable<T>) => boolean;
4
+ declare function every<T>(predicate: (value: T) => boolean | Promise<boolean>): (iterable: AnyIterableInput<PromiseLikeValue<T>>) => Promise<boolean>;
5
+ declare function every<T>(predicate: (value: T) => boolean, iterable: Iterable<T>): boolean;
6
+ declare function every<T>(predicate: (value: T) => boolean | Promise<boolean>, iterable: AnyIterableInput<PromiseLikeValue<T>>): Promise<boolean>;
7
+ export default every;
8
+ //# sourceMappingURL=every.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"every.d.ts","sourceRoot":"","sources":["../../src/stream/every.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAIlE,qCAAqC;AACrC,iBAAS,KAAK,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC;AACxF,iBAAS,KAAK,CAAC,CAAC,EACd,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,GAClD,CAAC,QAAQ,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;AACzE,iBAAS,KAAK,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC;AACpF,iBAAS,KAAK,CAAC,CAAC,EACd,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,EACnD,QAAQ,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,GAC9C,OAAO,CAAC,OAAO,CAAC,CAAC;AAgCpB,eAAe,KAAK,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { isAsyncInput as o, isIterable as f } from "./utils.mjs";
2
+ import e from "./toAsync.mjs";
3
+ function i(n, r) {
4
+ if (r === void 0)
5
+ return (t) => i(n, t);
6
+ if (o(r))
7
+ return (async () => {
8
+ for await (const t of e(r))
9
+ if (!await n(t))
10
+ return !1;
11
+ return !0;
12
+ })();
13
+ if (f(r)) {
14
+ for (const t of r)
15
+ if (!n(t))
16
+ return !1;
17
+ return !0;
18
+ }
19
+ throw new TypeError("every: input is not iterable");
20
+ }
21
+ export {
22
+ i as default
23
+ };
24
+ //# sourceMappingURL=every.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"every.mjs","sources":["../../src/stream/every.ts"],"sourcesContent":["import type { AnyIterableInput, PromiseLikeValue } from './utils';\nimport { isAsyncInput, isIterable } from './utils';\nimport toAsync from './toAsync';\n\n/** every - check all values match */\nfunction every<T>(predicate: (value: T) => boolean): (iterable: Iterable<T>) => boolean;\nfunction every<T>(\n predicate: (value: T) => boolean | Promise<boolean>\n): (iterable: AnyIterableInput<PromiseLikeValue<T>>) => Promise<boolean>;\nfunction every<T>(predicate: (value: T) => boolean, iterable: Iterable<T>): boolean;\nfunction every<T>(\n predicate: (value: T) => boolean | Promise<boolean>,\n iterable: AnyIterableInput<PromiseLikeValue<T>>\n): Promise<boolean>;\nfunction every<T>(\n predicate: (value: T) => boolean | Promise<boolean>,\n iterable?: AnyIterableInput<PromiseLikeValue<T>>\n): any {\n if (iterable === undefined) {\n return (next: AnyIterableInput<PromiseLikeValue<T>>) => every(predicate, next);\n }\n\n if (isAsyncInput(iterable)) {\n return (async () => {\n for await (const item of toAsync(iterable)) {\n if (!(await predicate(item as T))) {\n return false;\n }\n }\n return true;\n })();\n }\n\n if (isIterable(iterable)) {\n for (const item of iterable) {\n if (!predicate(item as T)) {\n return false;\n }\n }\n return true;\n }\n\n throw new TypeError('every: input is not iterable');\n}\n\nexport default every;\n"],"names":["every","predicate","iterable","next","isAsyncInput","item","toAsync","isIterable"],"mappings":";;AAcA,SAASA,EACPC,GACAC,GACK;AACL,MAAIA,MAAa;AACf,WAAO,CAACC,MAAgDH,EAAMC,GAAWE,CAAI;AAG/E,MAAIC,EAAaF,CAAQ;AACvB,YAAQ,YAAY;AAClB,uBAAiBG,KAAQC,EAAQJ,CAAQ;AACvC,YAAI,CAAE,MAAMD,EAAUI,CAAS;AAC7B,iBAAO;AAGX,aAAO;AAAA,IACT,GAAA;AAGF,MAAIE,EAAWL,CAAQ,GAAG;AACxB,eAAWG,KAAQH;AACjB,UAAI,CAACD,EAAUI,CAAS;AACtB,eAAO;AAGX,WAAO;AAAA,EACT;AAEA,QAAM,IAAI,UAAU,8BAA8B;AACpD;"}
@@ -0,0 +1,8 @@
1
+ import { AnyIterableInput, PromiseLikeValue } from './utils';
2
+ /** filter - lazy filter over iterables */
3
+ declare function filter<T>(predicate: (value: T) => boolean): (iterable: Iterable<T>) => IterableIterator<T>;
4
+ declare function filter<T>(predicate: (value: T) => boolean | Promise<boolean>): (iterable: AnyIterableInput<PromiseLikeValue<T>>) => AsyncIterableIterator<T>;
5
+ declare function filter<T>(predicate: (value: T) => boolean, iterable: Iterable<T>): IterableIterator<T>;
6
+ declare function filter<T>(predicate: (value: T) => boolean | Promise<boolean>, iterable: AnyIterableInput<PromiseLikeValue<T>>): AsyncIterableIterator<T>;
7
+ export default filter;
8
+ //# sourceMappingURL=filter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../src/stream/filter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAIlE,0CAA0C;AAC1C,iBAAS,MAAM,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC,CAAC,CAAC,CAAC;AACrG,iBAAS,MAAM,CAAC,CAAC,EACf,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,GAClD,CAAC,QAAQ,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,KAAK,qBAAqB,CAAC,CAAC,CAAC,CAAC;AACjF,iBAAS,MAAM,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC;AACjG,iBAAS,MAAM,CAAC,CAAC,EACf,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,EACnD,QAAQ,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,GAC9C,qBAAqB,CAAC,CAAC,CAAC,CAAC;AAgC5B,eAAe,MAAM,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { isAsyncInput as n, isIterable as f } from "./utils.mjs";
2
+ import r from "./toAsync.mjs";
3
+ function s(i, t) {
4
+ if (t === void 0)
5
+ return (o) => s(i, o);
6
+ if (n(t))
7
+ return (async function* () {
8
+ for await (const o of r(t))
9
+ await i(o) && (yield o);
10
+ })();
11
+ if (f(t))
12
+ return (function* () {
13
+ for (const o of t)
14
+ i(o) && (yield o);
15
+ })();
16
+ throw new TypeError("filter: input is not iterable");
17
+ }
18
+ export {
19
+ s as default
20
+ };
21
+ //# sourceMappingURL=filter.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter.mjs","sources":["../../src/stream/filter.ts"],"sourcesContent":["import type { AnyIterableInput, PromiseLikeValue } from './utils';\nimport { isAsyncInput, isIterable } from './utils';\nimport toAsync from './toAsync';\n\n/** filter - lazy filter over iterables */\nfunction filter<T>(predicate: (value: T) => boolean): (iterable: Iterable<T>) => IterableIterator<T>;\nfunction filter<T>(\n predicate: (value: T) => boolean | Promise<boolean>\n): (iterable: AnyIterableInput<PromiseLikeValue<T>>) => AsyncIterableIterator<T>;\nfunction filter<T>(predicate: (value: T) => boolean, iterable: Iterable<T>): IterableIterator<T>;\nfunction filter<T>(\n predicate: (value: T) => boolean | Promise<boolean>,\n iterable: AnyIterableInput<PromiseLikeValue<T>>\n): AsyncIterableIterator<T>;\nfunction filter<T>(\n predicate: (value: T) => boolean | Promise<boolean>,\n iterable?: AnyIterableInput<PromiseLikeValue<T>>\n): any {\n if (iterable === undefined) {\n return (next: AnyIterableInput<PromiseLikeValue<T>>) => filter(predicate, next);\n }\n\n if (isAsyncInput(iterable)) {\n return (async function* () {\n for await (const item of toAsync(iterable)) {\n if (await predicate(item as T)) {\n yield item as T;\n }\n }\n })();\n }\n\n if (isIterable(iterable)) {\n return (function* () {\n for (const item of iterable) {\n if (predicate(item as T)) {\n yield item as T;\n }\n }\n })();\n }\n\n throw new TypeError('filter: input is not iterable');\n}\n\nexport default filter;\n"],"names":["filter","predicate","iterable","next","isAsyncInput","item","toAsync","isIterable"],"mappings":";;AAcA,SAASA,EACPC,GACAC,GACK;AACL,MAAIA,MAAa;AACf,WAAO,CAACC,MAAgDH,EAAOC,GAAWE,CAAI;AAGhF,MAAIC,EAAaF,CAAQ;AACvB,YAAQ,mBAAmB;AACzB,uBAAiBG,KAAQC,EAAQJ,CAAQ;AACvC,QAAI,MAAMD,EAAUI,CAAS,MAC3B,MAAMA;AAAA,IAGZ,GAAA;AAGF,MAAIE,EAAWL,CAAQ;AACrB,YAAQ,aAAa;AACnB,iBAAWG,KAAQH;AACjB,QAAID,EAAUI,CAAS,MACrB,MAAMA;AAAA,IAGZ,GAAA;AAGF,QAAM,IAAI,UAAU,+BAA+B;AACrD;"}
@@ -0,0 +1,8 @@
1
+ import { AnyIterableInput, PromiseLikeValue } from './utils';
2
+ /** find - find first matching value */
3
+ declare function find<T>(predicate: (value: T) => boolean): (iterable: Iterable<T>) => T | undefined;
4
+ declare function find<T>(predicate: (value: T) => boolean | Promise<boolean>): (iterable: AnyIterableInput<PromiseLikeValue<T>>) => Promise<T | undefined>;
5
+ declare function find<T>(predicate: (value: T) => boolean, iterable: Iterable<T>): T | undefined;
6
+ declare function find<T>(predicate: (value: T) => boolean | Promise<boolean>, iterable: AnyIterableInput<PromiseLikeValue<T>>): Promise<T | undefined>;
7
+ export default find;
8
+ //# sourceMappingURL=find.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find.d.ts","sourceRoot":"","sources":["../../src/stream/find.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAIlE,uCAAuC;AACvC,iBAAS,IAAI,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC;AAC7F,iBAAS,IAAI,CAAC,CAAC,EACb,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,GAClD,CAAC,QAAQ,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;AAC/E,iBAAS,IAAI,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;AACzF,iBAAS,IAAI,CAAC,CAAC,EACb,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,EACnD,QAAQ,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,GAC9C,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;AA6B1B,eAAe,IAAI,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { isAsyncInput as t, isIterable as i } from "./utils.mjs";
2
+ import f from "./toAsync.mjs";
3
+ function u(r, o) {
4
+ if (o === void 0)
5
+ return (n) => u(r, n);
6
+ if (t(o))
7
+ return (async () => {
8
+ for await (const n of f(o))
9
+ if (await r(n))
10
+ return n;
11
+ })();
12
+ if (i(o)) {
13
+ for (const n of o)
14
+ if (r(n))
15
+ return n;
16
+ return;
17
+ }
18
+ throw new TypeError("find: input is not iterable");
19
+ }
20
+ export {
21
+ u as default
22
+ };
23
+ //# sourceMappingURL=find.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find.mjs","sources":["../../src/stream/find.ts"],"sourcesContent":["import type { AnyIterableInput, PromiseLikeValue } from './utils';\nimport { isAsyncInput, isIterable } from './utils';\nimport toAsync from './toAsync';\n\n/** find - find first matching value */\nfunction find<T>(predicate: (value: T) => boolean): (iterable: Iterable<T>) => T | undefined;\nfunction find<T>(\n predicate: (value: T) => boolean | Promise<boolean>\n): (iterable: AnyIterableInput<PromiseLikeValue<T>>) => Promise<T | undefined>;\nfunction find<T>(predicate: (value: T) => boolean, iterable: Iterable<T>): T | undefined;\nfunction find<T>(\n predicate: (value: T) => boolean | Promise<boolean>,\n iterable: AnyIterableInput<PromiseLikeValue<T>>\n): Promise<T | undefined>;\nfunction find<T>(predicate: (value: T) => boolean | Promise<boolean>, iterable?: AnyIterableInput<PromiseLikeValue<T>>) {\n if (iterable === undefined) {\n return (next: AnyIterableInput<PromiseLikeValue<T>>) => find(predicate, next);\n }\n\n if (isAsyncInput(iterable)) {\n return (async () => {\n for await (const item of toAsync(iterable)) {\n if (await predicate(item as T)) {\n return item as T;\n }\n }\n return undefined;\n })();\n }\n\n if (isIterable(iterable)) {\n for (const item of iterable) {\n if (predicate(item as T)) {\n return item as T;\n }\n }\n return undefined;\n }\n\n throw new TypeError('find: input is not iterable');\n}\n\nexport default find;\n"],"names":["find","predicate","iterable","next","isAsyncInput","item","toAsync","isIterable"],"mappings":";;AAcA,SAASA,EAAQC,GAAqDC,GAAkD;AACtH,MAAIA,MAAa;AACf,WAAO,CAACC,MAAgDH,EAAKC,GAAWE,CAAI;AAG9E,MAAIC,EAAaF,CAAQ;AACvB,YAAQ,YAAY;AAClB,uBAAiBG,KAAQC,EAAQJ,CAAQ;AACvC,YAAI,MAAMD,EAAUI,CAAS;AAC3B,iBAAOA;AAAA,IAIb,GAAA;AAGF,MAAIE,EAAWL,CAAQ,GAAG;AACxB,eAAWG,KAAQH;AACjB,UAAID,EAAUI,CAAS;AACrB,eAAOA;AAGX;AAAA,EACF;AAEA,QAAM,IAAI,UAAU,6BAA6B;AACnD;"}
@@ -0,0 +1,8 @@
1
+ import { AnyIterableInput, PromiseLikeValue } from './utils';
2
+ /** flatMap - lazy map + flatten */
3
+ declare function flatMap<T, R>(fn: (value: T) => Iterable<R>): (iterable: Iterable<T>) => IterableIterator<R>;
4
+ declare function flatMap<T, R>(fn: (value: T) => Iterable<R> | Promise<Iterable<R>>): (iterable: AnyIterableInput<PromiseLikeValue<T>>) => AsyncIterableIterator<R>;
5
+ declare function flatMap<T, R>(fn: (value: T) => Iterable<R>, iterable: Iterable<T>): IterableIterator<R>;
6
+ declare function flatMap<T, R>(fn: (value: T) => Iterable<R> | Promise<Iterable<R>>, iterable: AnyIterableInput<PromiseLikeValue<T>>): AsyncIterableIterator<R>;
7
+ export default flatMap;
8
+ //# sourceMappingURL=flatMap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flatMap.d.ts","sourceRoot":"","sources":["../../src/stream/flatMap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAIlE,mCAAmC;AACnC,iBAAS,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,gBAAgB,CAAC,CAAC,CAAC,CAAC;AACtG,iBAAS,OAAO,CAAC,CAAC,EAAE,CAAC,EACnB,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,GACnD,CAAC,QAAQ,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,KAAK,qBAAqB,CAAC,CAAC,CAAC,CAAC;AACjF,iBAAS,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC;AAClG,iBAAS,OAAO,CAAC,CAAC,EAAE,CAAC,EACnB,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EACpD,QAAQ,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,GAC9C,qBAAqB,CAAC,CAAC,CAAC,CAAC;AAkC5B,eAAe,OAAO,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { isAsyncInput as f, isIterable as s } from "./utils.mjs";
2
+ import c from "./toAsync.mjs";
3
+ function p(n, o) {
4
+ if (o === void 0)
5
+ return (t) => p(n, t);
6
+ if (f(o))
7
+ return (async function* () {
8
+ for await (const t of c(o)) {
9
+ const r = await n(t);
10
+ for (const i of r)
11
+ yield i;
12
+ }
13
+ })();
14
+ if (s(o))
15
+ return (function* () {
16
+ for (const t of o) {
17
+ const r = n(t);
18
+ for (const i of r)
19
+ yield i;
20
+ }
21
+ })();
22
+ throw new TypeError("flatMap: input is not iterable");
23
+ }
24
+ export {
25
+ p as default
26
+ };
27
+ //# sourceMappingURL=flatMap.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flatMap.mjs","sources":["../../src/stream/flatMap.ts"],"sourcesContent":["import type { AnyIterableInput, PromiseLikeValue } from './utils';\nimport { isAsyncInput, isIterable } from './utils';\nimport toAsync from './toAsync';\n\n/** flatMap - lazy map + flatten */\nfunction flatMap<T, R>(fn: (value: T) => Iterable<R>): (iterable: Iterable<T>) => IterableIterator<R>;\nfunction flatMap<T, R>(\n fn: (value: T) => Iterable<R> | Promise<Iterable<R>>\n): (iterable: AnyIterableInput<PromiseLikeValue<T>>) => AsyncIterableIterator<R>;\nfunction flatMap<T, R>(fn: (value: T) => Iterable<R>, iterable: Iterable<T>): IterableIterator<R>;\nfunction flatMap<T, R>(\n fn: (value: T) => Iterable<R> | Promise<Iterable<R>>,\n iterable: AnyIterableInput<PromiseLikeValue<T>>\n): AsyncIterableIterator<R>;\nfunction flatMap<T, R>(\n fn: (value: T) => Iterable<R> | Promise<Iterable<R>>,\n iterable?: AnyIterableInput<PromiseLikeValue<T>>\n): any {\n if (iterable === undefined) {\n return (next: AnyIterableInput<PromiseLikeValue<T>>) => flatMap(fn, next);\n }\n\n if (isAsyncInput(iterable)) {\n return (async function* () {\n for await (const item of toAsync(iterable)) {\n const mapped = await fn(item as T);\n for (const inner of mapped) {\n yield inner;\n }\n }\n })();\n }\n\n if (isIterable(iterable)) {\n return (function* () {\n for (const item of iterable) {\n const mapped = fn(item as T) as Iterable<R>;\n for (const inner of mapped) {\n yield inner;\n }\n }\n })();\n }\n\n throw new TypeError('flatMap: input is not iterable');\n}\n\nexport default flatMap;\n"],"names":["flatMap","fn","iterable","next","isAsyncInput","item","toAsync","mapped","inner","isIterable"],"mappings":";;AAcA,SAASA,EACPC,GACAC,GACK;AACL,MAAIA,MAAa;AACf,WAAO,CAACC,MAAgDH,EAAQC,GAAIE,CAAI;AAG1E,MAAIC,EAAaF,CAAQ;AACvB,YAAQ,mBAAmB;AACzB,uBAAiBG,KAAQC,EAAQJ,CAAQ,GAAG;AAC1C,cAAMK,IAAS,MAAMN,EAAGI,CAAS;AACjC,mBAAWG,KAASD;AAClB,gBAAMC;AAAA,MAEV;AAAA,IACF,GAAA;AAGF,MAAIC,EAAWP,CAAQ;AACrB,YAAQ,aAAa;AACnB,iBAAWG,KAAQH,GAAU;AAC3B,cAAMK,IAASN,EAAGI,CAAS;AAC3B,mBAAWG,KAASD;AAClB,gBAAMC;AAAA,MAEV;AAAA,IACF,GAAA;AAGF,QAAM,IAAI,UAAU,gCAAgC;AACtD;"}
@@ -0,0 +1,6 @@
1
+ import { AnyIterableInput, PromiseLikeValue } from './utils';
2
+ /** flatten - lazily flatten iterable of iterables */
3
+ declare function flatten<T>(iterable: Iterable<Iterable<T>>): IterableIterator<T>;
4
+ declare function flatten<T>(iterable: AnyIterableInput<PromiseLikeValue<Iterable<T>>>): AsyncIterableIterator<T>;
5
+ export default flatten;
6
+ //# sourceMappingURL=flatten.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flatten.d.ts","sourceRoot":"","sources":["../../src/stream/flatten.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAIlE,qDAAqD;AACrD,iBAAS,OAAO,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC;AAC1E,iBAAS,OAAO,CAAC,CAAC,EAAE,QAAQ,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAAC;AA0BzG,eAAe,OAAO,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { isAsyncInput as f, awaitValue as i, isIterable as e } from "./utils.mjs";
2
+ import s from "./toAsync.mjs";
3
+ function u(t) {
4
+ if (f(t))
5
+ return (async function* () {
6
+ for await (const n of s(t)) {
7
+ const o = await i(n);
8
+ for (const r of o)
9
+ yield r;
10
+ }
11
+ })();
12
+ if (e(t))
13
+ return (function* () {
14
+ for (const n of t)
15
+ for (const o of n)
16
+ yield o;
17
+ })();
18
+ throw new TypeError("flatten: input is not iterable");
19
+ }
20
+ export {
21
+ u as default
22
+ };
23
+ //# sourceMappingURL=flatten.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flatten.mjs","sources":["../../src/stream/flatten.ts"],"sourcesContent":["import type { AnyIterableInput, PromiseLikeValue } from './utils';\nimport { awaitValue, isAsyncInput, isIterable } from './utils';\nimport toAsync from './toAsync';\n\n/** flatten - lazily flatten iterable of iterables */\nfunction flatten<T>(iterable: Iterable<Iterable<T>>): IterableIterator<T>;\nfunction flatten<T>(iterable: AnyIterableInput<PromiseLikeValue<Iterable<T>>>): AsyncIterableIterator<T>;\nfunction flatten<T>(iterable: AnyIterableInput<PromiseLikeValue<Iterable<T>>>): any {\n if (isAsyncInput(iterable)) {\n return (async function* () {\n for await (const inner of toAsync(iterable)) {\n const resolved = await awaitValue(inner as PromiseLikeValue<Iterable<T>>);\n for (const item of resolved) {\n yield item as T;\n }\n }\n })();\n }\n\n if (isIterable(iterable)) {\n return (function* () {\n for (const inner of iterable as Iterable<Iterable<T>>) {\n for (const item of inner) {\n yield item as T;\n }\n }\n })();\n }\n\n throw new TypeError('flatten: input is not iterable');\n}\n\nexport default flatten;\n"],"names":["flatten","iterable","isAsyncInput","inner","toAsync","resolved","awaitValue","item","isIterable"],"mappings":";;AAOA,SAASA,EAAWC,GAAgE;AAClF,MAAIC,EAAaD,CAAQ;AACvB,YAAQ,mBAAmB;AACzB,uBAAiBE,KAASC,EAAQH,CAAQ,GAAG;AAC3C,cAAMI,IAAW,MAAMC,EAAWH,CAAsC;AACxE,mBAAWI,KAAQF;AACjB,gBAAME;AAAA,MAEV;AAAA,IACF,GAAA;AAGF,MAAIC,EAAWP,CAAQ;AACrB,YAAQ,aAAa;AACnB,iBAAWE,KAASF;AAClB,mBAAWM,KAAQJ;AACjB,gBAAMI;AAAA,IAGZ,GAAA;AAGF,QAAM,IAAI,UAAU,gCAAgC;AACtD;"}
@@ -0,0 +1,6 @@
1
+ import { AnyIterableInput, PromiseLikeValue } from './utils';
2
+ /** flattenDeep - lazily flatten nested iterables */
3
+ declare function flattenDeep<T>(iterable: Iterable<unknown>): IterableIterator<T>;
4
+ declare function flattenDeep<T>(iterable: AnyIterableInput<PromiseLikeValue<unknown>>): AsyncIterableIterator<T>;
5
+ export default flattenDeep;
6
+ //# sourceMappingURL=flattenDeep.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flattenDeep.d.ts","sourceRoot":"","sources":["../../src/stream/flattenDeep.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAIlE,oDAAoD;AACpD,iBAAS,WAAW,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC;AAC1E,iBAAS,WAAW,CAAC,CAAC,EAAE,QAAQ,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAAC;AAkCzG,eAAe,WAAW,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { isAsyncInput as r, awaitValue as c, isIterable as e } from "./utils.mjs";
2
+ import s from "./toAsync.mjs";
3
+ function y(n) {
4
+ const o = function* (t) {
5
+ if (e(t)) {
6
+ for (const i of t)
7
+ yield* o(i);
8
+ return;
9
+ }
10
+ yield t;
11
+ };
12
+ if (r(n))
13
+ return (async function* () {
14
+ for await (const t of s(n)) {
15
+ const i = await c(t);
16
+ for (const f of o(i))
17
+ yield f;
18
+ }
19
+ })();
20
+ if (e(n))
21
+ return (function* () {
22
+ for (const t of n)
23
+ yield* o(t);
24
+ })();
25
+ throw new TypeError("flattenDeep: input is not iterable");
26
+ }
27
+ export {
28
+ y as default
29
+ };
30
+ //# sourceMappingURL=flattenDeep.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flattenDeep.mjs","sources":["../../src/stream/flattenDeep.ts"],"sourcesContent":["import type { AnyIterableInput, PromiseLikeValue } from './utils';\nimport { awaitValue, isAsyncInput, isIterable } from './utils';\nimport toAsync from './toAsync';\n\n/** flattenDeep - lazily flatten nested iterables */\nfunction flattenDeep<T>(iterable: Iterable<unknown>): IterableIterator<T>;\nfunction flattenDeep<T>(iterable: AnyIterableInput<PromiseLikeValue<unknown>>): AsyncIterableIterator<T>;\nfunction flattenDeep<T>(iterable: AnyIterableInput<PromiseLikeValue<unknown>>): any {\n const walkSync = function* (value: unknown): IterableIterator<T> {\n if (isIterable(value)) {\n for (const item of value as Iterable<unknown>) {\n yield* walkSync(item);\n }\n return;\n }\n yield value as T;\n };\n\n if (isAsyncInput(iterable)) {\n return (async function* () {\n for await (const item of toAsync(iterable)) {\n const resolved = await awaitValue(item as PromiseLikeValue<unknown>);\n for (const inner of walkSync(resolved)) {\n yield inner as T;\n }\n }\n })();\n }\n\n if (isIterable(iterable)) {\n return (function* () {\n for (const item of iterable as Iterable<unknown>) {\n yield* walkSync(item);\n }\n })();\n }\n\n throw new TypeError('flattenDeep: input is not iterable');\n}\n\nexport default flattenDeep;\n"],"names":["flattenDeep","iterable","walkSync","value","isIterable","item","isAsyncInput","toAsync","resolved","awaitValue","inner"],"mappings":";;AAOA,SAASA,EAAeC,GAA4D;AAClF,QAAMC,IAAW,WAAWC,GAAqC;AAC/D,QAAIC,EAAWD,CAAK,GAAG;AACrB,iBAAWE,KAAQF;AACjB,eAAOD,EAASG,CAAI;AAEtB;AAAA,IACF;AACA,UAAMF;AAAA,EACR;AAEA,MAAIG,EAAaL,CAAQ;AACvB,YAAQ,mBAAmB;AACzB,uBAAiBI,KAAQE,EAAQN,CAAQ,GAAG;AAC1C,cAAMO,IAAW,MAAMC,EAAWJ,CAAiC;AACnE,mBAAWK,KAASR,EAASM,CAAQ;AACnC,gBAAME;AAAA,MAEV;AAAA,IACF,GAAA;AAGF,MAAIN,EAAWH,CAAQ;AACrB,YAAQ,aAAa;AACnB,iBAAWI,KAAQJ;AACjB,eAAOC,EAASG,CAAI;AAAA,IAExB,GAAA;AAGF,QAAM,IAAI,UAAU,oCAAoC;AAC1D;"}
@@ -0,0 +1,24 @@
1
+ export { default as append } from './append';
2
+ export { default as chunk } from './chunk';
3
+ export { default as concat } from './concat';
4
+ export { default as drop } from './drop';
5
+ export { default as dropWhile } from './dropWhile';
6
+ export { default as every } from './every';
7
+ export { default as filter } from './filter';
8
+ export { default as find } from './find';
9
+ export { default as flatMap } from './flatMap';
10
+ export { default as flatten } from './flatten';
11
+ export { default as flattenDeep } from './flattenDeep';
12
+ export { default as map } from './map';
13
+ export { default as prepend } from './prepend';
14
+ export { default as range } from './range';
15
+ export { default as reduce } from './reduce';
16
+ export { default as scan } from './scan';
17
+ export { default as some } from './some';
18
+ export { default as take } from './take';
19
+ export { default as takeWhile } from './takeWhile';
20
+ export { default as toArray } from './toArray';
21
+ export { default as toAsync } from './toAsync';
22
+ export { default as zip } from './zip';
23
+ export { default as zipWith } from './zipWith';
24
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/stream/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC"}