iter-fest 0.1.1-main.540eb2b → 0.1.1-main.57b2094
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.
- package/README.md +230 -26
- package/dist/chunk-2DE3J4J7.mjs +35 -0
- package/dist/chunk-2DE3J4J7.mjs.map +1 -0
- package/dist/chunk-3S6LCGE6.mjs +10 -0
- package/dist/chunk-3S6LCGE6.mjs.map +1 -0
- package/dist/{chunk-UIEKIMLW.mjs → chunk-AN54W42O.mjs} +8 -5
- package/dist/chunk-AN54W42O.mjs.map +1 -0
- package/dist/chunk-ANRVAYLW.mjs +35 -0
- package/dist/chunk-ANRVAYLW.mjs.map +1 -0
- package/dist/chunk-BSAPKNNZ.mjs +16 -0
- package/dist/chunk-BSAPKNNZ.mjs.map +1 -0
- package/dist/chunk-BWMXKULC.mjs +46 -0
- package/dist/chunk-BWMXKULC.mjs.map +1 -0
- package/dist/chunk-CNCNQPK3.mjs +16 -0
- package/dist/chunk-CNCNQPK3.mjs.map +1 -0
- package/dist/chunk-EIIP7YWB.mjs +27 -0
- package/dist/chunk-EIIP7YWB.mjs.map +1 -0
- package/dist/{chunk-KONB7TV6.mjs → chunk-EQZQP6GW.mjs} +8 -5
- package/dist/chunk-EQZQP6GW.mjs.map +1 -0
- package/dist/chunk-EUVK4YM7.mjs +25 -0
- package/dist/chunk-EUVK4YM7.mjs.map +1 -0
- package/dist/chunk-FBST4AUL.mjs +10 -0
- package/dist/chunk-FBST4AUL.mjs.map +1 -0
- package/dist/chunk-FEEBFWAI.mjs +24 -0
- package/dist/chunk-FEEBFWAI.mjs.map +1 -0
- package/dist/chunk-FEOLYD5R.mjs +31 -0
- package/dist/chunk-FEOLYD5R.mjs.map +1 -0
- package/dist/chunk-FMIHIL6A.mjs +10 -0
- package/dist/chunk-FMIHIL6A.mjs.map +1 -0
- package/dist/{chunk-27NJVC7K.mjs → chunk-H27CTQGV.mjs} +8 -5
- package/dist/chunk-H27CTQGV.mjs.map +1 -0
- package/dist/{chunk-MDBK7ND5.mjs → chunk-H5ARVU55.mjs} +8 -5
- package/dist/chunk-H5ARVU55.mjs.map +1 -0
- package/dist/{chunk-WKIRSZXX.mjs → chunk-IZXDQ25M.mjs} +8 -5
- package/dist/chunk-IZXDQ25M.mjs.map +1 -0
- package/dist/chunk-KYMTQJIJ.mjs +10 -0
- package/dist/chunk-KYMTQJIJ.mjs.map +1 -0
- package/dist/chunk-LIMQXDFK.mjs +10 -0
- package/dist/chunk-LIMQXDFK.mjs.map +1 -0
- package/dist/chunk-MO7HMLOZ.mjs +24 -0
- package/dist/chunk-MO7HMLOZ.mjs.map +1 -0
- package/dist/chunk-MYSNSDM7.mjs +13 -0
- package/dist/chunk-MYSNSDM7.mjs.map +1 -0
- package/dist/chunk-NZRXO7EY.mjs +24 -0
- package/dist/chunk-NZRXO7EY.mjs.map +1 -0
- package/dist/chunk-OCK7PKGO.mjs +23 -0
- package/dist/chunk-OCK7PKGO.mjs.map +1 -0
- package/dist/chunk-OJMT4K3R.mjs +8 -0
- package/dist/chunk-OJMT4K3R.mjs.map +1 -0
- package/dist/chunk-OWUGLCQB.mjs +10 -0
- package/dist/chunk-OWUGLCQB.mjs.map +1 -0
- package/dist/chunk-P4OSZLEH.mjs +15 -0
- package/dist/chunk-P4OSZLEH.mjs.map +1 -0
- package/dist/chunk-PGJSIDLV.mjs +25 -0
- package/dist/chunk-PGJSIDLV.mjs.map +1 -0
- package/dist/chunk-QX6EMOSQ.mjs +10 -0
- package/dist/chunk-QX6EMOSQ.mjs.map +1 -0
- package/dist/chunk-R6SXIXMH.mjs +10 -0
- package/dist/chunk-R6SXIXMH.mjs.map +1 -0
- package/dist/chunk-TDHR35S7.mjs +10 -0
- package/dist/chunk-TDHR35S7.mjs.map +1 -0
- package/dist/chunk-VCKLUCOT.mjs +10 -0
- package/dist/chunk-VCKLUCOT.mjs.map +1 -0
- package/dist/chunk-VLF6DI2U.mjs +30 -0
- package/dist/chunk-VLF6DI2U.mjs.map +1 -0
- package/dist/chunk-XQDGXAAF.mjs +10 -0
- package/dist/chunk-XQDGXAAF.mjs.map +1 -0
- package/dist/chunk-YJSIVBF7.mjs +22 -0
- package/dist/chunk-YJSIVBF7.mjs.map +1 -0
- package/dist/chunk-YLERARWI.mjs +10 -0
- package/dist/chunk-YLERARWI.mjs.map +1 -0
- package/dist/iter-fest.asyncGeneratorWithLastValue.d.mts +6 -0
- package/dist/iter-fest.asyncGeneratorWithLastValue.d.ts +6 -0
- package/dist/iter-fest.asyncGeneratorWithLastValue.js +59 -0
- package/dist/iter-fest.asyncGeneratorWithLastValue.js.map +1 -0
- package/dist/iter-fest.asyncGeneratorWithLastValue.mjs +7 -0
- package/dist/iter-fest.asyncIteratorToAsyncIterable.d.mts +3 -0
- package/dist/iter-fest.asyncIteratorToAsyncIterable.d.ts +3 -0
- package/dist/{iter-fest.iterableConcat.js → iter-fest.asyncIteratorToAsyncIterable.js} +15 -16
- package/dist/iter-fest.asyncIteratorToAsyncIterable.js.map +1 -0
- package/dist/iter-fest.asyncIteratorToAsyncIterable.mjs +7 -0
- package/dist/iter-fest.d.mts +36 -20
- package/dist/iter-fest.d.ts +36 -20
- package/dist/iter-fest.generatorWithLastValue.d.mts +6 -0
- package/dist/iter-fest.generatorWithLastValue.d.ts +6 -0
- package/dist/iter-fest.generatorWithLastValue.js +59 -0
- package/dist/iter-fest.generatorWithLastValue.js.map +1 -0
- package/dist/iter-fest.generatorWithLastValue.mjs +7 -0
- package/dist/iter-fest.iterableWritableStream.d.mts +7 -0
- package/dist/iter-fest.iterableWritableStream.d.ts +7 -0
- package/dist/iter-fest.iterableWritableStream.js +82 -0
- package/dist/iter-fest.iterableWritableStream.js.map +1 -0
- package/dist/iter-fest.iterableWritableStream.mjs +7 -0
- package/dist/{iter-fest.iterableAt.d.ts → iter-fest.iteratorAt.d.mts} +2 -2
- package/dist/{iter-fest.iterableAt.d.mts → iter-fest.iteratorAt.d.ts} +2 -2
- package/dist/{iter-fest.iterableAt.js → iter-fest.iteratorAt.js} +21 -10
- package/dist/iter-fest.iteratorAt.js.map +1 -0
- package/dist/iter-fest.iteratorAt.mjs +9 -0
- package/dist/iter-fest.iteratorConcat.d.mts +16 -0
- package/dist/iter-fest.iteratorConcat.d.ts +16 -0
- package/dist/iter-fest.iteratorConcat.js +56 -0
- package/dist/iter-fest.iteratorConcat.js.map +1 -0
- package/dist/iter-fest.iteratorConcat.mjs +8 -0
- package/dist/iter-fest.iteratorDrop.d.mts +12 -0
- package/dist/iter-fest.iteratorDrop.d.ts +12 -0
- package/dist/iter-fest.iteratorDrop.js +44 -0
- package/dist/iter-fest.iteratorDrop.js.map +1 -0
- package/dist/iter-fest.iteratorDrop.mjs +7 -0
- package/dist/iter-fest.iteratorEntries.d.mts +6 -0
- package/dist/iter-fest.iteratorEntries.d.ts +6 -0
- package/dist/{iter-fest.iterableEntries.js → iter-fest.iteratorEntries.js} +22 -9
- package/dist/iter-fest.iteratorEntries.js.map +1 -0
- package/dist/iter-fest.iteratorEntries.mjs +8 -0
- package/dist/iter-fest.iteratorEvery.d.mts +25 -0
- package/dist/iter-fest.iteratorEvery.d.ts +25 -0
- package/dist/iter-fest.iteratorEvery.js +44 -0
- package/dist/iter-fest.iteratorEvery.js.map +1 -0
- package/dist/iter-fest.iteratorEvery.mjs +7 -0
- package/dist/iter-fest.iteratorFilter.d.mts +18 -0
- package/dist/iter-fest.iteratorFilter.d.ts +18 -0
- package/dist/iter-fest.iteratorFilter.js +44 -0
- package/dist/iter-fest.iteratorFilter.js.map +1 -0
- package/dist/iter-fest.iteratorFilter.mjs +7 -0
- package/dist/iter-fest.iteratorFind.d.mts +14 -0
- package/dist/iter-fest.iteratorFind.d.ts +14 -0
- package/dist/iter-fest.iteratorFind.js +44 -0
- package/dist/iter-fest.iteratorFind.js.map +1 -0
- package/dist/iter-fest.iteratorFind.mjs +7 -0
- package/dist/{iter-fest.iterableFindIndex.d.mts → iter-fest.iteratorFindIndex.d.mts} +4 -4
- package/dist/{iter-fest.iterableFindIndex.d.ts → iter-fest.iteratorFindIndex.d.ts} +4 -4
- package/dist/{iter-fest.iterableFindIndex.js → iter-fest.iteratorFindIndex.js} +23 -10
- package/dist/iter-fest.iteratorFindIndex.js.map +1 -0
- package/dist/iter-fest.iteratorFindIndex.mjs +8 -0
- package/dist/{iter-fest.iterableFindLast.d.mts → iter-fest.iteratorFindLast.d.mts} +5 -5
- package/dist/{iter-fest.iterableFindLast.d.ts → iter-fest.iteratorFindLast.d.ts} +5 -5
- package/dist/{iter-fest.iterableFindLast.js → iter-fest.iteratorFindLast.js} +23 -10
- package/dist/iter-fest.iteratorFindLast.js.map +1 -0
- package/dist/iter-fest.iteratorFindLast.mjs +8 -0
- package/dist/{iter-fest.iterableFindLastIndex.d.mts → iter-fest.iteratorFindLastIndex.d.mts} +4 -4
- package/dist/{iter-fest.iterableFindLastIndex.d.ts → iter-fest.iteratorFindLastIndex.d.ts} +4 -4
- package/dist/{iter-fest.iterableFindLastIndex.js → iter-fest.iteratorFindLastIndex.js} +23 -10
- package/dist/iter-fest.iteratorFindLastIndex.js.map +1 -0
- package/dist/iter-fest.iteratorFindLastIndex.mjs +8 -0
- package/dist/iter-fest.iteratorFlatMap.d.mts +12 -0
- package/dist/iter-fest.iteratorFlatMap.d.ts +12 -0
- package/dist/iter-fest.iteratorFlatMap.js +44 -0
- package/dist/iter-fest.iteratorFlatMap.js.map +1 -0
- package/dist/iter-fest.iteratorFlatMap.mjs +7 -0
- package/dist/iter-fest.iteratorForEach.d.mts +10 -0
- package/dist/iter-fest.iteratorForEach.d.ts +10 -0
- package/dist/iter-fest.iteratorForEach.js +44 -0
- package/dist/iter-fest.iteratorForEach.js.map +1 -0
- package/dist/iter-fest.iteratorForEach.mjs +7 -0
- package/dist/iter-fest.iteratorFrom.d.mts +12 -0
- package/dist/iter-fest.iteratorFrom.d.ts +12 -0
- package/dist/iter-fest.iteratorFrom.js +44 -0
- package/dist/iter-fest.iteratorFrom.js.map +1 -0
- package/dist/iter-fest.iteratorFrom.mjs +7 -0
- package/dist/iter-fest.iteratorIncludes.d.mts +9 -0
- package/dist/iter-fest.iteratorIncludes.d.ts +9 -0
- package/dist/{iter-fest.iterableIncludes.js → iter-fest.iteratorIncludes.js} +21 -10
- package/dist/iter-fest.iteratorIncludes.js.map +1 -0
- package/dist/iter-fest.iteratorIncludes.mjs +9 -0
- package/dist/iter-fest.iteratorIndexOf.d.mts +9 -0
- package/dist/iter-fest.iteratorIndexOf.d.ts +9 -0
- package/dist/{iter-fest.iterableIndexOf.js → iter-fest.iteratorIndexOf.js} +21 -10
- package/dist/iter-fest.iteratorIndexOf.js.map +1 -0
- package/dist/iter-fest.iteratorIndexOf.mjs +9 -0
- package/dist/iter-fest.iteratorJoin.d.mts +8 -0
- package/dist/iter-fest.iteratorJoin.d.ts +8 -0
- package/dist/{iter-fest.iterableToString.js → iter-fest.iteratorJoin.js} +21 -15
- package/dist/iter-fest.iteratorJoin.js.map +1 -0
- package/dist/iter-fest.iteratorJoin.mjs +8 -0
- package/dist/iter-fest.iteratorKeys.d.mts +6 -0
- package/dist/iter-fest.iteratorKeys.d.ts +6 -0
- package/dist/{iter-fest.iterableKeys.js → iter-fest.iteratorKeys.js} +22 -9
- package/dist/iter-fest.iteratorKeys.js.map +1 -0
- package/dist/iter-fest.iteratorKeys.mjs +8 -0
- package/dist/iter-fest.iteratorKeys.mjs.map +1 -0
- package/dist/iter-fest.iteratorMap.d.mts +10 -0
- package/dist/iter-fest.iteratorMap.d.ts +10 -0
- package/dist/iter-fest.iteratorMap.js +44 -0
- package/dist/iter-fest.iteratorMap.js.map +1 -0
- package/dist/iter-fest.iteratorMap.mjs +7 -0
- package/dist/iter-fest.iteratorMap.mjs.map +1 -0
- package/dist/{iter-fest.iterableReduce.d.mts → iter-fest.iteratorReduce.d.mts} +13 -9
- package/dist/{iter-fest.iterableReduce.d.ts → iter-fest.iteratorReduce.d.ts} +13 -9
- package/dist/iter-fest.iteratorReduce.js +44 -0
- package/dist/iter-fest.iteratorReduce.js.map +1 -0
- package/dist/iter-fest.iteratorReduce.mjs +7 -0
- package/dist/iter-fest.iteratorReduce.mjs.map +1 -0
- package/dist/{iter-fest.iterableSlice.d.mts → iter-fest.iteratorSlice.d.mts} +8 -8
- package/dist/{iter-fest.iterableSlice.d.ts → iter-fest.iteratorSlice.d.ts} +8 -8
- package/dist/{iter-fest.iterableSlice.js → iter-fest.iteratorSlice.js} +21 -10
- package/dist/iter-fest.iteratorSlice.js.map +1 -0
- package/dist/iter-fest.iteratorSlice.mjs +9 -0
- package/dist/iter-fest.iteratorSlice.mjs.map +1 -0
- package/dist/iter-fest.iteratorSome.d.mts +10 -0
- package/dist/iter-fest.iteratorSome.d.ts +10 -0
- package/dist/iter-fest.iteratorSome.js +44 -0
- package/dist/iter-fest.iteratorSome.js.map +1 -0
- package/dist/iter-fest.iteratorSome.mjs +7 -0
- package/dist/iter-fest.iteratorSome.mjs.map +1 -0
- package/dist/iter-fest.iteratorTake.d.mts +12 -0
- package/dist/iter-fest.iteratorTake.d.ts +12 -0
- package/dist/iter-fest.iteratorTake.js +44 -0
- package/dist/iter-fest.iteratorTake.js.map +1 -0
- package/dist/iter-fest.iteratorTake.mjs +7 -0
- package/dist/iter-fest.iteratorTake.mjs.map +1 -0
- package/dist/iter-fest.iteratorToArray.d.mts +13 -0
- package/dist/iter-fest.iteratorToArray.d.ts +13 -0
- package/dist/iter-fest.iteratorToArray.js +44 -0
- package/dist/iter-fest.iteratorToArray.js.map +1 -0
- package/dist/iter-fest.iteratorToArray.mjs +7 -0
- package/dist/iter-fest.iteratorToArray.mjs.map +1 -0
- package/dist/{iter-fest.iterableToSpliced.d.mts → iter-fest.iteratorToSpliced.d.mts} +3 -3
- package/dist/{iter-fest.iterableToSpliced.d.ts → iter-fest.iteratorToSpliced.d.ts} +3 -3
- package/dist/{iter-fest.iterableToSpliced.js → iter-fest.iteratorToSpliced.js} +21 -10
- package/dist/iter-fest.iteratorToSpliced.js.map +1 -0
- package/dist/iter-fest.iteratorToSpliced.mjs +9 -0
- package/dist/iter-fest.iteratorToSpliced.mjs.map +1 -0
- package/dist/iter-fest.iteratorToString.d.mts +6 -0
- package/dist/iter-fest.iteratorToString.d.ts +6 -0
- package/dist/{iter-fest.iterableJoin.js → iter-fest.iteratorToString.js} +27 -9
- package/dist/iter-fest.iteratorToString.js.map +1 -0
- package/dist/iter-fest.iteratorToString.mjs +9 -0
- package/dist/iter-fest.iteratorToString.mjs.map +1 -0
- package/dist/iter-fest.js +449 -201
- package/dist/iter-fest.js.map +1 -1
- package/dist/iter-fest.mjs +124 -64
- package/dist/iter-fest.observable.d.mts +51 -0
- package/dist/iter-fest.observable.d.ts +51 -0
- package/dist/iter-fest.observable.js +66 -0
- package/dist/iter-fest.observable.js.map +1 -0
- package/dist/iter-fest.observable.mjs +8 -0
- package/dist/iter-fest.observable.mjs.map +1 -0
- package/dist/iter-fest.observableFromAsync.d.mts +7 -0
- package/dist/iter-fest.observableFromAsync.d.ts +7 -0
- package/dist/iter-fest.observableFromAsync.js +91 -0
- package/dist/iter-fest.observableFromAsync.js.map +1 -0
- package/dist/iter-fest.observableFromAsync.mjs +9 -0
- package/dist/iter-fest.observableFromAsync.mjs.map +1 -0
- package/dist/iter-fest.observableSubscribeAsReadable.d.mts +7 -0
- package/dist/iter-fest.observableSubscribeAsReadable.d.ts +7 -0
- package/dist/iter-fest.observableSubscribeAsReadable.js +51 -0
- package/dist/iter-fest.observableSubscribeAsReadable.js.map +1 -0
- package/dist/iter-fest.observableSubscribeAsReadable.mjs +7 -0
- package/dist/iter-fest.observableSubscribeAsReadable.mjs.map +1 -0
- package/dist/iter-fest.readableStreamFrom.d.mts +3 -0
- package/dist/iter-fest.readableStreamFrom.d.ts +3 -0
- package/dist/{iter-fest.iterableEvery.js → iter-fest.readableStreamFrom.js} +21 -18
- package/dist/iter-fest.readableStreamFrom.js.map +1 -0
- package/dist/iter-fest.readableStreamFrom.mjs +7 -0
- package/dist/iter-fest.readableStreamFrom.mjs.map +1 -0
- package/dist/iter-fest.readerValues.d.mts +3 -0
- package/dist/iter-fest.readerValues.d.ts +3 -0
- package/dist/{iter-fest.iterableFilter.js → iter-fest.readerValues.js} +24 -17
- package/dist/iter-fest.readerValues.js.map +1 -0
- package/dist/iter-fest.readerValues.mjs +7 -0
- package/dist/iter-fest.readerValues.mjs.map +1 -0
- package/dist/iter-fest.symbolObservable.d.mts +3 -0
- package/dist/iter-fest.symbolObservable.d.ts +3 -0
- package/dist/iter-fest.symbolObservable.js +42 -0
- package/dist/iter-fest.symbolObservable.js.map +1 -0
- package/dist/iter-fest.symbolObservable.mjs +7 -0
- package/dist/iter-fest.symbolObservable.mjs.map +1 -0
- package/package.json +263 -109
- package/dist/chunk-27NJVC7K.mjs.map +0 -1
- package/dist/chunk-44W7OTNE.mjs +0 -12
- package/dist/chunk-44W7OTNE.mjs.map +0 -1
- package/dist/chunk-5CHMNKXJ.mjs +0 -20
- package/dist/chunk-5CHMNKXJ.mjs.map +0 -1
- package/dist/chunk-5CRMPYKD.mjs +0 -19
- package/dist/chunk-5CRMPYKD.mjs.map +0 -1
- package/dist/chunk-6C3P4TNK.mjs +0 -19
- package/dist/chunk-6C3P4TNK.mjs.map +0 -1
- package/dist/chunk-EZC33HE6.mjs +0 -15
- package/dist/chunk-EZC33HE6.mjs.map +0 -1
- package/dist/chunk-GWZF5BB7.mjs +0 -16
- package/dist/chunk-GWZF5BB7.mjs.map +0 -1
- package/dist/chunk-HYU4EN7J.mjs +0 -20
- package/dist/chunk-HYU4EN7J.mjs.map +0 -1
- package/dist/chunk-JU353VSE.mjs +0 -16
- package/dist/chunk-JU353VSE.mjs.map +0 -1
- package/dist/chunk-KONB7TV6.mjs.map +0 -1
- package/dist/chunk-MDBK7ND5.mjs.map +0 -1
- package/dist/chunk-MNLOWKTC.mjs +0 -19
- package/dist/chunk-MNLOWKTC.mjs.map +0 -1
- package/dist/chunk-TEI3K6GT.mjs +0 -21
- package/dist/chunk-TEI3K6GT.mjs.map +0 -1
- package/dist/chunk-UIEKIMLW.mjs.map +0 -1
- package/dist/chunk-V6OWQQ3Q.mjs +0 -20
- package/dist/chunk-V6OWQQ3Q.mjs.map +0 -1
- package/dist/chunk-WKIRSZXX.mjs.map +0 -1
- package/dist/chunk-XKBVB2JN.mjs +0 -12
- package/dist/chunk-XKBVB2JN.mjs.map +0 -1
- package/dist/chunk-XW34KZRY.mjs +0 -17
- package/dist/chunk-XW34KZRY.mjs.map +0 -1
- package/dist/chunk-Y5M2C7NQ.mjs +0 -13
- package/dist/chunk-Y5M2C7NQ.mjs.map +0 -1
- package/dist/chunk-ZUBHGSCW.mjs +0 -18
- package/dist/chunk-ZUBHGSCW.mjs.map +0 -1
- package/dist/iter-fest.iterableAt.js.map +0 -1
- package/dist/iter-fest.iterableAt.mjs +0 -8
- package/dist/iter-fest.iterableConcat.d.mts +0 -16
- package/dist/iter-fest.iterableConcat.d.ts +0 -16
- package/dist/iter-fest.iterableConcat.js.map +0 -1
- package/dist/iter-fest.iterableConcat.mjs +0 -7
- package/dist/iter-fest.iterableEntries.d.mts +0 -6
- package/dist/iter-fest.iterableEntries.d.ts +0 -6
- package/dist/iter-fest.iterableEntries.js.map +0 -1
- package/dist/iter-fest.iterableEntries.mjs +0 -7
- package/dist/iter-fest.iterableEvery.d.mts +0 -24
- package/dist/iter-fest.iterableEvery.d.ts +0 -24
- package/dist/iter-fest.iterableEvery.js.map +0 -1
- package/dist/iter-fest.iterableEvery.mjs +0 -7
- package/dist/iter-fest.iterableFilter.d.mts +0 -16
- package/dist/iter-fest.iterableFilter.d.ts +0 -16
- package/dist/iter-fest.iterableFilter.js.map +0 -1
- package/dist/iter-fest.iterableFilter.mjs +0 -7
- package/dist/iter-fest.iterableFind.d.mts +0 -15
- package/dist/iter-fest.iterableFind.d.ts +0 -15
- package/dist/iter-fest.iterableFind.js +0 -43
- package/dist/iter-fest.iterableFind.js.map +0 -1
- package/dist/iter-fest.iterableFind.mjs +0 -7
- package/dist/iter-fest.iterableFindIndex.js.map +0 -1
- package/dist/iter-fest.iterableFindIndex.mjs +0 -7
- package/dist/iter-fest.iterableFindLast.js.map +0 -1
- package/dist/iter-fest.iterableFindLast.mjs +0 -7
- package/dist/iter-fest.iterableFindLastIndex.js.map +0 -1
- package/dist/iter-fest.iterableFindLastIndex.mjs +0 -7
- package/dist/iter-fest.iterableForEach.d.mts +0 -10
- package/dist/iter-fest.iterableForEach.d.ts +0 -10
- package/dist/iter-fest.iterableForEach.js +0 -40
- package/dist/iter-fest.iterableForEach.js.map +0 -1
- package/dist/iter-fest.iterableForEach.mjs +0 -7
- package/dist/iter-fest.iterableIncludes.d.mts +0 -9
- package/dist/iter-fest.iterableIncludes.d.ts +0 -9
- package/dist/iter-fest.iterableIncludes.js.map +0 -1
- package/dist/iter-fest.iterableIncludes.mjs +0 -8
- package/dist/iter-fest.iterableIndexOf.d.mts +0 -9
- package/dist/iter-fest.iterableIndexOf.d.ts +0 -9
- package/dist/iter-fest.iterableIndexOf.js.map +0 -1
- package/dist/iter-fest.iterableIndexOf.mjs +0 -8
- package/dist/iter-fest.iterableJoin.d.mts +0 -8
- package/dist/iter-fest.iterableJoin.d.ts +0 -8
- package/dist/iter-fest.iterableJoin.js.map +0 -1
- package/dist/iter-fest.iterableJoin.mjs +0 -7
- package/dist/iter-fest.iterableKeys.d.mts +0 -6
- package/dist/iter-fest.iterableKeys.d.ts +0 -6
- package/dist/iter-fest.iterableKeys.js.map +0 -1
- package/dist/iter-fest.iterableKeys.mjs +0 -7
- package/dist/iter-fest.iterableMap.d.mts +0 -8
- package/dist/iter-fest.iterableMap.d.ts +0 -8
- package/dist/iter-fest.iterableMap.js +0 -39
- package/dist/iter-fest.iterableMap.js.map +0 -1
- package/dist/iter-fest.iterableMap.mjs +0 -7
- package/dist/iter-fest.iterableReduce.js +0 -41
- package/dist/iter-fest.iterableReduce.js.map +0 -1
- package/dist/iter-fest.iterableReduce.mjs +0 -7
- package/dist/iter-fest.iterableSlice.js.map +0 -1
- package/dist/iter-fest.iterableSlice.mjs +0 -8
- package/dist/iter-fest.iterableSome.d.mts +0 -12
- package/dist/iter-fest.iterableSome.d.ts +0 -12
- package/dist/iter-fest.iterableSome.js +0 -43
- package/dist/iter-fest.iterableSome.js.map +0 -1
- package/dist/iter-fest.iterableSome.mjs +0 -7
- package/dist/iter-fest.iterableToSpliced.js.map +0 -1
- package/dist/iter-fest.iterableToSpliced.mjs +0 -8
- package/dist/iter-fest.iterableToString.d.mts +0 -6
- package/dist/iter-fest.iterableToString.d.ts +0 -6
- package/dist/iter-fest.iterableToString.js.map +0 -1
- package/dist/iter-fest.iterableToString.mjs +0 -8
- /package/dist/{iter-fest.iterableAt.mjs.map → iter-fest.asyncGeneratorWithLastValue.mjs.map} +0 -0
- /package/dist/{iter-fest.iterableConcat.mjs.map → iter-fest.asyncIteratorToAsyncIterable.mjs.map} +0 -0
- /package/dist/{iter-fest.iterableEntries.mjs.map → iter-fest.generatorWithLastValue.mjs.map} +0 -0
- /package/dist/{iter-fest.iterableEvery.mjs.map → iter-fest.iterableWritableStream.mjs.map} +0 -0
- /package/dist/{iter-fest.iterableFilter.mjs.map → iter-fest.iteratorAt.mjs.map} +0 -0
- /package/dist/{iter-fest.iterableFind.mjs.map → iter-fest.iteratorConcat.mjs.map} +0 -0
- /package/dist/{iter-fest.iterableFindIndex.mjs.map → iter-fest.iteratorDrop.mjs.map} +0 -0
- /package/dist/{iter-fest.iterableFindLast.mjs.map → iter-fest.iteratorEntries.mjs.map} +0 -0
- /package/dist/{iter-fest.iterableFindLastIndex.mjs.map → iter-fest.iteratorEvery.mjs.map} +0 -0
- /package/dist/{iter-fest.iterableForEach.mjs.map → iter-fest.iteratorFilter.mjs.map} +0 -0
- /package/dist/{iter-fest.iterableIncludes.mjs.map → iter-fest.iteratorFind.mjs.map} +0 -0
- /package/dist/{iter-fest.iterableIndexOf.mjs.map → iter-fest.iteratorFindIndex.mjs.map} +0 -0
- /package/dist/{iter-fest.iterableJoin.mjs.map → iter-fest.iteratorFindLast.mjs.map} +0 -0
- /package/dist/{iter-fest.iterableKeys.mjs.map → iter-fest.iteratorFindLastIndex.mjs.map} +0 -0
- /package/dist/{iter-fest.iterableMap.mjs.map → iter-fest.iteratorFlatMap.mjs.map} +0 -0
- /package/dist/{iter-fest.iterableReduce.mjs.map → iter-fest.iteratorForEach.mjs.map} +0 -0
- /package/dist/{iter-fest.iterableSlice.mjs.map → iter-fest.iteratorFrom.mjs.map} +0 -0
- /package/dist/{iter-fest.iterableSome.mjs.map → iter-fest.iteratorIncludes.mjs.map} +0 -0
- /package/dist/{iter-fest.iterableToSpliced.mjs.map → iter-fest.iteratorIndexOf.mjs.map} +0 -0
- /package/dist/{iter-fest.iterableToString.mjs.map → iter-fest.iteratorJoin.mjs.map} +0 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// src/readerValues.ts
|
|
2
|
+
function readerValues(reader) {
|
|
3
|
+
const iterable = {
|
|
4
|
+
[Symbol.asyncIterator]() {
|
|
5
|
+
return iterable;
|
|
6
|
+
},
|
|
7
|
+
async next() {
|
|
8
|
+
const result = await Promise.race([reader.read(), reader.closed]);
|
|
9
|
+
if (!result || result.done) {
|
|
10
|
+
return { done: true, value: void 0 };
|
|
11
|
+
}
|
|
12
|
+
return { value: result.value };
|
|
13
|
+
},
|
|
14
|
+
async return() {
|
|
15
|
+
reader.cancel();
|
|
16
|
+
return { done: true, value: void 0 };
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
return iterable;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export {
|
|
23
|
+
readerValues
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=chunk-EUVK4YM7.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/readerValues.ts"],"sourcesContent":["export function readerValues<T>(reader: ReadableStreamDefaultReader<T>): AsyncIterableIterator<T> {\n const iterable: AsyncIterableIterator<T> = {\n [Symbol.asyncIterator]() {\n return iterable;\n },\n async next(): Promise<IteratorResult<T>> {\n const result = await Promise.race([reader.read(), reader.closed]);\n\n if (!result || result.done) {\n return { done: true, value: undefined };\n }\n\n return { value: result.value };\n },\n async return() {\n // Throw inside for-loop is return().\n reader.cancel();\n\n return { done: true, value: undefined };\n }\n };\n\n return iterable;\n}\n"],"mappings":";AAAO,SAAS,aAAgB,QAAkE;AAChG,QAAM,WAAqC;AAAA,IACzC,CAAC,OAAO,aAAa,IAAI;AACvB,aAAO;AAAA,IACT;AAAA,IACA,MAAM,OAAmC;AACvC,YAAM,SAAS,MAAM,QAAQ,KAAK,CAAC,OAAO,KAAK,GAAG,OAAO,MAAM,CAAC;AAEhE,UAAI,CAAC,UAAU,OAAO,MAAM;AAC1B,eAAO,EAAE,MAAM,MAAM,OAAO,OAAU;AAAA,MACxC;AAEA,aAAO,EAAE,OAAO,OAAO,MAAM;AAAA,IAC/B;AAAA,IACA,MAAM,SAAS;AAEb,aAAO,OAAO;AAEd,aAAO,EAAE,MAAM,MAAM,OAAO,OAAU;AAAA,IACxC;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/iteratorFind.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport find from 'core-js-pure/full/iterator/find';\n\n/**\n * Returns the value of the first element in the iterator where predicate is true, and undefined\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, find\n * immediately returns that element value. Otherwise, find returns undefined.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorFind<T, S extends T>(\n iterator: Iterator<T>,\n predicate: (value: T, index: number) => value is S\n): S | undefined;\n\nexport function iteratorFind<T>(iterator: Iterator<T>, predicate: (value: T, index: number) => unknown): T | undefined;\n\nexport function iteratorFind<T, S extends T>(\n iterator: Iterator<T>,\n predicate: (value: T, index: number) => unknown\n): S | undefined {\n return find(iterator, predicate);\n}\n"],"mappings":";AACA,OAAO,UAAU;AAmBV,SAAS,aACd,UACA,WACe;AACf,SAAO,KAAK,UAAU,SAAS;AACjC;","names":[]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
iteratorToIterable
|
|
3
|
+
} from "./chunk-MNDAEMYM.mjs";
|
|
4
|
+
|
|
5
|
+
// src/iteratorJoin.ts
|
|
6
|
+
function iteratorJoin(iterator, separator = ",") {
|
|
7
|
+
let index = 0;
|
|
8
|
+
let result = "";
|
|
9
|
+
for (const item of iteratorToIterable(iterator)) {
|
|
10
|
+
if (index) {
|
|
11
|
+
result += separator;
|
|
12
|
+
}
|
|
13
|
+
if (typeof item !== "undefined" && item !== null) {
|
|
14
|
+
result += item;
|
|
15
|
+
}
|
|
16
|
+
index++;
|
|
17
|
+
}
|
|
18
|
+
return result;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export {
|
|
22
|
+
iteratorJoin
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=chunk-FEEBFWAI.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/iteratorJoin.ts"],"sourcesContent":["import { iteratorToIterable } from './iteratorToIterable';\n\n/**\n * Adds all the elements of an iterator into a string, separated by the specified separator string.\n *\n * @param separator A string used to separate one element of the iterator from the next in the resulting string. If omitted, the iterator elements are separated with a comma.\n */\nexport function iteratorJoin<T>(iterator: Iterator<T>, separator: string = ','): string {\n let index = 0;\n let result = '';\n\n for (const item of iteratorToIterable(iterator)) {\n if (index) {\n result += separator;\n }\n\n if (typeof item !== 'undefined' && item !== null) {\n result += item;\n }\n\n index++;\n }\n\n return result;\n}\n"],"mappings":";;;;;AAOO,SAAS,aAAgB,UAAuB,YAAoB,KAAa;AACtF,MAAI,QAAQ;AACZ,MAAI,SAAS;AAEb,aAAW,QAAQ,mBAAmB,QAAQ,GAAG;AAC/C,QAAI,OAAO;AACT,gBAAU;AAAA,IACZ;AAEA,QAAI,OAAO,SAAS,eAAe,SAAS,MAAM;AAChD,gBAAU;AAAA,IACZ;AAEA;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Observable
|
|
3
|
+
} from "./chunk-VLF6DI2U.mjs";
|
|
4
|
+
|
|
5
|
+
// src/observableFromAsync.ts
|
|
6
|
+
function observableFromAsync(iterable) {
|
|
7
|
+
return new Observable((subscriber) => {
|
|
8
|
+
let closed = false;
|
|
9
|
+
(async function() {
|
|
10
|
+
try {
|
|
11
|
+
for await (const value of iterable) {
|
|
12
|
+
if (closed) {
|
|
13
|
+
break;
|
|
14
|
+
}
|
|
15
|
+
subscriber.next(value);
|
|
16
|
+
}
|
|
17
|
+
subscriber.complete();
|
|
18
|
+
} catch (error) {
|
|
19
|
+
subscriber.error(error);
|
|
20
|
+
}
|
|
21
|
+
})();
|
|
22
|
+
return () => {
|
|
23
|
+
closed = true;
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export {
|
|
29
|
+
observableFromAsync
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=chunk-FEOLYD5R.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/observableFromAsync.ts"],"sourcesContent":["import { Observable } from './Observable';\n\nexport function observableFromAsync<T>(iterable: AsyncIterable<T>): Observable<T> {\n return new Observable(subscriber => {\n let closed = false;\n\n (async function () {\n try {\n for await (const value of iterable) {\n if (closed) {\n break;\n }\n\n subscriber.next(value);\n }\n\n subscriber.complete();\n } catch (error) {\n subscriber.error(error);\n }\n })();\n\n return () => {\n closed = true;\n };\n });\n}\n"],"mappings":";;;;;AAEO,SAAS,oBAAuB,UAA2C;AAChF,SAAO,IAAI,WAAW,gBAAc;AAClC,QAAI,SAAS;AAEb,KAAC,iBAAkB;AACjB,UAAI;AACF,yBAAiB,SAAS,UAAU;AAClC,cAAI,QAAQ;AACV;AAAA,UACF;AAEA,qBAAW,KAAK,KAAK;AAAA,QACvB;AAEA,mBAAW,SAAS;AAAA,MACtB,SAAS,OAAO;AACd,mBAAW,MAAM,KAAK;AAAA,MACxB;AAAA,IACF,GAAG;AAEH,WAAO,MAAM;AACX,eAAS;AAAA,IACX;AAAA,EACF,CAAC;AACH;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/iteratorForEach.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport forEach from 'core-js-pure/full/iterator/for-each';\n\n/**\n * Performs the specified action for each element in an iterator.\n *\n * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn 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 iteratorForEach<T>(iterator: Iterator<T>, callbackfn: (value: T, index: number) => void): void {\n forEach(iterator, callbackfn);\n}\n"],"mappings":";AACA,OAAO,aAAa;AASb,SAAS,gBAAmB,UAAuB,YAAqD;AAC7G,UAAQ,UAAU,UAAU;AAC9B;","names":[]}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
toIntegerOrInfinity
|
|
3
3
|
} from "./chunk-W5NEOEVE.mjs";
|
|
4
|
+
import {
|
|
5
|
+
iteratorToIterable
|
|
6
|
+
} from "./chunk-MNDAEMYM.mjs";
|
|
4
7
|
|
|
5
|
-
// src/
|
|
6
|
-
function
|
|
8
|
+
// src/iteratorIncludes.ts
|
|
9
|
+
function iteratorIncludes(iterator, searchElement, fromIndex = 0) {
|
|
7
10
|
let index = 0;
|
|
8
11
|
fromIndex = toIntegerOrInfinity(fromIndex);
|
|
9
12
|
if (fromIndex !== Infinity) {
|
|
@@ -11,7 +14,7 @@ function iterableIncludes(iterable, searchElement, fromIndex = 0) {
|
|
|
11
14
|
if (fromIndex < 0) {
|
|
12
15
|
throw new TypeError("fromIndex cannot be a negative finite number");
|
|
13
16
|
}
|
|
14
|
-
for (const item of
|
|
17
|
+
for (const item of iteratorToIterable(iterator)) {
|
|
15
18
|
if (index++ >= fromIndex && Object.is(item, searchElement)) {
|
|
16
19
|
return true;
|
|
17
20
|
}
|
|
@@ -21,6 +24,6 @@ function iterableIncludes(iterable, searchElement, fromIndex = 0) {
|
|
|
21
24
|
}
|
|
22
25
|
|
|
23
26
|
export {
|
|
24
|
-
|
|
27
|
+
iteratorIncludes
|
|
25
28
|
};
|
|
26
|
-
//# sourceMappingURL=chunk-
|
|
29
|
+
//# sourceMappingURL=chunk-H27CTQGV.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/iteratorIncludes.ts"],"sourcesContent":["import { iteratorToIterable } from './iteratorToIterable';\nimport toIntegerOrInfinity from './private/toIntegerOrInfinity';\n\n/**\n * Determines whether an iterator includes a certain element, returning true or false as appropriate.\n *\n * @param searchElement The element to search for.\n * @param fromIndex The position in this iterator at which to begin searching for searchElement.\n */\nexport function iteratorIncludes<T>(iterator: Iterator<T>, searchElement: T, fromIndex: number = 0): boolean {\n let index = 0;\n\n fromIndex = toIntegerOrInfinity(fromIndex);\n\n if (fromIndex !== Infinity) {\n fromIndex = fromIndex === -Infinity ? 0 : fromIndex;\n\n if (fromIndex < 0) {\n // TODO: Support negative fromIndex.\n throw new TypeError('fromIndex cannot be a negative finite number');\n }\n\n for (const item of iteratorToIterable(iterator)) {\n if (index++ >= fromIndex && Object.is(item, searchElement)) {\n return true;\n }\n }\n }\n\n return false;\n}\n"],"mappings":";;;;;;;;AASO,SAAS,iBAAoB,UAAuB,eAAkB,YAAoB,GAAY;AAC3G,MAAI,QAAQ;AAEZ,cAAY,oBAAoB,SAAS;AAEzC,MAAI,cAAc,UAAU;AAC1B,gBAAY,cAAc,YAAY,IAAI;AAE1C,QAAI,YAAY,GAAG;AAEjB,YAAM,IAAI,UAAU,8CAA8C;AAAA,IACpE;AAEA,eAAW,QAAQ,mBAAmB,QAAQ,GAAG;AAC/C,UAAI,WAAW,aAAa,OAAO,GAAG,MAAM,aAAa,GAAG;AAC1D,eAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
toIntegerOrInfinity
|
|
3
3
|
} from "./chunk-W5NEOEVE.mjs";
|
|
4
|
+
import {
|
|
5
|
+
iteratorToIterable
|
|
6
|
+
} from "./chunk-MNDAEMYM.mjs";
|
|
4
7
|
|
|
5
|
-
// src/
|
|
6
|
-
function
|
|
8
|
+
// src/iteratorAt.ts
|
|
9
|
+
function iteratorAt(iterator, index) {
|
|
7
10
|
let currentIndex = 0;
|
|
8
11
|
index = toIntegerOrInfinity(index);
|
|
9
12
|
if (!isFinite(index)) {
|
|
@@ -12,7 +15,7 @@ function iterableAt(iterable, index) {
|
|
|
12
15
|
if (index < 0) {
|
|
13
16
|
throw new TypeError("index cannot be a negative finite number");
|
|
14
17
|
}
|
|
15
|
-
for (const value of
|
|
18
|
+
for (const value of iteratorToIterable(iterator)) {
|
|
16
19
|
if (currentIndex++ === index) {
|
|
17
20
|
return value;
|
|
18
21
|
}
|
|
@@ -21,6 +24,6 @@ function iterableAt(iterable, index) {
|
|
|
21
24
|
}
|
|
22
25
|
|
|
23
26
|
export {
|
|
24
|
-
|
|
27
|
+
iteratorAt
|
|
25
28
|
};
|
|
26
|
-
//# sourceMappingURL=chunk-
|
|
29
|
+
//# sourceMappingURL=chunk-H5ARVU55.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/iteratorAt.ts"],"sourcesContent":["import { iteratorToIterable } from './iteratorToIterable';\nimport toIntegerOrInfinity from './private/toIntegerOrInfinity';\n\n/**\n * Returns the item located at the specified index.\n *\n * @param index The zero-based index of the desired code unit. A negative index will count back from the last item.\n */\nexport function iteratorAt<T>(iterator: Iterator<T>, index: number): T | undefined {\n let currentIndex = 0;\n\n index = toIntegerOrInfinity(index);\n\n if (!isFinite(index)) {\n return;\n }\n\n if (index < 0) {\n throw new TypeError('index cannot be a negative finite number');\n }\n\n for (const value of iteratorToIterable(iterator)) {\n if (currentIndex++ === index) {\n return value;\n }\n }\n\n return undefined;\n}\n"],"mappings":";;;;;;;;AAQO,SAAS,WAAc,UAAuB,OAA8B;AACjF,MAAI,eAAe;AAEnB,UAAQ,oBAAoB,KAAK;AAEjC,MAAI,CAAC,SAAS,KAAK,GAAG;AACpB;AAAA,EACF;AAEA,MAAI,QAAQ,GAAG;AACb,UAAM,IAAI,UAAU,0CAA0C;AAAA,EAChE;AAEA,aAAW,SAAS,mBAAmB,QAAQ,GAAG;AAChD,QAAI,mBAAmB,OAAO;AAC5B,aAAO;AAAA,IACT;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
toIntegerOrInfinity
|
|
3
3
|
} from "./chunk-W5NEOEVE.mjs";
|
|
4
|
+
import {
|
|
5
|
+
iteratorToIterable
|
|
6
|
+
} from "./chunk-MNDAEMYM.mjs";
|
|
4
7
|
|
|
5
|
-
// src/
|
|
6
|
-
function*
|
|
8
|
+
// src/iteratorToSpliced.ts
|
|
9
|
+
function* iteratorToSpliced(iterator, start = 0, deleteCount = 0, ...items) {
|
|
7
10
|
let index = 0;
|
|
8
11
|
start = toIntegerOrInfinity(start);
|
|
9
12
|
start = start === -Infinity ? 0 : start;
|
|
@@ -11,7 +14,7 @@ function* iterableToSpliced(iterable, start = 0, deleteCount = 0, ...items) {
|
|
|
11
14
|
throw new TypeError("start cannot be a negative finite number");
|
|
12
15
|
}
|
|
13
16
|
let inserted = false;
|
|
14
|
-
for (const item of
|
|
17
|
+
for (const item of iteratorToIterable(iterator)) {
|
|
15
18
|
if (index + 1 > start && !inserted) {
|
|
16
19
|
yield* items;
|
|
17
20
|
inserted = true;
|
|
@@ -27,6 +30,6 @@ function* iterableToSpliced(iterable, start = 0, deleteCount = 0, ...items) {
|
|
|
27
30
|
}
|
|
28
31
|
|
|
29
32
|
export {
|
|
30
|
-
|
|
33
|
+
iteratorToSpliced
|
|
31
34
|
};
|
|
32
|
-
//# sourceMappingURL=chunk-
|
|
35
|
+
//# sourceMappingURL=chunk-IZXDQ25M.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/iteratorToSpliced.ts"],"sourcesContent":["import { iteratorToIterable } from './iteratorToIterable';\nimport toIntegerOrInfinity from './private/toIntegerOrInfinity';\n\n/**\n * Copies an array and removes elements and, if necessary, inserts new elements in their place. Returns the copied array.\n * @param start The zero-based location in the array from which to start removing elements.\n * @param deleteCount The number of elements to remove.\n * @param items Elements to insert into the copied array in place of the deleted elements.\n * @returns The copied array.\n */\nexport function iteratorToSpliced<T>(\n iterator: Iterator<T>,\n start?: number | undefined,\n deleteCount?: number | undefined,\n ...items: T[]\n): IterableIterator<T>;\n\n/**\n * Copies an array and removes elements while returning the remaining elements.\n * @param start The zero-based location in the array from which to start removing elements.\n * @param deleteCount The number of elements to remove.\n * @returns A copy of the original array with the remaining elements.\n */\nexport function iteratorToSpliced<T>(\n iterator: Iterator<T>,\n start?: number | undefined,\n deleteCount?: number | undefined\n): IterableIterator<T>;\n\nexport function* iteratorToSpliced<T>(\n iterator: Iterator<T>,\n start: number = 0,\n deleteCount: number = 0,\n ...items: T[]\n): IterableIterator<T> {\n let index = 0;\n\n start = toIntegerOrInfinity(start);\n start = start === -Infinity ? 0 : start;\n\n if (start < 0) {\n throw new TypeError('start cannot be a negative finite number');\n }\n\n let inserted = false;\n\n for (const item of iteratorToIterable(iterator)) {\n if (index + 1 > start && !inserted) {\n yield* items;\n inserted = true;\n }\n\n if (index < start || index >= start + deleteCount) {\n yield item;\n }\n\n index++;\n }\n\n if (!inserted) {\n yield* items;\n }\n}\n"],"mappings":";;;;;;;;AA6BO,UAAU,kBACf,UACA,QAAgB,GAChB,cAAsB,MACnB,OACkB;AACrB,MAAI,QAAQ;AAEZ,UAAQ,oBAAoB,KAAK;AACjC,UAAQ,UAAU,YAAY,IAAI;AAElC,MAAI,QAAQ,GAAG;AACb,UAAM,IAAI,UAAU,0CAA0C;AAAA,EAChE;AAEA,MAAI,WAAW;AAEf,aAAW,QAAQ,mBAAmB,QAAQ,GAAG;AAC/C,QAAI,QAAQ,IAAI,SAAS,CAAC,UAAU;AAClC,aAAO;AACP,iBAAW;AAAA,IACb;AAEA,QAAI,QAAQ,SAAS,SAAS,QAAQ,aAAa;AACjD,YAAM;AAAA,IACR;AAEA;AAAA,EACF;AAEA,MAAI,CAAC,UAAU;AACb,WAAO;AAAA,EACT;AACF;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/iteratorFrom.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport from from 'core-js-pure/full/iterator/from';\n\n/**\n * `.from` is a static method (unlike the others listed above) which takes an object as an argument. This method allows wrapping \"iterator-like\" objects with an iterator.\n *\n * @param limit\n *\n * @return Returns the object if it is already an iterator, returns a wrapping iterator if the passed object implements a callable @@iterator property.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorFrom<T>(iteratorLike: Iterator<T>): Iterator<T> {\n return from(iteratorLike);\n}\n"],"mappings":";AACA,OAAO,UAAU;AAWV,SAAS,aAAgB,cAAwC;AACtE,SAAO,KAAK,YAAY;AAC1B;","names":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// src/iteratorReduce.ts
|
|
2
|
+
import reduce from "core-js-pure/full/iterator/reduce";
|
|
3
|
+
function iteratorReduce(iterator, callbackfn, initialValue) {
|
|
4
|
+
return reduce(iterator, callbackfn, initialValue);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export {
|
|
8
|
+
iteratorReduce
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=chunk-LIMQXDFK.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/iteratorReduce.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport reduce from 'core-js-pure/full/iterator/reduce';\n\n/**\n * Calls the specified callback function for all the elements in an iterator. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.\n *\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the iterator.\n *\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an iterator value.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorReduce<T>(\n iterator: Iterator<T>,\n callbackfn: (previousValue: T, currentValue: T, currentIndex: number) => T\n): T;\n\nexport function iteratorReduce<T>(\n iterator: Iterator<T>,\n callbackfn: (previousValue: T, currentValue: T, currentIndex: number) => T,\n initialValue: T\n): T;\n\n/**\n * Calls the specified callback function for all the elements in an iterator. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.\n *\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the iterator.\n *\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorReduce<T, U>(\n iterator: Iterator<T>,\n callbackfn: (previousValue: U, currentValue: T, currentIndex: number) => U,\n initialValue: U\n): U;\n\nexport function iteratorReduce<T, U = undefined>(\n iterator: Iterator<T>,\n callbackfn: (previousValue: U | undefined, currentValue: T, currentIndex: number) => U,\n initialValue?: U\n): U | undefined {\n return reduce(iterator, callbackfn, initialValue);\n}\n"],"mappings":";AACA,OAAO,YAAY;AAqCZ,SAAS,eACd,UACA,YACA,cACe;AACf,SAAO,OAAO,UAAU,YAAY,YAAY;AAClD;","names":[]}
|
|
@@ -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 @@
|
|
|
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 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/SymbolObservable.ts"],"sourcesContent":["// @ts-expect-error core-js is not typed.\nimport CoreJSSymbolObservable from 'core-js-pure/features/symbol/observable';\n\nconst SymbolObservable: unique symbol = CoreJSSymbolObservable;\n\nexport { SymbolObservable };\n"],"mappings":";AACA,OAAO,4BAA4B;AAEnC,IAAM,mBAAkC;","names":[]}
|
|
@@ -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,15 @@
|
|
|
1
|
+
// src/asyncIteratorToAsyncIterable.ts
|
|
2
|
+
function asyncIteratorToAsyncIterable(asyncIterator) {
|
|
3
|
+
const asyncIterableIterator = {
|
|
4
|
+
[Symbol.asyncIterator]: () => asyncIterableIterator,
|
|
5
|
+
next: asyncIterator.next.bind(asyncIterator),
|
|
6
|
+
...asyncIterator.return ? { return: asyncIterator.return.bind(asyncIterator) } : {},
|
|
7
|
+
...asyncIterator.throw ? { throw: asyncIterator.throw.bind(asyncIterator) } : {}
|
|
8
|
+
};
|
|
9
|
+
return asyncIterableIterator;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export {
|
|
13
|
+
asyncIteratorToAsyncIterable
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=chunk-P4OSZLEH.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/asyncIteratorToAsyncIterable.ts"],"sourcesContent":["export function asyncIteratorToAsyncIterable<T>(asyncIterator: AsyncIterator<T>): AsyncIterableIterator<T> {\n const asyncIterableIterator: AsyncIterableIterator<T> = {\n [Symbol.asyncIterator]: () => asyncIterableIterator,\n next: asyncIterator.next.bind(asyncIterator),\n ...(asyncIterator.return ? { return: asyncIterator.return.bind(asyncIterator) } : {}),\n ...(asyncIterator.throw ? { throw: asyncIterator.throw.bind(asyncIterator) } : {})\n };\n\n return asyncIterableIterator;\n}\n"],"mappings":";AAAO,SAAS,6BAAgC,eAA2D;AACzG,QAAM,wBAAkD;AAAA,IACtD,CAAC,OAAO,aAAa,GAAG,MAAM;AAAA,IAC9B,MAAM,cAAc,KAAK,KAAK,aAAa;AAAA,IAC3C,GAAI,cAAc,SAAS,EAAE,QAAQ,cAAc,OAAO,KAAK,aAAa,EAAE,IAAI,CAAC;AAAA,IACnF,GAAI,cAAc,QAAQ,EAAE,OAAO,cAAc,MAAM,KAAK,aAAa,EAAE,IAAI,CAAC;AAAA,EAClF;AAEA,SAAO;AACT;","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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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,30 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SymbolObservable
|
|
3
|
+
} from "./chunk-OJMT4K3R.mjs";
|
|
4
|
+
|
|
5
|
+
// src/Observable.ts
|
|
6
|
+
import CoreJSObservable from "core-js-pure/full/observable";
|
|
7
|
+
var Observable = class extends CoreJSObservable {
|
|
8
|
+
constructor(subscriber) {
|
|
9
|
+
super(subscriber);
|
|
10
|
+
}
|
|
11
|
+
subscribe(observerOrOnNext, onError, onComplete) {
|
|
12
|
+
return super.subscribe(observerOrOnNext, onError, onComplete);
|
|
13
|
+
}
|
|
14
|
+
/** Returns itself */
|
|
15
|
+
[SymbolObservable]() {
|
|
16
|
+
return this;
|
|
17
|
+
}
|
|
18
|
+
/** Converts items to an Observable */
|
|
19
|
+
static of(...items) {
|
|
20
|
+
return CoreJSObservable.of(...items);
|
|
21
|
+
}
|
|
22
|
+
static from(iterableOrObservable) {
|
|
23
|
+
return CoreJSObservable.from(iterableOrObservable);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
Observable
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=chunk-VLF6DI2U.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/Observable.ts"],"sourcesContent":["// @ts-expect-error core-js is not typed.\nimport CoreJSObservable from 'core-js-pure/full/observable';\n\nimport { SymbolObservable } from './SymbolObservable';\n\nexport interface SubscriptionObserver<T> {\n /** Sends the next value in the sequence */\n next(value: T): void;\n\n /** Sends the sequence error */\n error(errorValue: unknown): void;\n\n /** Sends the completion notification */\n complete(): void;\n\n /** A boolean value indicating whether the subscription is closed */\n get closed(): boolean;\n}\n\nexport interface Subscription {\n /** Cancels the subscription */\n unsubscribe(): void;\n\n /** A boolean value indicating whether the subscription is closed */\n get closed(): boolean;\n}\n\nexport type SubscriberFunction<T> = (observer: SubscriptionObserver<T>) => (() => void) | Subscription | void;\n\nexport type CompleteFunction = () => void;\nexport type ErrorFunction = (errorValue: unknown) => void;\nexport type NextFunction<T> = (value: T) => void;\nexport type StartFunction = (subscription: Subscription) => void;\n\nexport interface Observer<T> {\n /** Receives a completion notification */\n complete?(): void;\n\n /** Receives the sequence error */\n error?(errorValue: unknown): void;\n\n /** Receives the next value in the sequence */\n next?(value: T): void;\n\n /** Receives the subscription object when `subscribe` is called */\n start?(subscription: Subscription): void;\n}\n\nexport class Observable<T> extends CoreJSObservable {\n constructor(subscriber: SubscriberFunction<T>) {\n super(subscriber);\n }\n\n /** Subscribes to the sequence with an observer */\n subscribe(observer: Observer<T>): Subscription;\n\n /** Subscribes to the sequence with callbacks */\n subscribe(\n onNext: NextFunction<T>,\n onError?: ErrorFunction | undefined,\n onComplete?: CompleteFunction | undefined\n ): Subscription;\n\n subscribe(\n observerOrOnNext: Observer<T> | NextFunction<T>,\n onError?: ErrorFunction | undefined,\n onComplete?: CompleteFunction | undefined\n ): Subscription {\n return super.subscribe(observerOrOnNext, onError, onComplete);\n }\n\n /** Returns itself */\n [SymbolObservable](): Observable<T> {\n return this;\n }\n\n /** Converts items to an Observable */\n static of<T>(...items: T[]): Observable<T> {\n return CoreJSObservable.of(...items);\n }\n\n /** Converts an iterable to an Observable */\n static from<T>(iterable: Iterable<T>): Observable<T>;\n\n /** Converts an observable to an Observable */\n static from<T>(observable: Observable<T>): Observable<T>;\n\n static from<T>(iterableOrObservable: Iterable<T> | Observable<T>): Observable<T> {\n return CoreJSObservable.from(iterableOrObservable);\n }\n}\n"],"mappings":";;;;;AACA,OAAO,sBAAsB;AA+CtB,IAAM,aAAN,cAA4B,iBAAiB;AAAA,EAClD,YAAY,YAAmC;AAC7C,UAAM,UAAU;AAAA,EAClB;AAAA,EAYA,UACE,kBACA,SACA,YACc;AACd,WAAO,MAAM,UAAU,kBAAkB,SAAS,UAAU;AAAA,EAC9D;AAAA;AAAA,EAGA,CAAC,gBAAgB,IAAmB;AAClC,WAAO;AAAA,EACT;AAAA;AAAA,EAGA,OAAO,MAAS,OAA2B;AACzC,WAAO,iBAAiB,GAAG,GAAG,KAAK;AAAA,EACrC;AAAA,EAQA,OAAO,KAAQ,sBAAkE;AAC/E,WAAO,iBAAiB,KAAK,oBAAoB;AAAA,EACnD;AACF;","names":[]}
|
|
@@ -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":[]}
|