iter-fest 0.1.1-main.2a21293 → 0.1.1-main.38dc55c

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 (342) hide show
  1. package/README.md +64 -39
  2. package/dist/chunk-3S6LCGE6.mjs +10 -0
  3. package/dist/chunk-3S6LCGE6.mjs.map +1 -0
  4. package/dist/{chunk-UIEKIMLW.mjs → chunk-AN54W42O.mjs} +8 -5
  5. package/dist/chunk-AN54W42O.mjs.map +1 -0
  6. package/dist/chunk-BSAPKNNZ.mjs +16 -0
  7. package/dist/chunk-BSAPKNNZ.mjs.map +1 -0
  8. package/dist/chunk-BWMXKULC.mjs +46 -0
  9. package/dist/chunk-BWMXKULC.mjs.map +1 -0
  10. package/dist/chunk-CNCNQPK3.mjs +16 -0
  11. package/dist/chunk-CNCNQPK3.mjs.map +1 -0
  12. package/dist/{chunk-KONB7TV6.mjs → chunk-EQZQP6GW.mjs} +8 -5
  13. package/dist/chunk-EQZQP6GW.mjs.map +1 -0
  14. package/dist/chunk-FBST4AUL.mjs +10 -0
  15. package/dist/chunk-FBST4AUL.mjs.map +1 -0
  16. package/dist/chunk-FEEBFWAI.mjs +24 -0
  17. package/dist/chunk-FEEBFWAI.mjs.map +1 -0
  18. package/dist/chunk-FMIHIL6A.mjs +10 -0
  19. package/dist/chunk-FMIHIL6A.mjs.map +1 -0
  20. package/dist/{chunk-27NJVC7K.mjs → chunk-H27CTQGV.mjs} +8 -5
  21. package/dist/chunk-H27CTQGV.mjs.map +1 -0
  22. package/dist/{chunk-MDBK7ND5.mjs → chunk-H5ARVU55.mjs} +8 -5
  23. package/dist/chunk-H5ARVU55.mjs.map +1 -0
  24. package/dist/{chunk-WKIRSZXX.mjs → chunk-IZXDQ25M.mjs} +8 -5
  25. package/dist/chunk-IZXDQ25M.mjs.map +1 -0
  26. package/dist/chunk-KYMTQJIJ.mjs +10 -0
  27. package/dist/chunk-KYMTQJIJ.mjs.map +1 -0
  28. package/dist/chunk-LIMQXDFK.mjs +10 -0
  29. package/dist/chunk-LIMQXDFK.mjs.map +1 -0
  30. package/dist/chunk-MO7HMLOZ.mjs +24 -0
  31. package/dist/chunk-MO7HMLOZ.mjs.map +1 -0
  32. package/dist/chunk-MYSNSDM7.mjs +13 -0
  33. package/dist/chunk-MYSNSDM7.mjs.map +1 -0
  34. package/dist/chunk-NZRXO7EY.mjs +24 -0
  35. package/dist/chunk-NZRXO7EY.mjs.map +1 -0
  36. package/dist/chunk-OCK7PKGO.mjs +23 -0
  37. package/dist/chunk-OCK7PKGO.mjs.map +1 -0
  38. package/dist/chunk-OWUGLCQB.mjs +10 -0
  39. package/dist/chunk-OWUGLCQB.mjs.map +1 -0
  40. package/dist/chunk-PGJSIDLV.mjs +25 -0
  41. package/dist/chunk-PGJSIDLV.mjs.map +1 -0
  42. package/dist/chunk-QX6EMOSQ.mjs +10 -0
  43. package/dist/chunk-QX6EMOSQ.mjs.map +1 -0
  44. package/dist/chunk-R6SXIXMH.mjs +10 -0
  45. package/dist/chunk-R6SXIXMH.mjs.map +1 -0
  46. package/dist/chunk-TDHR35S7.mjs +10 -0
  47. package/dist/chunk-TDHR35S7.mjs.map +1 -0
  48. package/dist/chunk-VCKLUCOT.mjs +10 -0
  49. package/dist/chunk-VCKLUCOT.mjs.map +1 -0
  50. package/dist/chunk-XQDGXAAF.mjs +10 -0
  51. package/dist/chunk-XQDGXAAF.mjs.map +1 -0
  52. package/dist/{chunk-MOBXUTO5.mjs → chunk-YJSIVBF7.mjs} +5 -5
  53. package/dist/chunk-YJSIVBF7.mjs.map +1 -0
  54. package/dist/chunk-YLERARWI.mjs +10 -0
  55. package/dist/chunk-YLERARWI.mjs.map +1 -0
  56. package/dist/iter-fest.d.mts +27 -22
  57. package/dist/iter-fest.d.ts +27 -22
  58. package/dist/iter-fest.iterableWritableStream.d.mts +7 -0
  59. package/dist/iter-fest.iterableWritableStream.d.ts +7 -0
  60. package/dist/{iter-fest.pushAsyncIterableIterator.js → iter-fest.iterableWritableStream.js} +39 -30
  61. package/dist/iter-fest.iterableWritableStream.js.map +1 -0
  62. package/dist/iter-fest.iterableWritableStream.mjs +7 -0
  63. package/dist/{iter-fest.iterableAt.d.ts → iter-fest.iteratorAt.d.mts} +2 -2
  64. package/dist/{iter-fest.iterableAt.d.mts → iter-fest.iteratorAt.d.ts} +2 -2
  65. package/dist/{iter-fest.iterableAt.js → iter-fest.iteratorAt.js} +21 -10
  66. package/dist/iter-fest.iteratorAt.js.map +1 -0
  67. package/dist/iter-fest.iteratorAt.mjs +9 -0
  68. package/dist/iter-fest.iteratorConcat.d.mts +16 -0
  69. package/dist/iter-fest.iteratorConcat.d.ts +16 -0
  70. package/dist/{iter-fest.iterableConcat.js → iter-fest.iteratorConcat.js} +27 -11
  71. package/dist/iter-fest.iteratorConcat.js.map +1 -0
  72. package/dist/iter-fest.iteratorConcat.mjs +8 -0
  73. package/dist/iter-fest.iteratorDrop.d.mts +12 -0
  74. package/dist/iter-fest.iteratorDrop.d.ts +12 -0
  75. package/dist/iter-fest.iteratorDrop.js +44 -0
  76. package/dist/iter-fest.iteratorDrop.js.map +1 -0
  77. package/dist/iter-fest.iteratorDrop.mjs +7 -0
  78. package/dist/iter-fest.iteratorEntries.d.mts +6 -0
  79. package/dist/iter-fest.iteratorEntries.d.ts +6 -0
  80. package/dist/{iter-fest.iterableEntries.js → iter-fest.iteratorEntries.js} +22 -9
  81. package/dist/iter-fest.iteratorEntries.js.map +1 -0
  82. package/dist/iter-fest.iteratorEntries.mjs +8 -0
  83. package/dist/iter-fest.iteratorEvery.d.mts +25 -0
  84. package/dist/iter-fest.iteratorEvery.d.ts +25 -0
  85. package/dist/iter-fest.iteratorEvery.js +44 -0
  86. package/dist/iter-fest.iteratorEvery.js.map +1 -0
  87. package/dist/iter-fest.iteratorEvery.mjs +7 -0
  88. package/dist/iter-fest.iteratorFilter.d.mts +18 -0
  89. package/dist/iter-fest.iteratorFilter.d.ts +18 -0
  90. package/dist/iter-fest.iteratorFilter.js +44 -0
  91. package/dist/iter-fest.iteratorFilter.js.map +1 -0
  92. package/dist/iter-fest.iteratorFilter.mjs +7 -0
  93. package/dist/iter-fest.iteratorFind.d.mts +14 -0
  94. package/dist/iter-fest.iteratorFind.d.ts +14 -0
  95. package/dist/iter-fest.iteratorFind.js +44 -0
  96. package/dist/iter-fest.iteratorFind.js.map +1 -0
  97. package/dist/iter-fest.iteratorFind.mjs +7 -0
  98. package/dist/{iter-fest.iterableFindIndex.d.mts → iter-fest.iteratorFindIndex.d.mts} +4 -4
  99. package/dist/{iter-fest.iterableFindIndex.d.ts → iter-fest.iteratorFindIndex.d.ts} +4 -4
  100. package/dist/{iter-fest.iterableFindIndex.js → iter-fest.iteratorFindIndex.js} +23 -10
  101. package/dist/iter-fest.iteratorFindIndex.js.map +1 -0
  102. package/dist/iter-fest.iteratorFindIndex.mjs +8 -0
  103. package/dist/{iter-fest.iterableFindLast.d.mts → iter-fest.iteratorFindLast.d.mts} +5 -5
  104. package/dist/{iter-fest.iterableFindLast.d.ts → iter-fest.iteratorFindLast.d.ts} +5 -5
  105. package/dist/{iter-fest.iterableFindLast.js → iter-fest.iteratorFindLast.js} +23 -10
  106. package/dist/iter-fest.iteratorFindLast.js.map +1 -0
  107. package/dist/iter-fest.iteratorFindLast.mjs +8 -0
  108. package/dist/{iter-fest.iterableFindLastIndex.d.mts → iter-fest.iteratorFindLastIndex.d.mts} +4 -4
  109. package/dist/{iter-fest.iterableFindLastIndex.d.ts → iter-fest.iteratorFindLastIndex.d.ts} +4 -4
  110. package/dist/{iter-fest.iterableFindLastIndex.js → iter-fest.iteratorFindLastIndex.js} +23 -10
  111. package/dist/iter-fest.iteratorFindLastIndex.js.map +1 -0
  112. package/dist/iter-fest.iteratorFindLastIndex.mjs +8 -0
  113. package/dist/iter-fest.iteratorFlatMap.d.mts +12 -0
  114. package/dist/iter-fest.iteratorFlatMap.d.ts +12 -0
  115. package/dist/iter-fest.iteratorFlatMap.js +44 -0
  116. package/dist/iter-fest.iteratorFlatMap.js.map +1 -0
  117. package/dist/iter-fest.iteratorFlatMap.mjs +7 -0
  118. package/dist/iter-fest.iteratorForEach.d.mts +10 -0
  119. package/dist/iter-fest.iteratorForEach.d.ts +10 -0
  120. package/dist/iter-fest.iteratorForEach.js +44 -0
  121. package/dist/iter-fest.iteratorForEach.js.map +1 -0
  122. package/dist/iter-fest.iteratorForEach.mjs +7 -0
  123. package/dist/iter-fest.iteratorFrom.d.mts +12 -0
  124. package/dist/iter-fest.iteratorFrom.d.ts +12 -0
  125. package/dist/iter-fest.iteratorFrom.js +44 -0
  126. package/dist/iter-fest.iteratorFrom.js.map +1 -0
  127. package/dist/iter-fest.iteratorFrom.mjs +7 -0
  128. package/dist/iter-fest.iteratorIncludes.d.mts +9 -0
  129. package/dist/iter-fest.iteratorIncludes.d.ts +9 -0
  130. package/dist/{iter-fest.iterableIncludes.js → iter-fest.iteratorIncludes.js} +21 -10
  131. package/dist/iter-fest.iteratorIncludes.js.map +1 -0
  132. package/dist/iter-fest.iteratorIncludes.mjs +9 -0
  133. package/dist/iter-fest.iteratorIndexOf.d.mts +9 -0
  134. package/dist/iter-fest.iteratorIndexOf.d.ts +9 -0
  135. package/dist/{iter-fest.iterableIndexOf.js → iter-fest.iteratorIndexOf.js} +21 -10
  136. package/dist/iter-fest.iteratorIndexOf.js.map +1 -0
  137. package/dist/iter-fest.iteratorIndexOf.mjs +9 -0
  138. package/dist/iter-fest.iteratorJoin.d.mts +8 -0
  139. package/dist/iter-fest.iteratorJoin.d.ts +8 -0
  140. package/dist/{iter-fest.iterableToString.js → iter-fest.iteratorJoin.js} +21 -15
  141. package/dist/iter-fest.iteratorJoin.js.map +1 -0
  142. package/dist/iter-fest.iteratorJoin.mjs +8 -0
  143. package/dist/iter-fest.iteratorKeys.d.mts +6 -0
  144. package/dist/iter-fest.iteratorKeys.d.ts +6 -0
  145. package/dist/{iter-fest.iterableKeys.js → iter-fest.iteratorKeys.js} +22 -9
  146. package/dist/iter-fest.iteratorKeys.js.map +1 -0
  147. package/dist/iter-fest.iteratorKeys.mjs +8 -0
  148. package/dist/iter-fest.iteratorMap.d.mts +10 -0
  149. package/dist/iter-fest.iteratorMap.d.ts +10 -0
  150. package/dist/iter-fest.iteratorMap.js +44 -0
  151. package/dist/iter-fest.iteratorMap.js.map +1 -0
  152. package/dist/iter-fest.iteratorMap.mjs +7 -0
  153. package/dist/{iter-fest.iterableReduce.d.mts → iter-fest.iteratorReduce.d.mts} +13 -9
  154. package/dist/{iter-fest.iterableReduce.d.ts → iter-fest.iteratorReduce.d.ts} +13 -9
  155. package/dist/iter-fest.iteratorReduce.js +44 -0
  156. package/dist/iter-fest.iteratorReduce.js.map +1 -0
  157. package/dist/iter-fest.iteratorReduce.mjs +7 -0
  158. package/dist/{iter-fest.iterableSlice.d.mts → iter-fest.iteratorSlice.d.mts} +8 -8
  159. package/dist/{iter-fest.iterableSlice.d.ts → iter-fest.iteratorSlice.d.ts} +8 -8
  160. package/dist/{iter-fest.iterableSlice.js → iter-fest.iteratorSlice.js} +21 -10
  161. package/dist/iter-fest.iteratorSlice.js.map +1 -0
  162. package/dist/iter-fest.iteratorSlice.mjs +9 -0
  163. package/dist/iter-fest.iteratorSome.d.mts +10 -0
  164. package/dist/iter-fest.iteratorSome.d.ts +10 -0
  165. package/dist/iter-fest.iteratorSome.js +44 -0
  166. package/dist/iter-fest.iteratorSome.js.map +1 -0
  167. package/dist/iter-fest.iteratorSome.mjs +7 -0
  168. package/dist/iter-fest.iteratorTake.d.mts +12 -0
  169. package/dist/iter-fest.iteratorTake.d.ts +12 -0
  170. package/dist/iter-fest.iteratorTake.js +44 -0
  171. package/dist/iter-fest.iteratorTake.js.map +1 -0
  172. package/dist/iter-fest.iteratorTake.mjs +7 -0
  173. package/dist/iter-fest.iteratorTake.mjs.map +1 -0
  174. package/dist/iter-fest.iteratorToArray.d.mts +13 -0
  175. package/dist/iter-fest.iteratorToArray.d.ts +13 -0
  176. package/dist/iter-fest.iteratorToArray.js +44 -0
  177. package/dist/iter-fest.iteratorToArray.js.map +1 -0
  178. package/dist/iter-fest.iteratorToArray.mjs +7 -0
  179. package/dist/iter-fest.iteratorToArray.mjs.map +1 -0
  180. package/dist/{iter-fest.iterableToSpliced.d.mts → iter-fest.iteratorToSpliced.d.mts} +3 -3
  181. package/dist/{iter-fest.iterableToSpliced.d.ts → iter-fest.iteratorToSpliced.d.ts} +3 -3
  182. package/dist/{iter-fest.iterableToSpliced.js → iter-fest.iteratorToSpliced.js} +21 -10
  183. package/dist/iter-fest.iteratorToSpliced.js.map +1 -0
  184. package/dist/iter-fest.iteratorToSpliced.mjs +9 -0
  185. package/dist/iter-fest.iteratorToSpliced.mjs.map +1 -0
  186. package/dist/iter-fest.iteratorToString.d.mts +6 -0
  187. package/dist/iter-fest.iteratorToString.d.ts +6 -0
  188. package/dist/{iter-fest.iterableJoin.js → iter-fest.iteratorToString.js} +27 -9
  189. package/dist/iter-fest.iteratorToString.js.map +1 -0
  190. package/dist/iter-fest.iteratorToString.mjs +9 -0
  191. package/dist/iter-fest.iteratorToString.mjs.map +1 -0
  192. package/dist/iter-fest.js +253 -254
  193. package/dist/iter-fest.js.map +1 -1
  194. package/dist/iter-fest.mjs +93 -73
  195. package/dist/iter-fest.readableStreamFrom.d.mts +3 -0
  196. package/dist/iter-fest.readableStreamFrom.d.ts +3 -0
  197. package/dist/{iter-fest.iterableGetReadable.js → iter-fest.readableStreamFrom.js} +9 -9
  198. package/dist/iter-fest.readableStreamFrom.js.map +1 -0
  199. package/dist/iter-fest.readableStreamFrom.mjs +7 -0
  200. package/dist/iter-fest.readableStreamFrom.mjs.map +1 -0
  201. package/package.json +162 -112
  202. package/dist/chunk-27NJVC7K.mjs.map +0 -1
  203. package/dist/chunk-44W7OTNE.mjs +0 -12
  204. package/dist/chunk-44W7OTNE.mjs.map +0 -1
  205. package/dist/chunk-5CHMNKXJ.mjs +0 -20
  206. package/dist/chunk-5CHMNKXJ.mjs.map +0 -1
  207. package/dist/chunk-5CRMPYKD.mjs +0 -19
  208. package/dist/chunk-5CRMPYKD.mjs.map +0 -1
  209. package/dist/chunk-6C3P4TNK.mjs +0 -19
  210. package/dist/chunk-6C3P4TNK.mjs.map +0 -1
  211. package/dist/chunk-EZC33HE6.mjs +0 -15
  212. package/dist/chunk-EZC33HE6.mjs.map +0 -1
  213. package/dist/chunk-GWZF5BB7.mjs +0 -16
  214. package/dist/chunk-GWZF5BB7.mjs.map +0 -1
  215. package/dist/chunk-HYU4EN7J.mjs +0 -20
  216. package/dist/chunk-HYU4EN7J.mjs.map +0 -1
  217. package/dist/chunk-JU353VSE.mjs +0 -16
  218. package/dist/chunk-JU353VSE.mjs.map +0 -1
  219. package/dist/chunk-KONB7TV6.mjs.map +0 -1
  220. package/dist/chunk-MDBK7ND5.mjs.map +0 -1
  221. package/dist/chunk-MNLOWKTC.mjs +0 -19
  222. package/dist/chunk-MNLOWKTC.mjs.map +0 -1
  223. package/dist/chunk-MOBXUTO5.mjs.map +0 -1
  224. package/dist/chunk-O5SQJUKB.mjs +0 -37
  225. package/dist/chunk-O5SQJUKB.mjs.map +0 -1
  226. package/dist/chunk-TEI3K6GT.mjs +0 -21
  227. package/dist/chunk-TEI3K6GT.mjs.map +0 -1
  228. package/dist/chunk-UIEKIMLW.mjs.map +0 -1
  229. package/dist/chunk-V6OWQQ3Q.mjs +0 -20
  230. package/dist/chunk-V6OWQQ3Q.mjs.map +0 -1
  231. package/dist/chunk-WKIRSZXX.mjs.map +0 -1
  232. package/dist/chunk-XKBVB2JN.mjs +0 -12
  233. package/dist/chunk-XKBVB2JN.mjs.map +0 -1
  234. package/dist/chunk-XW34KZRY.mjs +0 -17
  235. package/dist/chunk-XW34KZRY.mjs.map +0 -1
  236. package/dist/chunk-Y5M2C7NQ.mjs +0 -13
  237. package/dist/chunk-Y5M2C7NQ.mjs.map +0 -1
  238. package/dist/chunk-ZUBHGSCW.mjs +0 -18
  239. package/dist/chunk-ZUBHGSCW.mjs.map +0 -1
  240. package/dist/iter-fest.iterableAt.js.map +0 -1
  241. package/dist/iter-fest.iterableAt.mjs +0 -8
  242. package/dist/iter-fest.iterableConcat.d.mts +0 -16
  243. package/dist/iter-fest.iterableConcat.d.ts +0 -16
  244. package/dist/iter-fest.iterableConcat.js.map +0 -1
  245. package/dist/iter-fest.iterableConcat.mjs +0 -7
  246. package/dist/iter-fest.iterableEntries.d.mts +0 -6
  247. package/dist/iter-fest.iterableEntries.d.ts +0 -6
  248. package/dist/iter-fest.iterableEntries.js.map +0 -1
  249. package/dist/iter-fest.iterableEntries.mjs +0 -7
  250. package/dist/iter-fest.iterableEvery.d.mts +0 -24
  251. package/dist/iter-fest.iterableEvery.d.ts +0 -24
  252. package/dist/iter-fest.iterableEvery.js +0 -43
  253. package/dist/iter-fest.iterableEvery.js.map +0 -1
  254. package/dist/iter-fest.iterableEvery.mjs +0 -7
  255. package/dist/iter-fest.iterableFilter.d.mts +0 -16
  256. package/dist/iter-fest.iterableFilter.d.ts +0 -16
  257. package/dist/iter-fest.iterableFilter.js +0 -42
  258. package/dist/iter-fest.iterableFilter.js.map +0 -1
  259. package/dist/iter-fest.iterableFilter.mjs +0 -7
  260. package/dist/iter-fest.iterableFind.d.mts +0 -15
  261. package/dist/iter-fest.iterableFind.d.ts +0 -15
  262. package/dist/iter-fest.iterableFind.js +0 -43
  263. package/dist/iter-fest.iterableFind.js.map +0 -1
  264. package/dist/iter-fest.iterableFind.mjs +0 -7
  265. package/dist/iter-fest.iterableFindIndex.js.map +0 -1
  266. package/dist/iter-fest.iterableFindIndex.mjs +0 -7
  267. package/dist/iter-fest.iterableFindLast.js.map +0 -1
  268. package/dist/iter-fest.iterableFindLast.mjs +0 -7
  269. package/dist/iter-fest.iterableFindLastIndex.js.map +0 -1
  270. package/dist/iter-fest.iterableFindLastIndex.mjs +0 -7
  271. package/dist/iter-fest.iterableForEach.d.mts +0 -10
  272. package/dist/iter-fest.iterableForEach.d.ts +0 -10
  273. package/dist/iter-fest.iterableForEach.js +0 -40
  274. package/dist/iter-fest.iterableForEach.js.map +0 -1
  275. package/dist/iter-fest.iterableForEach.mjs +0 -7
  276. package/dist/iter-fest.iterableGetReadable.d.mts +0 -3
  277. package/dist/iter-fest.iterableGetReadable.d.ts +0 -3
  278. package/dist/iter-fest.iterableGetReadable.js.map +0 -1
  279. package/dist/iter-fest.iterableGetReadable.mjs +0 -7
  280. package/dist/iter-fest.iterableIncludes.d.mts +0 -9
  281. package/dist/iter-fest.iterableIncludes.d.ts +0 -9
  282. package/dist/iter-fest.iterableIncludes.js.map +0 -1
  283. package/dist/iter-fest.iterableIncludes.mjs +0 -8
  284. package/dist/iter-fest.iterableIndexOf.d.mts +0 -9
  285. package/dist/iter-fest.iterableIndexOf.d.ts +0 -9
  286. package/dist/iter-fest.iterableIndexOf.js.map +0 -1
  287. package/dist/iter-fest.iterableIndexOf.mjs +0 -8
  288. package/dist/iter-fest.iterableJoin.d.mts +0 -8
  289. package/dist/iter-fest.iterableJoin.d.ts +0 -8
  290. package/dist/iter-fest.iterableJoin.js.map +0 -1
  291. package/dist/iter-fest.iterableJoin.mjs +0 -7
  292. package/dist/iter-fest.iterableKeys.d.mts +0 -6
  293. package/dist/iter-fest.iterableKeys.d.ts +0 -6
  294. package/dist/iter-fest.iterableKeys.js.map +0 -1
  295. package/dist/iter-fest.iterableKeys.mjs +0 -7
  296. package/dist/iter-fest.iterableMap.d.mts +0 -8
  297. package/dist/iter-fest.iterableMap.d.ts +0 -8
  298. package/dist/iter-fest.iterableMap.js +0 -39
  299. package/dist/iter-fest.iterableMap.js.map +0 -1
  300. package/dist/iter-fest.iterableMap.mjs +0 -7
  301. package/dist/iter-fest.iterableReduce.js +0 -41
  302. package/dist/iter-fest.iterableReduce.js.map +0 -1
  303. package/dist/iter-fest.iterableReduce.mjs +0 -7
  304. package/dist/iter-fest.iterableSlice.js.map +0 -1
  305. package/dist/iter-fest.iterableSlice.mjs +0 -8
  306. package/dist/iter-fest.iterableSome.d.mts +0 -12
  307. package/dist/iter-fest.iterableSome.d.ts +0 -12
  308. package/dist/iter-fest.iterableSome.js +0 -43
  309. package/dist/iter-fest.iterableSome.js.map +0 -1
  310. package/dist/iter-fest.iterableSome.mjs +0 -7
  311. package/dist/iter-fest.iterableToSpliced.js.map +0 -1
  312. package/dist/iter-fest.iterableToSpliced.mjs +0 -8
  313. package/dist/iter-fest.iterableToString.d.mts +0 -6
  314. package/dist/iter-fest.iterableToString.d.ts +0 -6
  315. package/dist/iter-fest.iterableToString.js.map +0 -1
  316. package/dist/iter-fest.iterableToString.mjs +0 -8
  317. package/dist/iter-fest.pushAsyncIterableIterator.d.mts +0 -9
  318. package/dist/iter-fest.pushAsyncIterableIterator.d.ts +0 -9
  319. package/dist/iter-fest.pushAsyncIterableIterator.js.map +0 -1
  320. package/dist/iter-fest.pushAsyncIterableIterator.mjs +0 -7
  321. /package/dist/{iter-fest.iterableAt.mjs.map → iter-fest.iterableWritableStream.mjs.map} +0 -0
  322. /package/dist/{iter-fest.iterableConcat.mjs.map → iter-fest.iteratorAt.mjs.map} +0 -0
  323. /package/dist/{iter-fest.iterableEntries.mjs.map → iter-fest.iteratorConcat.mjs.map} +0 -0
  324. /package/dist/{iter-fest.iterableEvery.mjs.map → iter-fest.iteratorDrop.mjs.map} +0 -0
  325. /package/dist/{iter-fest.iterableFilter.mjs.map → iter-fest.iteratorEntries.mjs.map} +0 -0
  326. /package/dist/{iter-fest.iterableFind.mjs.map → iter-fest.iteratorEvery.mjs.map} +0 -0
  327. /package/dist/{iter-fest.iterableFindIndex.mjs.map → iter-fest.iteratorFilter.mjs.map} +0 -0
  328. /package/dist/{iter-fest.iterableFindLast.mjs.map → iter-fest.iteratorFind.mjs.map} +0 -0
  329. /package/dist/{iter-fest.iterableFindLastIndex.mjs.map → iter-fest.iteratorFindIndex.mjs.map} +0 -0
  330. /package/dist/{iter-fest.iterableForEach.mjs.map → iter-fest.iteratorFindLast.mjs.map} +0 -0
  331. /package/dist/{iter-fest.iterableGetReadable.mjs.map → iter-fest.iteratorFindLastIndex.mjs.map} +0 -0
  332. /package/dist/{iter-fest.iterableIncludes.mjs.map → iter-fest.iteratorFlatMap.mjs.map} +0 -0
  333. /package/dist/{iter-fest.iterableIndexOf.mjs.map → iter-fest.iteratorForEach.mjs.map} +0 -0
  334. /package/dist/{iter-fest.iterableJoin.mjs.map → iter-fest.iteratorFrom.mjs.map} +0 -0
  335. /package/dist/{iter-fest.iterableKeys.mjs.map → iter-fest.iteratorIncludes.mjs.map} +0 -0
  336. /package/dist/{iter-fest.iterableMap.mjs.map → iter-fest.iteratorIndexOf.mjs.map} +0 -0
  337. /package/dist/{iter-fest.iterableReduce.mjs.map → iter-fest.iteratorJoin.mjs.map} +0 -0
  338. /package/dist/{iter-fest.iterableSlice.mjs.map → iter-fest.iteratorKeys.mjs.map} +0 -0
  339. /package/dist/{iter-fest.iterableSome.mjs.map → iter-fest.iteratorMap.mjs.map} +0 -0
  340. /package/dist/{iter-fest.iterableToSpliced.mjs.map → iter-fest.iteratorReduce.mjs.map} +0 -0
  341. /package/dist/{iter-fest.iterableToString.mjs.map → iter-fest.iteratorSlice.mjs.map} +0 -0
  342. /package/dist/{iter-fest.pushAsyncIterableIterator.mjs.map → iter-fest.iteratorSome.mjs.map} +0 -0
@@ -0,0 +1,24 @@
1
+ import {
2
+ iteratorToIterable
3
+ } from "./chunk-MNDAEMYM.mjs";
4
+
5
+ // src/iteratorFindIndex.ts
6
+ function iteratorFindIndex(iterator, predicate, thisArg) {
7
+ let index = 0;
8
+ if (typeof predicate !== "function") {
9
+ throw new TypeError(`${predicate} is not a function`);
10
+ }
11
+ const boundPredicate = predicate.bind(thisArg);
12
+ for (const value of iteratorToIterable(iterator)) {
13
+ if (boundPredicate(value, index, iterator)) {
14
+ return index;
15
+ }
16
+ index++;
17
+ }
18
+ return -1;
19
+ }
20
+
21
+ export {
22
+ iteratorFindIndex
23
+ };
24
+ //# sourceMappingURL=chunk-MO7HMLOZ.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/iteratorFindIndex.ts"],"sourcesContent":["import { iteratorToIterable } from './iteratorToIterable';\n\n/**\n * Returns the index of the first element in the iterator where predicate is true, and -1\n * otherwise.\n *\n * @param predicate find calls predicate once for each element of the iterator, in ascending\n * order, until it finds one where predicate returns true. If such an element is found,\n * findIndex immediately returns that element index. Otherwise, findIndex returns -1.\n *\n * @param thisArg If provided, it will be used as the this value for each invocation of\n * predicate. If it is not provided, undefined is used instead.\n */\nexport function iteratorFindIndex<T>(\n iterator: Iterator<T>,\n predicate: (value: T, index: number, obj: Iterator<T>) => unknown,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n thisArg?: any\n): number {\n let index = 0;\n\n if (typeof predicate !== 'function') {\n throw new TypeError(`${predicate} is not a function`);\n }\n\n const boundPredicate = predicate.bind(thisArg);\n\n for (const value of iteratorToIterable(iterator)) {\n if (boundPredicate(value, index, iterator)) {\n return index;\n }\n\n index++;\n }\n\n return -1;\n}\n"],"mappings":";;;;;AAaO,SAAS,kBACd,UACA,WAEA,SACQ;AACR,MAAI,QAAQ;AAEZ,MAAI,OAAO,cAAc,YAAY;AACnC,UAAM,IAAI,UAAU,GAAG,SAAS,oBAAoB;AAAA,EACtD;AAEA,QAAM,iBAAiB,UAAU,KAAK,OAAO;AAE7C,aAAW,SAAS,mBAAmB,QAAQ,GAAG;AAChD,QAAI,eAAe,OAAO,OAAO,QAAQ,GAAG;AAC1C,aAAO;AAAA,IACT;AAEA;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
@@ -0,0 +1,13 @@
1
+ import {
2
+ iteratorJoin
3
+ } from "./chunk-FEEBFWAI.mjs";
4
+
5
+ // src/iteratorToString.ts
6
+ function iteratorToString(iterator) {
7
+ return iteratorJoin(iterator);
8
+ }
9
+
10
+ export {
11
+ iteratorToString
12
+ };
13
+ //# sourceMappingURL=chunk-MYSNSDM7.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/iteratorToString.ts"],"sourcesContent":["import { iteratorJoin } from './iteratorJoin';\n\n/**\n * Returns a string representation of an iterator.\n */\nexport function iteratorToString<T>(iterator: Iterator<T>): string {\n return iteratorJoin(iterator);\n}\n"],"mappings":";;;;;AAKO,SAAS,iBAAoB,UAA+B;AACjE,SAAO,aAAa,QAAQ;AAC9B;","names":[]}
@@ -0,0 +1,24 @@
1
+ import {
2
+ iteratorToIterable
3
+ } from "./chunk-MNDAEMYM.mjs";
4
+
5
+ // src/iteratorFindLast.ts
6
+ function iteratorFindLast(iterator, predicate, thisArg) {
7
+ let index = 0;
8
+ let last;
9
+ if (typeof predicate !== "function") {
10
+ throw new TypeError(`${predicate} is not a function`);
11
+ }
12
+ const boundPredicate = predicate.bind(thisArg);
13
+ for (const value of iteratorToIterable(iterator)) {
14
+ if (boundPredicate(value, index++, iterator)) {
15
+ last = value;
16
+ }
17
+ }
18
+ return last;
19
+ }
20
+
21
+ export {
22
+ iteratorFindLast
23
+ };
24
+ //# sourceMappingURL=chunk-NZRXO7EY.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/iteratorFindLast.ts"],"sourcesContent":["import { iteratorToIterable } from './iteratorToIterable';\n\n/**\n * Returns the value of the last element in the iterator where predicate is true, and undefined\n * otherwise.\n *\n * @param predicate findLast calls predicate once for each element of the iterator, in descending\n * order, until it finds one where predicate returns true. If such an element is found, findLast\n * immediately returns that element value. Otherwise, findLast returns undefined.\n *\n * @param thisArg If provided, it will be used as the this value for each invocation of\n * predicate. If it is not provided, undefined is used instead.\n */\nexport function iteratorFindLast<T, S extends T>(\n iterator: Iterator<T>,\n predicate: (value: T, index: number, iterator: Iterator<T>) => value is S,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n thisArg?: any\n): S | undefined;\n\nexport function iteratorFindLast<T>(\n iterator: Iterator<T>,\n predicate: (value: T, index: number, iterator: Iterator<T>) => unknown,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n thisArg?: any\n): T | undefined;\n\nexport function iteratorFindLast<T, S extends T>(\n iterator: Iterator<T>,\n predicate: (value: T, index: number, iterator: Iterator<T>) => unknown,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n thisArg?: any\n): S | undefined {\n let index = 0;\n let last: S | undefined;\n\n if (typeof predicate !== 'function') {\n throw new TypeError(`${predicate} is not a function`);\n }\n\n const boundPredicate = predicate.bind(thisArg);\n\n for (const value of iteratorToIterable(iterator)) {\n if (boundPredicate(value, index++, iterator)) {\n last = value as S;\n }\n }\n\n return last;\n}\n"],"mappings":";;;;;AA2BO,SAAS,iBACd,UACA,WAEA,SACe;AACf,MAAI,QAAQ;AACZ,MAAI;AAEJ,MAAI,OAAO,cAAc,YAAY;AACnC,UAAM,IAAI,UAAU,GAAG,SAAS,oBAAoB;AAAA,EACtD;AAEA,QAAM,iBAAiB,UAAU,KAAK,OAAO;AAE7C,aAAW,SAAS,mBAAmB,QAAQ,GAAG;AAChD,QAAI,eAAe,OAAO,SAAS,QAAQ,GAAG;AAC5C,aAAO;AAAA,IACT;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
@@ -0,0 +1,23 @@
1
+ import {
2
+ iteratorToIterable
3
+ } from "./chunk-MNDAEMYM.mjs";
4
+
5
+ // src/iteratorConcat.ts
6
+ function isIterator(value) {
7
+ return !!value && typeof value === "object" && Symbol.iterator in value;
8
+ }
9
+ function* iteratorConcat(iterator, ...items) {
10
+ yield* iteratorToIterable(iterator);
11
+ for (const item of items) {
12
+ if (isIterator(item)) {
13
+ yield* iteratorToIterable(item);
14
+ } else {
15
+ yield item;
16
+ }
17
+ }
18
+ }
19
+
20
+ export {
21
+ iteratorConcat
22
+ };
23
+ //# sourceMappingURL=chunk-OCK7PKGO.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/iteratorConcat.ts"],"sourcesContent":["import { iteratorToIterable } from './iteratorToIterable';\n\nfunction isIterator<T>(value: unknown): value is Iterator<T> {\n return !!value && typeof value === 'object' && Symbol.iterator in value;\n}\n\n/**\n * Combines two or more iterators.\n * This method returns a new iterator without modifying any existing iterators.\n *\n * @param items Additional iterators and/or items to add to the end of the iterator.\n */\nexport function iteratorConcat<T>(iterator: Iterator<T>, ...items: Iterator<T>[]): IterableIterator<T>;\n\n/**\n * Combines two or more iterators.\n * This method returns a new iterator without modifying any existing iterators.\n *\n * @param items Additional iterators and/or items to add to the end of the iterator.\n */\nexport function iteratorConcat<T>(iterator: Iterator<T>, ...items: (T | Iterator<T>)[]): IterableIterator<T>;\n\nexport function* iteratorConcat<T>(iterator: Iterator<T>, ...items: (T | Iterator<T>)[]): IterableIterator<T> {\n yield* iteratorToIterable(iterator);\n\n for (const item of items) {\n if (isIterator(item)) {\n yield* iteratorToIterable(item);\n } else {\n yield item;\n }\n }\n}\n"],"mappings":";;;;;AAEA,SAAS,WAAc,OAAsC;AAC3D,SAAO,CAAC,CAAC,SAAS,OAAO,UAAU,YAAY,OAAO,YAAY;AACpE;AAkBO,UAAU,eAAkB,aAA0B,OAAiD;AAC5G,SAAO,mBAAmB,QAAQ;AAElC,aAAW,QAAQ,OAAO;AACxB,QAAI,WAAW,IAAI,GAAG;AACpB,aAAO,mBAAmB,IAAI;AAAA,IAChC,OAAO;AACL,YAAM;AAAA,IACR;AAAA,EACF;AACF;","names":[]}
@@ -0,0 +1,10 @@
1
+ // src/iteratorEvery.ts
2
+ import every from "core-js-pure/full/iterator/every";
3
+ function iteratorEvery(iterator, predicate) {
4
+ return every(iterator, predicate);
5
+ }
6
+
7
+ export {
8
+ iteratorEvery
9
+ };
10
+ //# sourceMappingURL=chunk-OWUGLCQB.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/iteratorEvery.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport every from 'core-js-pure/full/iterator/every';\n\n/**\n * Determines whether all the members of an iterator satisfy the specified test.\n *\n * @param predicate A function that accepts up to three arguments. The every method calls\n * the predicate function for each element in the iterator until the predicate returns a value\n * which is coercible to the Boolean value false, or until the end of the iterator.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorEvery<T, S extends T>(\n iterator: Iterator<T>,\n predicate: (value: T, index: number) => value is S\n): iterator is Iterator<S>;\n\n/**\n * Determines whether all the members of an iterator satisfy the specified test.\n *\n * @param predicate A function that accepts up to three arguments. The every method calls\n * the predicate function for each element in the iterator until the predicate returns a value\n * which is coercible to the Boolean value false, or until the end of the iterator.\n *\n * @param thisArg An object to which the this keyword can refer in the predicate function.\n * If thisArg is omitted, undefined is used as the this value.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorEvery<T>(iterator: Iterator<T>, predicate: (value: T, index: number) => unknown): boolean;\n\nexport function iteratorEvery<T>(iterator: Iterator<T>, predicate: (value: T, index: number) => unknown): boolean {\n return every(iterator, predicate);\n}\n"],"mappings":";AACA,OAAO,WAAW;AA8BX,SAAS,cAAiB,UAAuB,WAA0D;AAChH,SAAO,MAAM,UAAU,SAAS;AAClC;","names":[]}
@@ -0,0 +1,25 @@
1
+ import {
2
+ iteratorToIterable
3
+ } from "./chunk-MNDAEMYM.mjs";
4
+
5
+ // src/iteratorFindLastIndex.ts
6
+ function iteratorFindLastIndex(iterator, predicate, thisArg) {
7
+ let index = 0;
8
+ let lastIndex = -1;
9
+ if (typeof predicate !== "function") {
10
+ throw new TypeError(`${predicate} is not a function`);
11
+ }
12
+ const boundPredicate = predicate.bind(thisArg);
13
+ for (const value of iteratorToIterable(iterator)) {
14
+ if (boundPredicate(value, index, iterator)) {
15
+ lastIndex = index;
16
+ }
17
+ index++;
18
+ }
19
+ return lastIndex;
20
+ }
21
+
22
+ export {
23
+ iteratorFindLastIndex
24
+ };
25
+ //# sourceMappingURL=chunk-PGJSIDLV.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/iteratorFindLastIndex.ts"],"sourcesContent":["import { iteratorToIterable } from './iteratorToIterable';\n\n/**\n * Returns the index of the last element in the iterator where predicate is true, and -1\n * otherwise.\n *\n * @param predicate findLastIndex calls predicate once for each element of the iterator, in descending\n * order, until it finds one where predicate returns true. If such an element is found,\n * findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.\n *\n * @param thisArg If provided, it will be used as the this value for each invocation of\n * predicate. If it is not provided, undefined is used instead.\n */\nexport function iteratorFindLastIndex<T>(\n iterator: Iterator<T>,\n predicate: (value: T, index: number, iterator: Iterator<T>) => unknown,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n thisArg?: any\n): number {\n let index = 0;\n let lastIndex: number = -1;\n\n if (typeof predicate !== 'function') {\n throw new TypeError(`${predicate} is not a function`);\n }\n\n const boundPredicate = predicate.bind(thisArg);\n\n for (const value of iteratorToIterable(iterator)) {\n if (boundPredicate(value, index, iterator)) {\n lastIndex = index;\n }\n\n index++;\n }\n\n return lastIndex;\n}\n"],"mappings":";;;;;AAaO,SAAS,sBACd,UACA,WAEA,SACQ;AACR,MAAI,QAAQ;AACZ,MAAI,YAAoB;AAExB,MAAI,OAAO,cAAc,YAAY;AACnC,UAAM,IAAI,UAAU,GAAG,SAAS,oBAAoB;AAAA,EACtD;AAEA,QAAM,iBAAiB,UAAU,KAAK,OAAO;AAE7C,aAAW,SAAS,mBAAmB,QAAQ,GAAG;AAChD,QAAI,eAAe,OAAO,OAAO,QAAQ,GAAG;AAC1C,kBAAY;AAAA,IACd;AAEA;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
@@ -0,0 +1,10 @@
1
+ // src/iteratorFlatMap.ts
2
+ import flatMap from "core-js-pure/full/iterator/flat-map";
3
+ function iteratorFlatMap(iterable, mapperFn) {
4
+ return flatMap(iterable, mapperFn);
5
+ }
6
+
7
+ export {
8
+ iteratorFlatMap
9
+ };
10
+ //# sourceMappingURL=chunk-QX6EMOSQ.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/iteratorFlatMap.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport flatMap from 'core-js-pure/full/iterator/flat-map';\n\n/**\n * `.flatMap` takes a mapping function as an argument. It returns an iterator that produces all elements of the iterators produced by applying the mapping function to the elements produced by the underlying iterator.\n *\n * @param mapperFn\n *\n * @return Returns an iterator of flat values.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorFlatMap<T, U>(iterable: Iterable<T>, mapperFn: (value: T, index: number) => U): Iterator<T> {\n return flatMap(iterable, mapperFn);\n}\n"],"mappings":";AACA,OAAO,aAAa;AAWb,SAAS,gBAAsB,UAAuB,UAAuD;AAClH,SAAO,QAAQ,UAAU,QAAQ;AACnC;","names":[]}
@@ -0,0 +1,10 @@
1
+ // src/iteratorDrop.ts
2
+ import drop from "core-js-pure/full/iterator/drop";
3
+ function iteratorDrop(iterator, limit) {
4
+ return drop(iterator, limit);
5
+ }
6
+
7
+ export {
8
+ iteratorDrop
9
+ };
10
+ //# sourceMappingURL=chunk-R6SXIXMH.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/iteratorDrop.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport drop from 'core-js-pure/full/iterator/drop';\n\n/**\n * `drop` takes an integer as an argument. It skips the given number of elements produced by the underlying iterator before itself producing any remaining elements.\n *\n * @param limit\n *\n * @return Returns an iterator of items after the limit.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorDrop<T>(iterator: Iterator<T>, limit: number): Iterator<T> {\n return drop(iterator, limit);\n}\n"],"mappings":";AACA,OAAO,UAAU;AAWV,SAAS,aAAgB,UAAuB,OAA4B;AACjF,SAAO,KAAK,UAAU,KAAK;AAC7B;","names":[]}
@@ -0,0 +1,10 @@
1
+ // src/iteratorFilter.ts
2
+ import filter from "core-js-pure/full/iterator/filter";
3
+ function iteratorFilter(iterator, predicate) {
4
+ return filter(iterator, predicate);
5
+ }
6
+
7
+ export {
8
+ iteratorFilter
9
+ };
10
+ //# sourceMappingURL=chunk-TDHR35S7.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/iteratorFilter.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport filter from 'core-js-pure/full/iterator/filter';\n\n/**\n * Returns the elements of an iterator that meet the condition specified in a callback function.\n *\n * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the iterator.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorFilter<T, S extends T>(\n iterator: Iterator<T>,\n predicate: (value: T, index: number) => value is S\n): IterableIterator<S>;\n\n/**\n * Returns the elements of an iterator that meet the condition specified in a callback function.\n *\n * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the iterator.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorFilter<T>(\n iterator: Iterator<T>,\n predicate: (value: T, index: number) => unknown\n): IterableIterator<T>;\n\nexport function iteratorFilter<T, S extends T>(\n iterator: Iterator<T>,\n predicate: (value: T, index: number) => unknown\n): IterableIterator<S> {\n return filter(iterator, predicate);\n}\n"],"mappings":";AACA,OAAO,YAAY;AA0BZ,SAAS,eACd,UACA,WACqB;AACrB,SAAO,OAAO,UAAU,SAAS;AACnC;","names":[]}
@@ -0,0 +1,10 @@
1
+ // src/iteratorTake.ts
2
+ import take from "core-js-pure/full/iterator/take";
3
+ function iteratorTake(iterator, limit) {
4
+ return take(iterator, limit);
5
+ }
6
+
7
+ export {
8
+ iteratorTake
9
+ };
10
+ //# sourceMappingURL=chunk-VCKLUCOT.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/iteratorTake.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport take from 'core-js-pure/full/iterator/take';\n\n/**\n * `take` takes an integer as an argument. It returns an iterator that produces, at most, the given number of elements produced by the underlying iterator.\n *\n * @param limit\n *\n * @return Returns an iterator with items from the original iterator from 0 until the limit.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorTake<T>(iterator: Iterator<T>, limit: number): Iterator<T> {\n return take(iterator, limit);\n}\n"],"mappings":";AACA,OAAO,UAAU;AAWV,SAAS,aAAgB,UAAuB,OAA4B;AACjF,SAAO,KAAK,UAAU,KAAK;AAC7B;","names":[]}
@@ -0,0 +1,10 @@
1
+ // src/iteratorMap.ts
2
+ import map from "core-js-pure/full/iterator/map";
3
+ function iteratorMap(iterator, callbackfn) {
4
+ return map(iterator, callbackfn);
5
+ }
6
+
7
+ export {
8
+ iteratorMap
9
+ };
10
+ //# sourceMappingURL=chunk-XQDGXAAF.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/iteratorMap.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport map from 'core-js-pure/full/iterator/map';\n\n/**\n * Calls a defined callback function on each element of an array, and returns an array that contains the results.\n *\n * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorMap<T, U>(\n iterator: Iterator<T>,\n callbackfn: (value: T, index: number) => U\n): IterableIterator<U> {\n return map(iterator, callbackfn);\n}\n"],"mappings":";AACA,OAAO,SAAS;AAST,SAAS,YACd,UACA,YACqB;AACrB,SAAO,IAAI,UAAU,UAAU;AACjC;","names":[]}
@@ -1,9 +1,9 @@
1
- // src/iterableGetReadable.ts
1
+ // src/readableStreamFrom.ts
2
2
  function isIterable(iterable) {
3
3
  return !!(iterable && typeof iterable === "object" && Symbol.iterator in iterable);
4
4
  }
5
- function iterableGetReadable(iterable) {
6
- const iterator = isIterable(iterable) ? iterable[Symbol.iterator]() : iterable[Symbol.asyncIterator]();
5
+ function readableStreamFrom(anyIterable) {
6
+ const iterator = isIterable(anyIterable) ? anyIterable[Symbol.iterator]() : anyIterable[Symbol.asyncIterator]();
7
7
  return new ReadableStream({
8
8
  async pull(controller) {
9
9
  const result = await iterator.next();
@@ -17,6 +17,6 @@ function iterableGetReadable(iterable) {
17
17
  }
18
18
 
19
19
  export {
20
- iterableGetReadable
20
+ readableStreamFrom
21
21
  };
22
- //# sourceMappingURL=chunk-MOBXUTO5.mjs.map
22
+ //# sourceMappingURL=chunk-YJSIVBF7.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/readableStreamFrom.ts"],"sourcesContent":["function isIterable(iterable: unknown): iterable is Iterable<unknown> {\n return !!(iterable && typeof iterable === 'object' && Symbol.iterator in iterable);\n}\n\nexport function readableStreamFrom<T>(anyIterable: AsyncIterable<T> | Iterable<T>): ReadableStream<T> {\n const iterator = isIterable(anyIterable) ? anyIterable[Symbol.iterator]() : anyIterable[Symbol.asyncIterator]();\n\n return new ReadableStream({\n async pull(controller) {\n const result = await iterator.next();\n\n if (result.done) {\n controller.close();\n } else {\n controller.enqueue(result.value);\n }\n }\n });\n}\n"],"mappings":";AAAA,SAAS,WAAW,UAAkD;AACpE,SAAO,CAAC,EAAE,YAAY,OAAO,aAAa,YAAY,OAAO,YAAY;AAC3E;AAEO,SAAS,mBAAsB,aAAgE;AACpG,QAAM,WAAW,WAAW,WAAW,IAAI,YAAY,OAAO,QAAQ,EAAE,IAAI,YAAY,OAAO,aAAa,EAAE;AAE9G,SAAO,IAAI,eAAe;AAAA,IACxB,MAAM,KAAK,YAAY;AACrB,YAAM,SAAS,MAAM,SAAS,KAAK;AAEnC,UAAI,OAAO,MAAM;AACf,mBAAW,MAAM;AAAA,MACnB,OAAO;AACL,mBAAW,QAAQ,OAAO,KAAK;AAAA,MACjC;AAAA,IACF;AAAA,EACF,CAAC;AACH;","names":[]}
@@ -0,0 +1,10 @@
1
+ // src/iteratorToArray.ts
2
+ import toArray from "core-js-pure/full/iterator/to-array";
3
+ function iteratorToArray(iteratorLike) {
4
+ return toArray(iteratorLike);
5
+ }
6
+
7
+ export {
8
+ iteratorToArray
9
+ };
10
+ //# sourceMappingURL=chunk-YLERARWI.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/iteratorToArray.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport toArray from 'core-js-pure/full/iterator/to-array';\n\ntype IteratorLike<T> = Pick<Iterator<T>, 'next'>;\n\n/**\n * When you have a non-infinite iterator which you wish to transform into an array, you can do so with the builtin toArray method.\n *\n * @param limit\n *\n * @return Returns an Array containing the values from the iterator.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorToArray<T>(iteratorLike: IteratorLike<T>): T[] {\n return toArray(iteratorLike);\n}\n"],"mappings":";AACA,OAAO,aAAa;AAab,SAAS,gBAAmB,cAAoC;AACrE,SAAO,QAAQ,YAAY;AAC7B;","names":[]}
@@ -1,32 +1,37 @@
1
1
  export { CompleteFunction, ErrorFunction, NextFunction, Observable, Observer, StartFunction, SubscriberFunction, Subscription, SubscriptionObserver } from './iter-fest.observable.mjs';
2
- export { PushAsyncIterableIterator } from './iter-fest.pushAsyncIterableIterator.mjs';
3
2
  export { SymbolObservable } from './iter-fest.symbolObservable.mjs';
4
3
  export { AsyncGeneratorWithLastValue, asyncGeneratorWithLastValue } from './iter-fest.asyncGeneratorWithLastValue.mjs';
5
4
  export { asyncIteratorToAsyncIterable } from './iter-fest.asyncIteratorToAsyncIterable.mjs';
6
5
  export { GeneratorWithLastValue, generatorWithLastValue } from './iter-fest.generatorWithLastValue.mjs';
7
- export { iterableAt } from './iter-fest.iterableAt.mjs';
8
- export { iterableConcat } from './iter-fest.iterableConcat.mjs';
9
- export { iterableEntries } from './iter-fest.iterableEntries.mjs';
10
- export { iterableEvery } from './iter-fest.iterableEvery.mjs';
11
- export { iterableFilter } from './iter-fest.iterableFilter.mjs';
12
- export { iterableFind } from './iter-fest.iterableFind.mjs';
13
- export { iterableFindIndex } from './iter-fest.iterableFindIndex.mjs';
14
- export { iterableFindLast } from './iter-fest.iterableFindLast.mjs';
15
- export { iterableFindLastIndex } from './iter-fest.iterableFindLastIndex.mjs';
16
- export { iterableForEach } from './iter-fest.iterableForEach.mjs';
17
- export { iterableGetReadable } from './iter-fest.iterableGetReadable.mjs';
18
- export { iterableIncludes } from './iter-fest.iterableIncludes.mjs';
19
- export { iterableIndexOf } from './iter-fest.iterableIndexOf.mjs';
20
- export { iterableJoin } from './iter-fest.iterableJoin.mjs';
21
- export { iterableKeys } from './iter-fest.iterableKeys.mjs';
22
- export { iterableMap } from './iter-fest.iterableMap.mjs';
23
- export { iterableReduce } from './iter-fest.iterableReduce.mjs';
24
- export { iterableSlice } from './iter-fest.iterableSlice.mjs';
25
- export { iterableSome } from './iter-fest.iterableSome.mjs';
26
- export { iterableToSpliced } from './iter-fest.iterableToSpliced.mjs';
27
- export { iterableToString } from './iter-fest.iterableToString.mjs';
6
+ export { iteratorSlice } from './iter-fest.iteratorSlice.mjs';
7
+ export { IterableWritableStream } from './iter-fest.iterableWritableStream.mjs';
8
+ export { iteratorAt } from './iter-fest.iteratorAt.mjs';
9
+ export { iteratorConcat } from './iter-fest.iteratorConcat.mjs';
10
+ export { iteratorDrop } from './iter-fest.iteratorDrop.mjs';
11
+ export { iteratorEntries } from './iter-fest.iteratorEntries.mjs';
12
+ export { iteratorEvery } from './iter-fest.iteratorEvery.mjs';
13
+ export { iteratorFilter } from './iter-fest.iteratorFilter.mjs';
14
+ export { iteratorFind } from './iter-fest.iteratorFind.mjs';
15
+ export { iteratorFindIndex } from './iter-fest.iteratorFindIndex.mjs';
16
+ export { iteratorFindLast } from './iter-fest.iteratorFindLast.mjs';
17
+ export { iteratorFindLastIndex } from './iter-fest.iteratorFindLastIndex.mjs';
18
+ export { iteratorFlatMap } from './iter-fest.iteratorFlatMap.mjs';
19
+ export { iteratorForEach } from './iter-fest.iteratorForEach.mjs';
20
+ export { iteratorFrom } from './iter-fest.iteratorFrom.mjs';
21
+ export { iteratorIncludes } from './iter-fest.iteratorIncludes.mjs';
22
+ export { iteratorIndexOf } from './iter-fest.iteratorIndexOf.mjs';
23
+ export { iteratorJoin } from './iter-fest.iteratorJoin.mjs';
24
+ export { iteratorKeys } from './iter-fest.iteratorKeys.mjs';
25
+ export { iteratorMap } from './iter-fest.iteratorMap.mjs';
26
+ export { iteratorReduce } from './iter-fest.iteratorReduce.mjs';
27
+ export { iteratorSome } from './iter-fest.iteratorSome.mjs';
28
+ export { iteratorTake } from './iter-fest.iteratorTake.mjs';
29
+ export { iteratorToArray } from './iter-fest.iteratorToArray.mjs';
28
30
  export { iteratorToIterable } from './iter-fest.iteratorToIterable.mjs';
31
+ export { iteratorToSpliced } from './iter-fest.iteratorToSpliced.mjs';
32
+ export { iteratorToString } from './iter-fest.iteratorToString.mjs';
29
33
  export { observableFromAsync } from './iter-fest.observableFromAsync.mjs';
30
34
  export { observableSubscribeAsReadable } from './iter-fest.observableSubscribeAsReadable.mjs';
35
+ export { readableStreamFrom } from './iter-fest.readableStreamFrom.mjs';
31
36
  export { readerValues } from './iter-fest.readerValues.mjs';
32
37
  import 'core-js-pure/full/observable';
@@ -1,32 +1,37 @@
1
1
  export { CompleteFunction, ErrorFunction, NextFunction, Observable, Observer, StartFunction, SubscriberFunction, Subscription, SubscriptionObserver } from './iter-fest.observable.js';
2
- export { PushAsyncIterableIterator } from './iter-fest.pushAsyncIterableIterator.js';
3
2
  export { SymbolObservable } from './iter-fest.symbolObservable.js';
4
3
  export { AsyncGeneratorWithLastValue, asyncGeneratorWithLastValue } from './iter-fest.asyncGeneratorWithLastValue.js';
5
4
  export { asyncIteratorToAsyncIterable } from './iter-fest.asyncIteratorToAsyncIterable.js';
6
5
  export { GeneratorWithLastValue, generatorWithLastValue } from './iter-fest.generatorWithLastValue.js';
7
- export { iterableAt } from './iter-fest.iterableAt.js';
8
- export { iterableConcat } from './iter-fest.iterableConcat.js';
9
- export { iterableEntries } from './iter-fest.iterableEntries.js';
10
- export { iterableEvery } from './iter-fest.iterableEvery.js';
11
- export { iterableFilter } from './iter-fest.iterableFilter.js';
12
- export { iterableFind } from './iter-fest.iterableFind.js';
13
- export { iterableFindIndex } from './iter-fest.iterableFindIndex.js';
14
- export { iterableFindLast } from './iter-fest.iterableFindLast.js';
15
- export { iterableFindLastIndex } from './iter-fest.iterableFindLastIndex.js';
16
- export { iterableForEach } from './iter-fest.iterableForEach.js';
17
- export { iterableGetReadable } from './iter-fest.iterableGetReadable.js';
18
- export { iterableIncludes } from './iter-fest.iterableIncludes.js';
19
- export { iterableIndexOf } from './iter-fest.iterableIndexOf.js';
20
- export { iterableJoin } from './iter-fest.iterableJoin.js';
21
- export { iterableKeys } from './iter-fest.iterableKeys.js';
22
- export { iterableMap } from './iter-fest.iterableMap.js';
23
- export { iterableReduce } from './iter-fest.iterableReduce.js';
24
- export { iterableSlice } from './iter-fest.iterableSlice.js';
25
- export { iterableSome } from './iter-fest.iterableSome.js';
26
- export { iterableToSpliced } from './iter-fest.iterableToSpliced.js';
27
- export { iterableToString } from './iter-fest.iterableToString.js';
6
+ export { iteratorSlice } from './iter-fest.iteratorSlice.js';
7
+ export { IterableWritableStream } from './iter-fest.iterableWritableStream.js';
8
+ export { iteratorAt } from './iter-fest.iteratorAt.js';
9
+ export { iteratorConcat } from './iter-fest.iteratorConcat.js';
10
+ export { iteratorDrop } from './iter-fest.iteratorDrop.js';
11
+ export { iteratorEntries } from './iter-fest.iteratorEntries.js';
12
+ export { iteratorEvery } from './iter-fest.iteratorEvery.js';
13
+ export { iteratorFilter } from './iter-fest.iteratorFilter.js';
14
+ export { iteratorFind } from './iter-fest.iteratorFind.js';
15
+ export { iteratorFindIndex } from './iter-fest.iteratorFindIndex.js';
16
+ export { iteratorFindLast } from './iter-fest.iteratorFindLast.js';
17
+ export { iteratorFindLastIndex } from './iter-fest.iteratorFindLastIndex.js';
18
+ export { iteratorFlatMap } from './iter-fest.iteratorFlatMap.js';
19
+ export { iteratorForEach } from './iter-fest.iteratorForEach.js';
20
+ export { iteratorFrom } from './iter-fest.iteratorFrom.js';
21
+ export { iteratorIncludes } from './iter-fest.iteratorIncludes.js';
22
+ export { iteratorIndexOf } from './iter-fest.iteratorIndexOf.js';
23
+ export { iteratorJoin } from './iter-fest.iteratorJoin.js';
24
+ export { iteratorKeys } from './iter-fest.iteratorKeys.js';
25
+ export { iteratorMap } from './iter-fest.iteratorMap.js';
26
+ export { iteratorReduce } from './iter-fest.iteratorReduce.js';
27
+ export { iteratorSome } from './iter-fest.iteratorSome.js';
28
+ export { iteratorTake } from './iter-fest.iteratorTake.js';
29
+ export { iteratorToArray } from './iter-fest.iteratorToArray.js';
28
30
  export { iteratorToIterable } from './iter-fest.iteratorToIterable.js';
31
+ export { iteratorToSpliced } from './iter-fest.iteratorToSpliced.js';
32
+ export { iteratorToString } from './iter-fest.iteratorToString.js';
29
33
  export { observableFromAsync } from './iter-fest.observableFromAsync.js';
30
34
  export { observableSubscribeAsReadable } from './iter-fest.observableSubscribeAsReadable.js';
35
+ export { readableStreamFrom } from './iter-fest.readableStreamFrom.js';
31
36
  export { readerValues } from './iter-fest.readerValues.js';
32
37
  import 'core-js-pure/full/observable';
@@ -0,0 +1,7 @@
1
+ declare class IterableWritableStream<T> extends WritableStream<T> {
2
+ #private;
3
+ constructor();
4
+ [Symbol.asyncIterator](): AsyncIterator<T>;
5
+ }
6
+
7
+ export { IterableWritableStream };
@@ -0,0 +1,7 @@
1
+ declare class IterableWritableStream<T> extends WritableStream<T> {
2
+ #private;
3
+ constructor();
4
+ [Symbol.asyncIterator](): AsyncIterator<T>;
5
+ }
6
+
7
+ export { IterableWritableStream };
@@ -27,12 +27,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
 
30
- // src/PushAsyncIterableIterator.ts
31
- var PushAsyncIterableIterator_exports = {};
32
- __export(PushAsyncIterableIterator_exports, {
33
- PushAsyncIterableIterator: () => PushAsyncIterableIterator
30
+ // src/iterableWritableStream.ts
31
+ var iterableWritableStream_exports = {};
32
+ __export(iterableWritableStream_exports, {
33
+ IterableWritableStream: () => IterableWritableStream
34
34
  });
35
- module.exports = __toCommonJS(PushAsyncIterableIterator_exports);
35
+ module.exports = __toCommonJS(iterableWritableStream_exports);
36
36
 
37
37
  // src/private/withResolvers.ts
38
38
  var import_with_resolvers = __toESM(require("core-js-pure/full/promise/with-resolvers"));
@@ -40,34 +40,43 @@ function withResolvers() {
40
40
  return (0, import_with_resolvers.default)();
41
41
  }
42
42
 
43
- // src/PushAsyncIterableIterator.ts
44
- var CLOSE = Symbol("close");
45
- var PushAsyncIterableIterator = class {
46
- #closed = false;
47
- #pushResolvers = withResolvers();
48
- [Symbol.asyncIterator]() {
49
- return this;
50
- }
51
- close() {
52
- this.#closed = true;
53
- this.#pushResolvers.resolve(CLOSE);
43
+ // src/iterableWritableStream.ts
44
+ var CLOSE = Symbol();
45
+ var IterableWritableStream = class extends WritableStream {
46
+ constructor() {
47
+ super({
48
+ close: () => {
49
+ this.#buffer.push(CLOSE);
50
+ this.#writeResolvers.resolve();
51
+ },
52
+ write: (chunk) => {
53
+ this.#buffer.push(chunk);
54
+ this.#writeResolvers.resolve();
55
+ this.#writeResolvers = withResolvers();
56
+ }
57
+ });
54
58
  }
55
- async next() {
56
- const value = await this.#pushResolvers.promise;
57
- if (value === CLOSE) {
58
- return { done: true, value: void 0 };
59
- }
60
- return { done: false, value };
61
- }
62
- push(value) {
63
- if (!this.#closed) {
64
- this.#pushResolvers.resolve(value);
65
- this.#pushResolvers = withResolvers();
66
- }
59
+ #buffer = [];
60
+ #writeResolvers = withResolvers();
61
+ [Symbol.asyncIterator]() {
62
+ return {
63
+ next: async () => {
64
+ while (!this.#buffer.length) {
65
+ await this.#writeResolvers.promise;
66
+ }
67
+ const value = this.#buffer[0];
68
+ if (value === CLOSE) {
69
+ return { done: true, value: void 0 };
70
+ }
71
+ this.#buffer.shift();
72
+ await void 0;
73
+ return { done: false, value };
74
+ }
75
+ };
67
76
  }
68
77
  };
69
78
  // Annotate the CommonJS export names for ESM import in node:
70
79
  0 && (module.exports = {
71
- PushAsyncIterableIterator
80
+ IterableWritableStream
72
81
  });
73
- //# sourceMappingURL=iter-fest.pushAsyncIterableIterator.js.map
82
+ //# sourceMappingURL=iter-fest.iterableWritableStream.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/iterableWritableStream.ts","../src/private/withResolvers.ts"],"sourcesContent":["import withResolvers from './private/withResolvers';\n\nconst CLOSE = Symbol();\n\nexport class IterableWritableStream<T> extends WritableStream<T> {\n constructor() {\n super({\n close: () => {\n this.#buffer.push(CLOSE);\n this.#writeResolvers.resolve();\n },\n write: (chunk: T) => {\n this.#buffer.push(chunk);\n this.#writeResolvers.resolve();\n this.#writeResolvers = withResolvers();\n }\n });\n }\n\n #buffer: (T | typeof CLOSE)[] = [];\n #writeResolvers: PromiseWithResolvers<void> = withResolvers();\n\n [Symbol.asyncIterator](): AsyncIterator<T> {\n return {\n next: async () => {\n while (!this.#buffer.length) {\n await this.#writeResolvers.promise;\n }\n\n const value = this.#buffer[0] as T | typeof CLOSE;\n\n if (value === CLOSE) {\n return { done: true, value: undefined };\n }\n\n // If it is not CLOSE, remove it from the queue.\n this.#buffer.shift();\n\n // Idle here so concurrent iteration has a chance to pick up the next value in a round robin fashion.\n await undefined;\n\n return { done: false, value };\n }\n };\n }\n}\n","// @ts-expect-error \"core-js\" is not typed.\nimport coreJSPromiseWithResolvers from 'core-js-pure/full/promise/with-resolvers';\n\nexport default function withResolvers<T>(): PromiseWithResolvers<T> {\n return coreJSPromiseWithResolvers();\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,4BAAuC;AAExB,SAAR,gBAA6D;AAClE,aAAO,sBAAAA,SAA2B;AACpC;;;ADHA,IAAM,QAAQ,OAAO;AAEd,IAAM,yBAAN,cAAwC,eAAkB;AAAA,EAC/D,cAAc;AACZ,UAAM;AAAA,MACJ,OAAO,MAAM;AACX,aAAK,QAAQ,KAAK,KAAK;AACvB,aAAK,gBAAgB,QAAQ;AAAA,MAC/B;AAAA,MACA,OAAO,CAAC,UAAa;AACnB,aAAK,QAAQ,KAAK,KAAK;AACvB,aAAK,gBAAgB,QAAQ;AAC7B,aAAK,kBAAkB,cAAc;AAAA,MACvC;AAAA,IACF,CAAC;AAAA,EACH;AAAA,EAEA,UAAgC,CAAC;AAAA,EACjC,kBAA8C,cAAc;AAAA,EAE5D,CAAC,OAAO,aAAa,IAAsB;AACzC,WAAO;AAAA,MACL,MAAM,YAAY;AAChB,eAAO,CAAC,KAAK,QAAQ,QAAQ;AAC3B,gBAAM,KAAK,gBAAgB;AAAA,QAC7B;AAEA,cAAM,QAAQ,KAAK,QAAQ,CAAC;AAE5B,YAAI,UAAU,OAAO;AACnB,iBAAO,EAAE,MAAM,MAAM,OAAO,OAAU;AAAA,QACxC;AAGA,aAAK,QAAQ,MAAM;AAGnB,cAAM;AAEN,eAAO,EAAE,MAAM,OAAO,MAAM;AAAA,MAC9B;AAAA,IACF;AAAA,EACF;AACF;","names":["coreJSPromiseWithResolvers"]}
@@ -0,0 +1,7 @@
1
+ import {
2
+ IterableWritableStream
3
+ } from "./chunk-BWMXKULC.mjs";
4
+ export {
5
+ IterableWritableStream
6
+ };
7
+ //# sourceMappingURL=iter-fest.iterableWritableStream.mjs.map
@@ -3,6 +3,6 @@
3
3
  *
4
4
  * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
5
5
  */
6
- declare function iterableAt<T>(iterable: Iterable<T>, index: number): T | undefined;
6
+ declare function iteratorAt<T>(iterator: Iterator<T>, index: number): T | undefined;
7
7
 
8
- export { iterableAt };
8
+ export { iteratorAt };
@@ -3,6 +3,6 @@
3
3
  *
4
4
  * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
5
5
  */
6
- declare function iterableAt<T>(iterable: Iterable<T>, index: number): T | undefined;
6
+ declare function iteratorAt<T>(iterator: Iterator<T>, index: number): T | undefined;
7
7
 
8
- export { iterableAt };
8
+ export { iteratorAt };
@@ -17,12 +17,23 @@ var __copyProps = (to, from, except, desc) => {
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
 
20
- // src/iterableAt.ts
21
- var iterableAt_exports = {};
22
- __export(iterableAt_exports, {
23
- iterableAt: () => iterableAt
20
+ // src/iteratorAt.ts
21
+ var iteratorAt_exports = {};
22
+ __export(iteratorAt_exports, {
23
+ iteratorAt: () => iteratorAt
24
24
  });
25
- module.exports = __toCommonJS(iterableAt_exports);
25
+ module.exports = __toCommonJS(iteratorAt_exports);
26
+
27
+ // src/iteratorToIterable.ts
28
+ function iteratorToIterable(iterator) {
29
+ const iterableIterator = {
30
+ [Symbol.iterator]: () => iterableIterator,
31
+ next: iterator.next.bind(iterator),
32
+ ...iterator.return ? { return: iterator.return.bind(iterator) } : {},
33
+ ...iterator.throw ? { throw: iterator.throw.bind(iterator) } : {}
34
+ };
35
+ return iterableIterator;
36
+ }
26
37
 
27
38
  // src/private/toIntegerOrInfinity.ts
28
39
  function toIntegerOrInfinity(value) {
@@ -32,8 +43,8 @@ function toIntegerOrInfinity(value) {
32
43
  return ~~value;
33
44
  }
34
45
 
35
- // src/iterableAt.ts
36
- function iterableAt(iterable, index) {
46
+ // src/iteratorAt.ts
47
+ function iteratorAt(iterator, index) {
37
48
  let currentIndex = 0;
38
49
  index = toIntegerOrInfinity(index);
39
50
  if (!isFinite(index)) {
@@ -42,7 +53,7 @@ function iterableAt(iterable, index) {
42
53
  if (index < 0) {
43
54
  throw new TypeError("index cannot be a negative finite number");
44
55
  }
45
- for (const value of iterable) {
56
+ for (const value of iteratorToIterable(iterator)) {
46
57
  if (currentIndex++ === index) {
47
58
  return value;
48
59
  }
@@ -51,6 +62,6 @@ function iterableAt(iterable, index) {
51
62
  }
52
63
  // Annotate the CommonJS export names for ESM import in node:
53
64
  0 && (module.exports = {
54
- iterableAt
65
+ iteratorAt
55
66
  });
56
- //# sourceMappingURL=iter-fest.iterableAt.js.map
67
+ //# sourceMappingURL=iter-fest.iteratorAt.js.map