iter-fest 0.1.1-main.cd8f1a7 → 0.1.1-main.d88474c
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 +56 -117
- package/dist/{chunk-H27CTQGV.mjs → chunk-27NJVC7K.mjs} +5 -8
- package/dist/chunk-27NJVC7K.mjs.map +1 -0
- package/dist/chunk-44W7OTNE.mjs +12 -0
- package/dist/chunk-44W7OTNE.mjs.map +1 -0
- package/dist/chunk-5CHMNKXJ.mjs +20 -0
- package/dist/chunk-5CHMNKXJ.mjs.map +1 -0
- package/dist/chunk-5CRMPYKD.mjs +19 -0
- package/dist/chunk-5CRMPYKD.mjs.map +1 -0
- package/dist/chunk-6C3P4TNK.mjs +19 -0
- package/dist/chunk-6C3P4TNK.mjs.map +1 -0
- package/dist/{chunk-RVIERPEV.mjs → chunk-EUVK4YM7.mjs} +5 -6
- package/dist/chunk-EUVK4YM7.mjs.map +1 -0
- package/dist/chunk-EZC33HE6.mjs +15 -0
- package/dist/chunk-EZC33HE6.mjs.map +1 -0
- package/dist/chunk-GWZF5BB7.mjs +16 -0
- package/dist/chunk-GWZF5BB7.mjs.map +1 -0
- package/dist/chunk-HYU4EN7J.mjs +20 -0
- package/dist/chunk-HYU4EN7J.mjs.map +1 -0
- package/dist/chunk-JU353VSE.mjs +16 -0
- package/dist/chunk-JU353VSE.mjs.map +1 -0
- package/dist/{chunk-EQZQP6GW.mjs → chunk-KONB7TV6.mjs} +5 -8
- package/dist/chunk-KONB7TV6.mjs.map +1 -0
- package/dist/{chunk-H5ARVU55.mjs → chunk-MDBK7ND5.mjs} +5 -8
- package/dist/chunk-MDBK7ND5.mjs.map +1 -0
- package/dist/chunk-MNLOWKTC.mjs +19 -0
- package/dist/chunk-MNLOWKTC.mjs.map +1 -0
- package/dist/{chunk-YJSIVBF7.mjs → chunk-MOBXUTO5.mjs} +5 -5
- package/dist/chunk-MOBXUTO5.mjs.map +1 -0
- package/dist/chunk-O5SQJUKB.mjs +37 -0
- package/dist/chunk-O5SQJUKB.mjs.map +1 -0
- package/dist/chunk-TEI3K6GT.mjs +21 -0
- package/dist/chunk-TEI3K6GT.mjs.map +1 -0
- package/dist/{chunk-AN54W42O.mjs → chunk-UIEKIMLW.mjs} +5 -8
- package/dist/chunk-UIEKIMLW.mjs.map +1 -0
- package/dist/chunk-V6OWQQ3Q.mjs +20 -0
- package/dist/chunk-V6OWQQ3Q.mjs.map +1 -0
- package/dist/{chunk-IZXDQ25M.mjs → chunk-WKIRSZXX.mjs} +5 -8
- package/dist/chunk-WKIRSZXX.mjs.map +1 -0
- package/dist/chunk-XKBVB2JN.mjs +12 -0
- package/dist/chunk-XKBVB2JN.mjs.map +1 -0
- package/dist/chunk-XW34KZRY.mjs +17 -0
- package/dist/chunk-XW34KZRY.mjs.map +1 -0
- package/dist/chunk-Y5M2C7NQ.mjs +13 -0
- package/dist/chunk-Y5M2C7NQ.mjs.map +1 -0
- package/dist/chunk-ZUBHGSCW.mjs +18 -0
- package/dist/chunk-ZUBHGSCW.mjs.map +1 -0
- package/dist/iter-fest.d.mts +23 -42
- package/dist/iter-fest.d.ts +23 -42
- package/dist/{iter-fest.iteratorAt.d.mts → iter-fest.iterableAt.d.mts} +2 -2
- package/dist/{iter-fest.iteratorAt.d.ts → iter-fest.iterableAt.d.ts} +2 -2
- package/dist/{iter-fest.iteratorAt.js → iter-fest.iterableAt.js} +10 -21
- package/dist/iter-fest.iterableAt.js.map +1 -0
- package/dist/iter-fest.iterableAt.mjs +8 -0
- package/dist/iter-fest.iterableConcat.d.mts +16 -0
- package/dist/iter-fest.iterableConcat.d.ts +16 -0
- package/dist/iter-fest.iterableConcat.js +40 -0
- package/dist/iter-fest.iterableConcat.js.map +1 -0
- package/dist/iter-fest.iterableConcat.mjs +7 -0
- package/dist/iter-fest.iterableEntries.d.mts +6 -0
- package/dist/iter-fest.iterableEntries.d.ts +6 -0
- package/dist/{iter-fest.iteratorEntries.js → iter-fest.iterableEntries.js} +9 -22
- package/dist/iter-fest.iterableEntries.js.map +1 -0
- package/dist/iter-fest.iterableEntries.mjs +7 -0
- package/dist/iter-fest.iterableEvery.d.mts +24 -0
- package/dist/iter-fest.iterableEvery.d.ts +24 -0
- package/dist/iter-fest.iterableEvery.js +43 -0
- package/dist/iter-fest.iterableEvery.js.map +1 -0
- package/dist/iter-fest.iterableEvery.mjs +7 -0
- package/dist/iter-fest.iterableFilter.d.mts +16 -0
- package/dist/iter-fest.iterableFilter.d.ts +16 -0
- package/dist/iter-fest.iterableFilter.js +42 -0
- package/dist/iter-fest.iterableFilter.js.map +1 -0
- package/dist/iter-fest.iterableFilter.mjs +7 -0
- package/dist/iter-fest.iterableFind.d.mts +15 -0
- package/dist/iter-fest.iterableFind.d.ts +15 -0
- package/dist/iter-fest.iterableFind.js +43 -0
- package/dist/iter-fest.iterableFind.js.map +1 -0
- package/dist/iter-fest.iterableFind.mjs +7 -0
- package/dist/{iter-fest.iteratorFindIndex.d.mts → iter-fest.iterableFindIndex.d.mts} +4 -4
- package/dist/{iter-fest.iteratorFindIndex.d.ts → iter-fest.iterableFindIndex.d.ts} +4 -4
- package/dist/{iter-fest.iteratorFindIndex.js → iter-fest.iterableFindIndex.js} +10 -23
- package/dist/iter-fest.iterableFindIndex.js.map +1 -0
- package/dist/iter-fest.iterableFindIndex.mjs +7 -0
- package/dist/{iter-fest.iteratorFindLast.d.mts → iter-fest.iterableFindLast.d.mts} +5 -5
- package/dist/{iter-fest.iteratorFindLast.d.ts → iter-fest.iterableFindLast.d.ts} +5 -5
- package/dist/{iter-fest.iteratorFindLast.js → iter-fest.iterableFindLast.js} +10 -23
- package/dist/iter-fest.iterableFindLast.js.map +1 -0
- package/dist/iter-fest.iterableFindLast.mjs +7 -0
- package/dist/{iter-fest.iteratorFindLastIndex.d.mts → iter-fest.iterableFindLastIndex.d.mts} +4 -4
- package/dist/{iter-fest.iteratorFindLastIndex.d.ts → iter-fest.iterableFindLastIndex.d.ts} +4 -4
- package/dist/{iter-fest.iteratorFindLastIndex.js → iter-fest.iterableFindLastIndex.js} +10 -23
- package/dist/iter-fest.iterableFindLastIndex.js.map +1 -0
- package/dist/iter-fest.iterableFindLastIndex.mjs +7 -0
- package/dist/iter-fest.iterableForEach.d.mts +10 -0
- package/dist/iter-fest.iterableForEach.d.ts +10 -0
- package/dist/iter-fest.iterableForEach.js +40 -0
- package/dist/iter-fest.iterableForEach.js.map +1 -0
- package/dist/iter-fest.iterableForEach.mjs +7 -0
- package/dist/iter-fest.iterableGetReadable.d.mts +3 -0
- package/dist/iter-fest.iterableGetReadable.d.ts +3 -0
- package/dist/{iter-fest.readableStreamFrom.js → iter-fest.iterableGetReadable.js} +9 -9
- package/dist/iter-fest.iterableGetReadable.js.map +1 -0
- package/dist/iter-fest.iterableGetReadable.mjs +7 -0
- package/dist/iter-fest.iterableIncludes.d.mts +9 -0
- package/dist/iter-fest.iterableIncludes.d.ts +9 -0
- package/dist/{iter-fest.iteratorIncludes.js → iter-fest.iterableIncludes.js} +10 -21
- package/dist/iter-fest.iterableIncludes.js.map +1 -0
- package/dist/iter-fest.iterableIncludes.mjs +8 -0
- package/dist/iter-fest.iterableIndexOf.d.mts +9 -0
- package/dist/iter-fest.iterableIndexOf.d.ts +9 -0
- package/dist/{iter-fest.iteratorIndexOf.js → iter-fest.iterableIndexOf.js} +10 -21
- package/dist/iter-fest.iterableIndexOf.js.map +1 -0
- package/dist/iter-fest.iterableIndexOf.mjs +8 -0
- package/dist/iter-fest.iterableJoin.d.mts +8 -0
- package/dist/iter-fest.iterableJoin.d.ts +8 -0
- package/dist/{iter-fest.iteratorToString.js → iter-fest.iterableJoin.js} +9 -27
- package/dist/iter-fest.iterableJoin.js.map +1 -0
- package/dist/iter-fest.iterableJoin.mjs +7 -0
- package/dist/iter-fest.iterableKeys.d.mts +6 -0
- package/dist/iter-fest.iterableKeys.d.ts +6 -0
- package/dist/{iter-fest.iteratorKeys.js → iter-fest.iterableKeys.js} +9 -22
- package/dist/iter-fest.iterableKeys.js.map +1 -0
- package/dist/iter-fest.iterableKeys.mjs +7 -0
- package/dist/iter-fest.iterableMap.d.mts +8 -0
- package/dist/iter-fest.iterableMap.d.ts +8 -0
- package/dist/iter-fest.iterableMap.js +39 -0
- package/dist/iter-fest.iterableMap.js.map +1 -0
- package/dist/iter-fest.iterableMap.mjs +7 -0
- package/dist/{iter-fest.iteratorReduce.d.mts → iter-fest.iterableReduce.d.mts} +9 -13
- package/dist/{iter-fest.iteratorReduce.d.ts → iter-fest.iterableReduce.d.ts} +9 -13
- package/dist/iter-fest.iterableReduce.js +41 -0
- package/dist/iter-fest.iterableReduce.js.map +1 -0
- package/dist/iter-fest.iterableReduce.mjs +7 -0
- package/dist/{iter-fest.iteratorSlice.d.mts → iter-fest.iterableSlice.d.mts} +8 -8
- package/dist/{iter-fest.iteratorSlice.d.ts → iter-fest.iterableSlice.d.ts} +8 -8
- package/dist/{iter-fest.iteratorSlice.js → iter-fest.iterableSlice.js} +10 -21
- package/dist/iter-fest.iterableSlice.js.map +1 -0
- package/dist/iter-fest.iterableSlice.mjs +8 -0
- package/dist/iter-fest.iterableSome.d.mts +12 -0
- package/dist/iter-fest.iterableSome.d.ts +12 -0
- package/dist/iter-fest.iterableSome.js +43 -0
- package/dist/iter-fest.iterableSome.js.map +1 -0
- package/dist/iter-fest.iterableSome.mjs +7 -0
- package/dist/{iter-fest.iteratorToSpliced.d.mts → iter-fest.iterableToSpliced.d.mts} +3 -3
- package/dist/{iter-fest.iteratorToSpliced.d.ts → iter-fest.iterableToSpliced.d.ts} +3 -3
- package/dist/{iter-fest.iteratorToSpliced.js → iter-fest.iterableToSpliced.js} +10 -21
- package/dist/iter-fest.iterableToSpliced.js.map +1 -0
- package/dist/iter-fest.iterableToSpliced.mjs +8 -0
- package/dist/iter-fest.iterableToString.d.mts +6 -0
- package/dist/iter-fest.iterableToString.d.ts +6 -0
- package/dist/{iter-fest.iteratorJoin.js → iter-fest.iterableToString.js} +15 -21
- package/dist/iter-fest.iterableToString.js.map +1 -0
- package/dist/iter-fest.iterableToString.mjs +8 -0
- package/dist/iter-fest.js +237 -370
- package/dist/iter-fest.js.map +1 -1
- package/dist/iter-fest.mjs +76 -152
- package/dist/iter-fest.pushAsyncIterableIterator.d.mts +9 -0
- package/dist/iter-fest.pushAsyncIterableIterator.d.ts +9 -0
- package/dist/{iter-fest.iterableWritableStream.js → iter-fest.pushAsyncIterableIterator.js} +30 -39
- package/dist/iter-fest.pushAsyncIterableIterator.js.map +1 -0
- package/dist/iter-fest.pushAsyncIterableIterator.mjs +7 -0
- package/dist/iter-fest.readerValues.d.mts +3 -0
- package/dist/iter-fest.readerValues.d.ts +3 -0
- package/dist/{iter-fest.readableStreamValues.js → iter-fest.readerValues.js} +9 -10
- package/dist/iter-fest.readerValues.js.map +1 -0
- package/dist/iter-fest.readerValues.mjs +7 -0
- package/package.json +117 -307
- package/dist/chunk-3S6LCGE6.mjs +0 -10
- package/dist/chunk-3S6LCGE6.mjs.map +0 -1
- package/dist/chunk-4RT2FROS.mjs +0 -10
- package/dist/chunk-4RT2FROS.mjs.map +0 -1
- package/dist/chunk-4ZBMXHD6.mjs +0 -10
- package/dist/chunk-4ZBMXHD6.mjs.map +0 -1
- package/dist/chunk-72AEHTPQ.mjs +0 -38
- package/dist/chunk-72AEHTPQ.mjs.map +0 -1
- package/dist/chunk-AN54W42O.mjs.map +0 -1
- package/dist/chunk-AOZVPHE4.mjs +0 -10
- package/dist/chunk-AOZVPHE4.mjs.map +0 -1
- package/dist/chunk-BSAPKNNZ.mjs +0 -16
- package/dist/chunk-BSAPKNNZ.mjs.map +0 -1
- package/dist/chunk-BWMXKULC.mjs +0 -46
- package/dist/chunk-BWMXKULC.mjs.map +0 -1
- package/dist/chunk-CNCNQPK3.mjs +0 -16
- package/dist/chunk-CNCNQPK3.mjs.map +0 -1
- package/dist/chunk-CNKIGQUS.mjs +0 -10
- package/dist/chunk-CNKIGQUS.mjs.map +0 -1
- package/dist/chunk-DC2ZV7KQ.mjs +0 -10
- package/dist/chunk-DC2ZV7KQ.mjs.map +0 -1
- package/dist/chunk-EQZQP6GW.mjs.map +0 -1
- package/dist/chunk-FBST4AUL.mjs +0 -10
- package/dist/chunk-FBST4AUL.mjs.map +0 -1
- package/dist/chunk-FEEBFWAI.mjs +0 -24
- package/dist/chunk-FEEBFWAI.mjs.map +0 -1
- package/dist/chunk-FMIHIL6A.mjs +0 -10
- package/dist/chunk-FMIHIL6A.mjs.map +0 -1
- package/dist/chunk-GFJGWVES.mjs +0 -10
- package/dist/chunk-GFJGWVES.mjs.map +0 -1
- package/dist/chunk-H27CTQGV.mjs.map +0 -1
- package/dist/chunk-H5ARVU55.mjs.map +0 -1
- package/dist/chunk-IZXDQ25M.mjs.map +0 -1
- package/dist/chunk-J3FQSENW.mjs +0 -10
- package/dist/chunk-J3FQSENW.mjs.map +0 -1
- package/dist/chunk-JVR6BUJA.mjs +0 -10
- package/dist/chunk-JVR6BUJA.mjs.map +0 -1
- package/dist/chunk-K4RCFPTZ.mjs +0 -10
- package/dist/chunk-K4RCFPTZ.mjs.map +0 -1
- package/dist/chunk-LB3MK3EU.mjs +0 -10
- package/dist/chunk-LB3MK3EU.mjs.map +0 -1
- package/dist/chunk-LIMQXDFK.mjs +0 -10
- package/dist/chunk-LIMQXDFK.mjs.map +0 -1
- package/dist/chunk-MO7HMLOZ.mjs +0 -24
- package/dist/chunk-MO7HMLOZ.mjs.map +0 -1
- package/dist/chunk-MYSNSDM7.mjs +0 -13
- package/dist/chunk-MYSNSDM7.mjs.map +0 -1
- package/dist/chunk-NLXKATXE.mjs +0 -10
- package/dist/chunk-NLXKATXE.mjs.map +0 -1
- package/dist/chunk-NZRXO7EY.mjs +0 -24
- package/dist/chunk-NZRXO7EY.mjs.map +0 -1
- package/dist/chunk-OCK7PKGO.mjs +0 -23
- package/dist/chunk-OCK7PKGO.mjs.map +0 -1
- package/dist/chunk-ODPKEUIR.mjs +0 -10
- package/dist/chunk-ODPKEUIR.mjs.map +0 -1
- package/dist/chunk-OWUGLCQB.mjs +0 -10
- package/dist/chunk-OWUGLCQB.mjs.map +0 -1
- package/dist/chunk-PGJSIDLV.mjs +0 -25
- package/dist/chunk-PGJSIDLV.mjs.map +0 -1
- package/dist/chunk-QLVU73KN.mjs +0 -10
- package/dist/chunk-QLVU73KN.mjs.map +0 -1
- package/dist/chunk-R6SXIXMH.mjs +0 -10
- package/dist/chunk-R6SXIXMH.mjs.map +0 -1
- package/dist/chunk-RVIERPEV.mjs.map +0 -1
- package/dist/chunk-S2LECQKY.mjs +0 -10
- package/dist/chunk-S2LECQKY.mjs.map +0 -1
- package/dist/chunk-TDHR35S7.mjs +0 -10
- package/dist/chunk-TDHR35S7.mjs.map +0 -1
- package/dist/chunk-VCKLUCOT.mjs +0 -10
- package/dist/chunk-VCKLUCOT.mjs.map +0 -1
- package/dist/chunk-VIMGYUMQ.mjs +0 -10
- package/dist/chunk-VIMGYUMQ.mjs.map +0 -1
- package/dist/chunk-WUFMEPOM.mjs +0 -10
- package/dist/chunk-WUFMEPOM.mjs.map +0 -1
- package/dist/chunk-XQDGXAAF.mjs +0 -10
- package/dist/chunk-XQDGXAAF.mjs.map +0 -1
- package/dist/chunk-YJSIVBF7.mjs.map +0 -1
- package/dist/iter-fest.asyncIteratorDrop.d.mts +0 -12
- package/dist/iter-fest.asyncIteratorDrop.d.ts +0 -12
- package/dist/iter-fest.asyncIteratorDrop.js +0 -44
- package/dist/iter-fest.asyncIteratorDrop.js.map +0 -1
- package/dist/iter-fest.asyncIteratorDrop.mjs +0 -7
- package/dist/iter-fest.asyncIteratorEvery.d.mts +0 -25
- package/dist/iter-fest.asyncIteratorEvery.d.ts +0 -25
- package/dist/iter-fest.asyncIteratorEvery.js +0 -44
- package/dist/iter-fest.asyncIteratorEvery.js.map +0 -1
- package/dist/iter-fest.asyncIteratorEvery.mjs +0 -7
- package/dist/iter-fest.asyncIteratorFilter.d.mts +0 -18
- package/dist/iter-fest.asyncIteratorFilter.d.ts +0 -18
- package/dist/iter-fest.asyncIteratorFilter.js +0 -44
- package/dist/iter-fest.asyncIteratorFilter.js.map +0 -1
- package/dist/iter-fest.asyncIteratorFilter.mjs +0 -7
- package/dist/iter-fest.asyncIteratorFind.d.mts +0 -14
- package/dist/iter-fest.asyncIteratorFind.d.ts +0 -14
- package/dist/iter-fest.asyncIteratorFind.js +0 -44
- package/dist/iter-fest.asyncIteratorFind.js.map +0 -1
- package/dist/iter-fest.asyncIteratorFind.mjs +0 -7
- package/dist/iter-fest.asyncIteratorFlatMap.d.mts +0 -12
- package/dist/iter-fest.asyncIteratorFlatMap.d.ts +0 -12
- package/dist/iter-fest.asyncIteratorFlatMap.js +0 -44
- package/dist/iter-fest.asyncIteratorFlatMap.js.map +0 -1
- package/dist/iter-fest.asyncIteratorFlatMap.mjs +0 -7
- package/dist/iter-fest.asyncIteratorForEach.d.mts +0 -10
- package/dist/iter-fest.asyncIteratorForEach.d.ts +0 -10
- package/dist/iter-fest.asyncIteratorForEach.js +0 -44
- package/dist/iter-fest.asyncIteratorForEach.js.map +0 -1
- package/dist/iter-fest.asyncIteratorForEach.mjs +0 -7
- package/dist/iter-fest.asyncIteratorFrom.d.mts +0 -10
- package/dist/iter-fest.asyncIteratorFrom.d.ts +0 -10
- package/dist/iter-fest.asyncIteratorFrom.js +0 -44
- package/dist/iter-fest.asyncIteratorFrom.js.map +0 -1
- package/dist/iter-fest.asyncIteratorFrom.mjs +0 -7
- package/dist/iter-fest.asyncIteratorMap.d.mts +0 -10
- package/dist/iter-fest.asyncIteratorMap.d.ts +0 -10
- package/dist/iter-fest.asyncIteratorMap.js +0 -44
- package/dist/iter-fest.asyncIteratorMap.js.map +0 -1
- package/dist/iter-fest.asyncIteratorMap.mjs +0 -7
- package/dist/iter-fest.asyncIteratorReduce.d.mts +0 -23
- package/dist/iter-fest.asyncIteratorReduce.d.ts +0 -23
- package/dist/iter-fest.asyncIteratorReduce.js +0 -44
- package/dist/iter-fest.asyncIteratorReduce.js.map +0 -1
- package/dist/iter-fest.asyncIteratorReduce.mjs +0 -7
- package/dist/iter-fest.asyncIteratorSome.d.mts +0 -10
- package/dist/iter-fest.asyncIteratorSome.d.ts +0 -10
- package/dist/iter-fest.asyncIteratorSome.js +0 -44
- package/dist/iter-fest.asyncIteratorSome.js.map +0 -1
- package/dist/iter-fest.asyncIteratorSome.mjs +0 -7
- package/dist/iter-fest.asyncIteratorTake.d.mts +0 -12
- package/dist/iter-fest.asyncIteratorTake.d.ts +0 -12
- package/dist/iter-fest.asyncIteratorTake.js +0 -44
- package/dist/iter-fest.asyncIteratorTake.js.map +0 -1
- package/dist/iter-fest.asyncIteratorTake.mjs +0 -7
- package/dist/iter-fest.asyncIteratorToArray.d.mts +0 -10
- package/dist/iter-fest.asyncIteratorToArray.d.ts +0 -10
- package/dist/iter-fest.asyncIteratorToArray.js +0 -44
- package/dist/iter-fest.asyncIteratorToArray.js.map +0 -1
- package/dist/iter-fest.asyncIteratorToArray.mjs +0 -7
- package/dist/iter-fest.iterableWritableStream.d.mts +0 -7
- package/dist/iter-fest.iterableWritableStream.d.ts +0 -7
- package/dist/iter-fest.iterableWritableStream.js.map +0 -1
- package/dist/iter-fest.iterableWritableStream.mjs +0 -7
- package/dist/iter-fest.iteratorAt.js.map +0 -1
- package/dist/iter-fest.iteratorAt.mjs +0 -9
- package/dist/iter-fest.iteratorConcat.d.mts +0 -16
- package/dist/iter-fest.iteratorConcat.d.ts +0 -16
- package/dist/iter-fest.iteratorConcat.js +0 -56
- package/dist/iter-fest.iteratorConcat.js.map +0 -1
- package/dist/iter-fest.iteratorConcat.mjs +0 -8
- package/dist/iter-fest.iteratorDrop.d.mts +0 -12
- package/dist/iter-fest.iteratorDrop.d.ts +0 -12
- package/dist/iter-fest.iteratorDrop.js +0 -44
- package/dist/iter-fest.iteratorDrop.js.map +0 -1
- package/dist/iter-fest.iteratorDrop.mjs +0 -7
- package/dist/iter-fest.iteratorEntries.d.mts +0 -6
- package/dist/iter-fest.iteratorEntries.d.ts +0 -6
- package/dist/iter-fest.iteratorEntries.js.map +0 -1
- package/dist/iter-fest.iteratorEntries.mjs +0 -8
- package/dist/iter-fest.iteratorEvery.d.mts +0 -25
- package/dist/iter-fest.iteratorEvery.d.ts +0 -25
- package/dist/iter-fest.iteratorEvery.js +0 -44
- package/dist/iter-fest.iteratorEvery.js.map +0 -1
- package/dist/iter-fest.iteratorEvery.mjs +0 -7
- package/dist/iter-fest.iteratorFilter.d.mts +0 -18
- package/dist/iter-fest.iteratorFilter.d.ts +0 -18
- package/dist/iter-fest.iteratorFilter.js +0 -44
- package/dist/iter-fest.iteratorFilter.js.map +0 -1
- package/dist/iter-fest.iteratorFilter.mjs +0 -7
- package/dist/iter-fest.iteratorFind.d.mts +0 -14
- package/dist/iter-fest.iteratorFind.d.ts +0 -14
- package/dist/iter-fest.iteratorFind.js +0 -44
- package/dist/iter-fest.iteratorFind.js.map +0 -1
- package/dist/iter-fest.iteratorFind.mjs +0 -7
- package/dist/iter-fest.iteratorFindIndex.js.map +0 -1
- package/dist/iter-fest.iteratorFindIndex.mjs +0 -8
- package/dist/iter-fest.iteratorFindLast.js.map +0 -1
- package/dist/iter-fest.iteratorFindLast.mjs +0 -8
- package/dist/iter-fest.iteratorFindLastIndex.js.map +0 -1
- package/dist/iter-fest.iteratorFindLastIndex.mjs +0 -8
- package/dist/iter-fest.iteratorFlatMap.d.mts +0 -12
- package/dist/iter-fest.iteratorFlatMap.d.ts +0 -12
- package/dist/iter-fest.iteratorFlatMap.js +0 -44
- package/dist/iter-fest.iteratorFlatMap.js.map +0 -1
- package/dist/iter-fest.iteratorFlatMap.mjs +0 -7
- package/dist/iter-fest.iteratorFlatMap.mjs.map +0 -1
- package/dist/iter-fest.iteratorForEach.d.mts +0 -10
- package/dist/iter-fest.iteratorForEach.d.ts +0 -10
- package/dist/iter-fest.iteratorForEach.js +0 -44
- package/dist/iter-fest.iteratorForEach.js.map +0 -1
- package/dist/iter-fest.iteratorForEach.mjs +0 -7
- package/dist/iter-fest.iteratorForEach.mjs.map +0 -1
- package/dist/iter-fest.iteratorFrom.d.mts +0 -10
- package/dist/iter-fest.iteratorFrom.d.ts +0 -10
- package/dist/iter-fest.iteratorFrom.js +0 -44
- package/dist/iter-fest.iteratorFrom.js.map +0 -1
- package/dist/iter-fest.iteratorFrom.mjs +0 -7
- package/dist/iter-fest.iteratorFrom.mjs.map +0 -1
- package/dist/iter-fest.iteratorIncludes.d.mts +0 -9
- package/dist/iter-fest.iteratorIncludes.d.ts +0 -9
- package/dist/iter-fest.iteratorIncludes.js.map +0 -1
- package/dist/iter-fest.iteratorIncludes.mjs +0 -9
- package/dist/iter-fest.iteratorIncludes.mjs.map +0 -1
- package/dist/iter-fest.iteratorIndexOf.d.mts +0 -9
- package/dist/iter-fest.iteratorIndexOf.d.ts +0 -9
- package/dist/iter-fest.iteratorIndexOf.js.map +0 -1
- package/dist/iter-fest.iteratorIndexOf.mjs +0 -9
- package/dist/iter-fest.iteratorIndexOf.mjs.map +0 -1
- package/dist/iter-fest.iteratorJoin.d.mts +0 -8
- package/dist/iter-fest.iteratorJoin.d.ts +0 -8
- package/dist/iter-fest.iteratorJoin.js.map +0 -1
- package/dist/iter-fest.iteratorJoin.mjs +0 -8
- package/dist/iter-fest.iteratorJoin.mjs.map +0 -1
- package/dist/iter-fest.iteratorKeys.d.mts +0 -6
- package/dist/iter-fest.iteratorKeys.d.ts +0 -6
- package/dist/iter-fest.iteratorKeys.js.map +0 -1
- package/dist/iter-fest.iteratorKeys.mjs +0 -8
- package/dist/iter-fest.iteratorKeys.mjs.map +0 -1
- package/dist/iter-fest.iteratorMap.d.mts +0 -10
- package/dist/iter-fest.iteratorMap.d.ts +0 -10
- package/dist/iter-fest.iteratorMap.js +0 -44
- package/dist/iter-fest.iteratorMap.js.map +0 -1
- package/dist/iter-fest.iteratorMap.mjs +0 -7
- package/dist/iter-fest.iteratorMap.mjs.map +0 -1
- package/dist/iter-fest.iteratorReduce.js +0 -44
- package/dist/iter-fest.iteratorReduce.js.map +0 -1
- package/dist/iter-fest.iteratorReduce.mjs +0 -7
- package/dist/iter-fest.iteratorReduce.mjs.map +0 -1
- package/dist/iter-fest.iteratorSlice.js.map +0 -1
- package/dist/iter-fest.iteratorSlice.mjs +0 -9
- package/dist/iter-fest.iteratorSlice.mjs.map +0 -1
- package/dist/iter-fest.iteratorSome.d.mts +0 -10
- package/dist/iter-fest.iteratorSome.d.ts +0 -10
- package/dist/iter-fest.iteratorSome.js +0 -44
- package/dist/iter-fest.iteratorSome.js.map +0 -1
- package/dist/iter-fest.iteratorSome.mjs +0 -7
- package/dist/iter-fest.iteratorSome.mjs.map +0 -1
- package/dist/iter-fest.iteratorTake.d.mts +0 -12
- package/dist/iter-fest.iteratorTake.d.ts +0 -12
- package/dist/iter-fest.iteratorTake.js +0 -44
- package/dist/iter-fest.iteratorTake.js.map +0 -1
- package/dist/iter-fest.iteratorTake.mjs +0 -7
- package/dist/iter-fest.iteratorTake.mjs.map +0 -1
- package/dist/iter-fest.iteratorToArray.d.mts +0 -10
- package/dist/iter-fest.iteratorToArray.d.ts +0 -10
- package/dist/iter-fest.iteratorToArray.js +0 -44
- package/dist/iter-fest.iteratorToArray.js.map +0 -1
- package/dist/iter-fest.iteratorToArray.mjs +0 -7
- package/dist/iter-fest.iteratorToArray.mjs.map +0 -1
- package/dist/iter-fest.iteratorToAsync.d.mts +0 -10
- package/dist/iter-fest.iteratorToAsync.d.ts +0 -10
- package/dist/iter-fest.iteratorToAsync.js +0 -44
- package/dist/iter-fest.iteratorToAsync.js.map +0 -1
- package/dist/iter-fest.iteratorToAsync.mjs +0 -7
- package/dist/iter-fest.iteratorToAsync.mjs.map +0 -1
- package/dist/iter-fest.iteratorToSpliced.js.map +0 -1
- package/dist/iter-fest.iteratorToSpliced.mjs +0 -9
- package/dist/iter-fest.iteratorToSpliced.mjs.map +0 -1
- package/dist/iter-fest.iteratorToString.d.mts +0 -6
- package/dist/iter-fest.iteratorToString.d.ts +0 -6
- package/dist/iter-fest.iteratorToString.js.map +0 -1
- package/dist/iter-fest.iteratorToString.mjs +0 -9
- package/dist/iter-fest.iteratorToString.mjs.map +0 -1
- package/dist/iter-fest.observableValues.d.mts +0 -7
- package/dist/iter-fest.observableValues.d.ts +0 -7
- package/dist/iter-fest.observableValues.js +0 -102
- package/dist/iter-fest.observableValues.js.map +0 -1
- package/dist/iter-fest.observableValues.mjs +0 -9
- package/dist/iter-fest.observableValues.mjs.map +0 -1
- package/dist/iter-fest.readableStreamFrom.d.mts +0 -3
- package/dist/iter-fest.readableStreamFrom.d.ts +0 -3
- package/dist/iter-fest.readableStreamFrom.js.map +0 -1
- package/dist/iter-fest.readableStreamFrom.mjs +0 -7
- package/dist/iter-fest.readableStreamFrom.mjs.map +0 -1
- package/dist/iter-fest.readableStreamValues.d.mts +0 -3
- package/dist/iter-fest.readableStreamValues.d.ts +0 -3
- package/dist/iter-fest.readableStreamValues.js.map +0 -1
- package/dist/iter-fest.readableStreamValues.mjs +0 -7
- package/dist/iter-fest.readableStreamValues.mjs.map +0 -1
- /package/dist/{iter-fest.asyncIteratorDrop.mjs.map → iter-fest.iterableAt.mjs.map} +0 -0
- /package/dist/{iter-fest.asyncIteratorEvery.mjs.map → iter-fest.iterableConcat.mjs.map} +0 -0
- /package/dist/{iter-fest.asyncIteratorFilter.mjs.map → iter-fest.iterableEntries.mjs.map} +0 -0
- /package/dist/{iter-fest.asyncIteratorFind.mjs.map → iter-fest.iterableEvery.mjs.map} +0 -0
- /package/dist/{iter-fest.asyncIteratorFlatMap.mjs.map → iter-fest.iterableFilter.mjs.map} +0 -0
- /package/dist/{iter-fest.asyncIteratorForEach.mjs.map → iter-fest.iterableFind.mjs.map} +0 -0
- /package/dist/{iter-fest.asyncIteratorFrom.mjs.map → iter-fest.iterableFindIndex.mjs.map} +0 -0
- /package/dist/{iter-fest.asyncIteratorMap.mjs.map → iter-fest.iterableFindLast.mjs.map} +0 -0
- /package/dist/{iter-fest.asyncIteratorReduce.mjs.map → iter-fest.iterableFindLastIndex.mjs.map} +0 -0
- /package/dist/{iter-fest.asyncIteratorSome.mjs.map → iter-fest.iterableForEach.mjs.map} +0 -0
- /package/dist/{iter-fest.asyncIteratorTake.mjs.map → iter-fest.iterableGetReadable.mjs.map} +0 -0
- /package/dist/{iter-fest.asyncIteratorToArray.mjs.map → iter-fest.iterableIncludes.mjs.map} +0 -0
- /package/dist/{iter-fest.iterableWritableStream.mjs.map → iter-fest.iterableIndexOf.mjs.map} +0 -0
- /package/dist/{iter-fest.iteratorAt.mjs.map → iter-fest.iterableJoin.mjs.map} +0 -0
- /package/dist/{iter-fest.iteratorConcat.mjs.map → iter-fest.iterableKeys.mjs.map} +0 -0
- /package/dist/{iter-fest.iteratorDrop.mjs.map → iter-fest.iterableMap.mjs.map} +0 -0
- /package/dist/{iter-fest.iteratorEntries.mjs.map → iter-fest.iterableReduce.mjs.map} +0 -0
- /package/dist/{iter-fest.iteratorEvery.mjs.map → iter-fest.iterableSlice.mjs.map} +0 -0
- /package/dist/{iter-fest.iteratorFilter.mjs.map → iter-fest.iterableSome.mjs.map} +0 -0
- /package/dist/{iter-fest.iteratorFind.mjs.map → iter-fest.iterableToSpliced.mjs.map} +0 -0
- /package/dist/{iter-fest.iteratorFindIndex.mjs.map → iter-fest.iterableToString.mjs.map} +0 -0
- /package/dist/{iter-fest.iteratorFindLast.mjs.map → iter-fest.pushAsyncIterableIterator.mjs.map} +0 -0
- /package/dist/{iter-fest.iteratorFindLastIndex.mjs.map → iter-fest.readerValues.mjs.map} +0 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/iterableMap.ts
|
|
21
|
+
var iterableMap_exports = {};
|
|
22
|
+
__export(iterableMap_exports, {
|
|
23
|
+
iterableMap: () => iterableMap
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(iterableMap_exports);
|
|
26
|
+
function* iterableMap(iterable, callbackfn, thisArg) {
|
|
27
|
+
let index = 0;
|
|
28
|
+
if (typeof callbackfn !== "function") {
|
|
29
|
+
throw new TypeError(`${callbackfn} is not a function`);
|
|
30
|
+
}
|
|
31
|
+
for (const value of iterable) {
|
|
32
|
+
yield callbackfn.call(thisArg, value, index++, iterable);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
36
|
+
0 && (module.exports = {
|
|
37
|
+
iterableMap
|
|
38
|
+
});
|
|
39
|
+
//# sourceMappingURL=iter-fest.iterableMap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/iterableMap.ts"],"sourcesContent":["/**\n * Calls a defined callback function on each element of an array, and returns an array that contains the results.\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 * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\n */\nexport function* iterableMap<T, U>(\n iterable: Iterable<T>,\n callbackfn: (value: T, index: number, array: Iterable<T>) => U,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n thisArg?: any\n): IterableIterator<U> {\n let index = 0;\n\n if (typeof callbackfn !== 'function') {\n throw new TypeError(`${callbackfn} is not a function`);\n }\n\n for (const value of iterable) {\n yield callbackfn.call(thisArg, value, index++, iterable);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKO,UAAU,YACf,UACA,YAEA,SACqB;AACrB,MAAI,QAAQ;AAEZ,MAAI,OAAO,eAAe,YAAY;AACpC,UAAM,IAAI,UAAU,GAAG,UAAU,oBAAoB;AAAA,EACvD;AAEA,aAAW,SAAS,UAAU;AAC5B,UAAM,WAAW,KAAK,SAAS,OAAO,SAAS,QAAQ;AAAA,EACzD;AACF;","names":[]}
|
|
@@ -1,23 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Calls the specified callback function for all the elements in an
|
|
2
|
+
* Calls the specified callback function for all the elements in an iterable. 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.
|
|
3
3
|
*
|
|
4
|
-
* @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the
|
|
4
|
+
* @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the iterable.
|
|
5
5
|
*
|
|
6
|
-
* @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
|
|
7
|
-
*
|
|
8
|
-
* @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md
|
|
6
|
+
* @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 iterable value.
|
|
9
7
|
*/
|
|
10
|
-
declare function
|
|
11
|
-
declare function
|
|
8
|
+
declare function iterableReduce<T>(iterable: Iterable<T>, callbackfn: (previousValue: T, currentValue: T, currentIndex: number, iterable: Iterable<T>) => T): T;
|
|
9
|
+
declare function iterableReduce<T>(iterable: Iterable<T>, callbackfn: (previousValue: T, currentValue: T, currentIndex: number, iterable: Iterable<T>) => T, initialValue: T): T;
|
|
12
10
|
/**
|
|
13
|
-
* Calls the specified callback function for all the elements in an
|
|
11
|
+
* Calls the specified callback function for all the elements in an iterable. 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.
|
|
14
12
|
*
|
|
15
|
-
* @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the
|
|
13
|
+
* @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the iterable.
|
|
16
14
|
*
|
|
17
15
|
* @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.
|
|
18
|
-
*
|
|
19
|
-
* @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md
|
|
20
16
|
*/
|
|
21
|
-
declare function
|
|
17
|
+
declare function iterableReduce<T, U>(iterable: Iterable<T>, callbackfn: (previousValue: U, currentValue: T, currentIndex: number, iterable: Iterable<T>) => U, initialValue: U): U;
|
|
22
18
|
|
|
23
|
-
export {
|
|
19
|
+
export { iterableReduce };
|
|
@@ -1,23 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Calls the specified callback function for all the elements in an
|
|
2
|
+
* Calls the specified callback function for all the elements in an iterable. 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.
|
|
3
3
|
*
|
|
4
|
-
* @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the
|
|
4
|
+
* @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the iterable.
|
|
5
5
|
*
|
|
6
|
-
* @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
|
|
7
|
-
*
|
|
8
|
-
* @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md
|
|
6
|
+
* @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 iterable value.
|
|
9
7
|
*/
|
|
10
|
-
declare function
|
|
11
|
-
declare function
|
|
8
|
+
declare function iterableReduce<T>(iterable: Iterable<T>, callbackfn: (previousValue: T, currentValue: T, currentIndex: number, iterable: Iterable<T>) => T): T;
|
|
9
|
+
declare function iterableReduce<T>(iterable: Iterable<T>, callbackfn: (previousValue: T, currentValue: T, currentIndex: number, iterable: Iterable<T>) => T, initialValue: T): T;
|
|
12
10
|
/**
|
|
13
|
-
* Calls the specified callback function for all the elements in an
|
|
11
|
+
* Calls the specified callback function for all the elements in an iterable. 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.
|
|
14
12
|
*
|
|
15
|
-
* @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the
|
|
13
|
+
* @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the iterable.
|
|
16
14
|
*
|
|
17
15
|
* @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.
|
|
18
|
-
*
|
|
19
|
-
* @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md
|
|
20
16
|
*/
|
|
21
|
-
declare function
|
|
17
|
+
declare function iterableReduce<T, U>(iterable: Iterable<T>, callbackfn: (previousValue: U, currentValue: T, currentIndex: number, iterable: Iterable<T>) => U, initialValue: U): U;
|
|
22
18
|
|
|
23
|
-
export {
|
|
19
|
+
export { iterableReduce };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/iterableReduce.ts
|
|
21
|
+
var iterableReduce_exports = {};
|
|
22
|
+
__export(iterableReduce_exports, {
|
|
23
|
+
iterableReduce: () => iterableReduce
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(iterableReduce_exports);
|
|
26
|
+
function iterableReduce(iterable, callbackfn, initialValue) {
|
|
27
|
+
let index = 0;
|
|
28
|
+
let previousValue = initialValue;
|
|
29
|
+
if (typeof callbackfn !== "function") {
|
|
30
|
+
throw new TypeError(`${callbackfn} is not a function`);
|
|
31
|
+
}
|
|
32
|
+
for (const currentValue of iterable) {
|
|
33
|
+
previousValue = callbackfn(previousValue, currentValue, index++, iterable);
|
|
34
|
+
}
|
|
35
|
+
return previousValue;
|
|
36
|
+
}
|
|
37
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
38
|
+
0 && (module.exports = {
|
|
39
|
+
iterableReduce
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=iter-fest.iterableReduce.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/iterableReduce.ts"],"sourcesContent":["/**\n * Calls the specified callback function for all the elements in an iterable. 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 iterable.\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 iterable value.\n */\nexport function iterableReduce<T>(\n iterable: Iterable<T>,\n callbackfn: (previousValue: T, currentValue: T, currentIndex: number, iterable: Iterable<T>) => T\n): T;\n\nexport function iterableReduce<T>(\n iterable: Iterable<T>,\n callbackfn: (previousValue: T, currentValue: T, currentIndex: number, iterable: Iterable<T>) => T,\n initialValue: T\n): T;\n\n/**\n * Calls the specified callback function for all the elements in an iterable. 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 iterable.\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\nexport function iterableReduce<T, U>(\n iterable: Iterable<T>,\n callbackfn: (previousValue: U, currentValue: T, currentIndex: number, iterable: Iterable<T>) => U,\n initialValue: U\n): U;\n\nexport function iterableReduce<T, U = undefined>(\n iterable: Iterable<T>,\n callbackfn: (previousValue: U | undefined, currentValue: T, currentIndex: number, iterable: Iterable<T>) => U,\n initialValue?: U\n): U | undefined {\n let index = 0;\n let previousValue: U | undefined = initialValue;\n\n if (typeof callbackfn !== 'function') {\n throw new TypeError(`${callbackfn} is not a function`);\n }\n\n for (const currentValue of iterable) {\n previousValue = callbackfn(previousValue, currentValue, index++, iterable);\n }\n\n return previousValue;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAgCO,SAAS,eACd,UACA,YACA,cACe;AACf,MAAI,QAAQ;AACZ,MAAI,gBAA+B;AAEnC,MAAI,OAAO,eAAe,YAAY;AACpC,UAAM,IAAI,UAAU,GAAG,UAAU,oBAAoB;AAAA,EACvD;AAEA,aAAW,gBAAgB,UAAU;AACnC,oBAAgB,WAAW,eAAe,cAAc,SAAS,QAAQ;AAAA,EAC3E;AAEA,SAAO;AACT;","names":[]}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Returns a copy of a section of an
|
|
3
|
-
* For both start and end, a negative index can be used to indicate an offset from the end of the
|
|
4
|
-
* For example, -2 refers to the second to last element of the
|
|
2
|
+
* Returns a copy of a section of an iterable.
|
|
3
|
+
* For both start and end, a negative index can be used to indicate an offset from the end of the iterable.
|
|
4
|
+
* For example, -2 refers to the second to last element of the iterable.
|
|
5
5
|
*
|
|
6
|
-
* @param start The beginning index of the specified portion of the
|
|
6
|
+
* @param start The beginning index of the specified portion of the iterable.
|
|
7
7
|
* If start is undefined, then the slice begins at index 0.
|
|
8
8
|
*
|
|
9
|
-
* @param end The end index of the specified portion of the
|
|
10
|
-
* If end is undefined, then the slice extends to the end of the
|
|
9
|
+
* @param end The end index of the specified portion of the iterable. This is exclusive of the element at the index 'end'.
|
|
10
|
+
* If end is undefined, then the slice extends to the end of the iterable.
|
|
11
11
|
*/
|
|
12
|
-
declare function
|
|
12
|
+
declare function iterableSlice<T>(iterable: Iterable<T>, start?: number, end?: number): Iterable<T>;
|
|
13
13
|
|
|
14
|
-
export {
|
|
14
|
+
export { iterableSlice };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Returns a copy of a section of an
|
|
3
|
-
* For both start and end, a negative index can be used to indicate an offset from the end of the
|
|
4
|
-
* For example, -2 refers to the second to last element of the
|
|
2
|
+
* Returns a copy of a section of an iterable.
|
|
3
|
+
* For both start and end, a negative index can be used to indicate an offset from the end of the iterable.
|
|
4
|
+
* For example, -2 refers to the second to last element of the iterable.
|
|
5
5
|
*
|
|
6
|
-
* @param start The beginning index of the specified portion of the
|
|
6
|
+
* @param start The beginning index of the specified portion of the iterable.
|
|
7
7
|
* If start is undefined, then the slice begins at index 0.
|
|
8
8
|
*
|
|
9
|
-
* @param end The end index of the specified portion of the
|
|
10
|
-
* If end is undefined, then the slice extends to the end of the
|
|
9
|
+
* @param end The end index of the specified portion of the iterable. This is exclusive of the element at the index 'end'.
|
|
10
|
+
* If end is undefined, then the slice extends to the end of the iterable.
|
|
11
11
|
*/
|
|
12
|
-
declare function
|
|
12
|
+
declare function iterableSlice<T>(iterable: Iterable<T>, start?: number, end?: number): Iterable<T>;
|
|
13
13
|
|
|
14
|
-
export {
|
|
14
|
+
export { iterableSlice };
|
|
@@ -17,23 +17,12 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
|
|
20
|
-
// src/
|
|
21
|
-
var
|
|
22
|
-
__export(
|
|
23
|
-
|
|
20
|
+
// src/iterableSlice.ts
|
|
21
|
+
var iterableSlice_exports = {};
|
|
22
|
+
__export(iterableSlice_exports, {
|
|
23
|
+
iterableSlice: () => iterableSlice
|
|
24
24
|
});
|
|
25
|
-
module.exports = __toCommonJS(
|
|
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
|
-
}
|
|
25
|
+
module.exports = __toCommonJS(iterableSlice_exports);
|
|
37
26
|
|
|
38
27
|
// src/private/toIntegerOrInfinity.ts
|
|
39
28
|
function toIntegerOrInfinity(value) {
|
|
@@ -43,8 +32,8 @@ function toIntegerOrInfinity(value) {
|
|
|
43
32
|
return ~~value;
|
|
44
33
|
}
|
|
45
34
|
|
|
46
|
-
// src/
|
|
47
|
-
function*
|
|
35
|
+
// src/iterableSlice.ts
|
|
36
|
+
function* iterableSlice(iterable, start = 0, end = Infinity) {
|
|
48
37
|
let index = 0;
|
|
49
38
|
start = toIntegerOrInfinity(start);
|
|
50
39
|
start = start === -Infinity ? 0 : start;
|
|
@@ -59,7 +48,7 @@ function* iteratorSlice(iterator, start = 0, end = Infinity) {
|
|
|
59
48
|
if (start === Infinity) {
|
|
60
49
|
return;
|
|
61
50
|
}
|
|
62
|
-
for (const item of
|
|
51
|
+
for (const item of iterable) {
|
|
63
52
|
if (index >= start && index < end) {
|
|
64
53
|
yield item;
|
|
65
54
|
}
|
|
@@ -71,6 +60,6 @@ function* iteratorSlice(iterator, start = 0, end = Infinity) {
|
|
|
71
60
|
}
|
|
72
61
|
// Annotate the CommonJS export names for ESM import in node:
|
|
73
62
|
0 && (module.exports = {
|
|
74
|
-
|
|
63
|
+
iterableSlice
|
|
75
64
|
});
|
|
76
|
-
//# sourceMappingURL=iter-fest.
|
|
65
|
+
//# sourceMappingURL=iter-fest.iterableSlice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/iterableSlice.ts","../src/private/toIntegerOrInfinity.ts"],"sourcesContent":["import toIntegerOrInfinity from './private/toIntegerOrInfinity';\n\n/**\n * Returns a copy of a section of an iterable.\n * For both start and end, a negative index can be used to indicate an offset from the end of the iterable.\n * For example, -2 refers to the second to last element of the iterable.\n *\n * @param start The beginning index of the specified portion of the iterable.\n * If start is undefined, then the slice begins at index 0.\n *\n * @param end The end index of the specified portion of the iterable. This is exclusive of the element at the index 'end'.\n * If end is undefined, then the slice extends to the end of the iterable.\n */\nexport function* iterableSlice<T>(iterable: Iterable<T>, start: number = 0, end: number = Infinity): Iterable<T> {\n let index = 0;\n\n start = toIntegerOrInfinity(start);\n start = start === -Infinity ? 0 : start;\n end = toIntegerOrInfinity(end);\n end = end === -Infinity ? 0 : end;\n\n if (start < 0) {\n throw new TypeError('start cannot be a negative finite number');\n }\n\n if (end < 0) {\n throw new TypeError('end cannot be a negative finite number');\n }\n\n if (start === Infinity) {\n return;\n }\n\n for (const item of iterable) {\n if (index >= start && index < end) {\n yield item;\n }\n\n index++;\n\n if (index > end) {\n break;\n }\n }\n}\n","export default function toIntegerOrInfinity(value: number): number {\n if (value === Infinity || value === -Infinity) {\n return value;\n }\n\n return ~~value;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAe,SAAR,oBAAqC,OAAuB;AACjE,MAAI,UAAU,YAAY,UAAU,WAAW;AAC7C,WAAO;AAAA,EACT;AAEA,SAAO,CAAC,CAAC;AACX;;;ADOO,UAAU,cAAiB,UAAuB,QAAgB,GAAG,MAAc,UAAuB;AAC/G,MAAI,QAAQ;AAEZ,UAAQ,oBAAoB,KAAK;AACjC,UAAQ,UAAU,YAAY,IAAI;AAClC,QAAM,oBAAoB,GAAG;AAC7B,QAAM,QAAQ,YAAY,IAAI;AAE9B,MAAI,QAAQ,GAAG;AACb,UAAM,IAAI,UAAU,0CAA0C;AAAA,EAChE;AAEA,MAAI,MAAM,GAAG;AACX,UAAM,IAAI,UAAU,wCAAwC;AAAA,EAC9D;AAEA,MAAI,UAAU,UAAU;AACtB;AAAA,EACF;AAEA,aAAW,QAAQ,UAAU;AAC3B,QAAI,SAAS,SAAS,QAAQ,KAAK;AACjC,YAAM;AAAA,IACR;AAEA;AAEA,QAAI,QAAQ,KAAK;AACf;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Determines whether the specified callback function returns true for any element of an iterable.
|
|
3
|
+
*
|
|
4
|
+
* @param predicate
|
|
5
|
+
* A function that accepts up to three arguments. The some method calls the predicate function for each element in the iterable until the predicate returns a value which is coercible to the Boolean value true, or until the end of the iterable.
|
|
6
|
+
*
|
|
7
|
+
* @param thisArg
|
|
8
|
+
* An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
|
|
9
|
+
*/
|
|
10
|
+
declare function iterableSome<T>(iterable: Iterable<T>, predicate: (value: T, index: number, iterable: Iterable<T>) => unknown, thisArg?: any): boolean;
|
|
11
|
+
|
|
12
|
+
export { iterableSome };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Determines whether the specified callback function returns true for any element of an iterable.
|
|
3
|
+
*
|
|
4
|
+
* @param predicate
|
|
5
|
+
* A function that accepts up to three arguments. The some method calls the predicate function for each element in the iterable until the predicate returns a value which is coercible to the Boolean value true, or until the end of the iterable.
|
|
6
|
+
*
|
|
7
|
+
* @param thisArg
|
|
8
|
+
* An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
|
|
9
|
+
*/
|
|
10
|
+
declare function iterableSome<T>(iterable: Iterable<T>, predicate: (value: T, index: number, iterable: Iterable<T>) => unknown, thisArg?: any): boolean;
|
|
11
|
+
|
|
12
|
+
export { iterableSome };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/iterableSome.ts
|
|
21
|
+
var iterableSome_exports = {};
|
|
22
|
+
__export(iterableSome_exports, {
|
|
23
|
+
iterableSome: () => iterableSome
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(iterableSome_exports);
|
|
26
|
+
function iterableSome(iterable, predicate, thisArg = void 0) {
|
|
27
|
+
let index = 0;
|
|
28
|
+
if (typeof predicate !== "function") {
|
|
29
|
+
throw new TypeError(`${predicate} is not a function`);
|
|
30
|
+
}
|
|
31
|
+
const boundPredicate = predicate.bind(thisArg);
|
|
32
|
+
for (const value of iterable) {
|
|
33
|
+
if (boundPredicate(value, index++, iterable)) {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
40
|
+
0 && (module.exports = {
|
|
41
|
+
iterableSome
|
|
42
|
+
});
|
|
43
|
+
//# sourceMappingURL=iter-fest.iterableSome.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/iterableSome.ts"],"sourcesContent":["/**\n * Determines whether the specified callback function returns true for any element of an iterable.\n *\n * @param predicate\n * A function that accepts up to three arguments. The some method calls the predicate function for each element in the iterable until the predicate returns a value which is coercible to the Boolean value true, or until the end of the iterable.\n *\n * @param thisArg\n * An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.\n */\nexport function iterableSome<T>(\n iterable: Iterable<T>,\n predicate: (value: T, index: number, iterable: Iterable<T>) => unknown,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n thisArg: any = undefined\n): boolean {\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 iterable) {\n if (boundPredicate(value, index++, iterable)) {\n return true;\n }\n }\n\n return false;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AASO,SAAS,aACd,UACA,WAEA,UAAe,QACN;AACT,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,UAAU;AAC5B,QAAI,eAAe,OAAO,SAAS,QAAQ,GAAG;AAC5C,aAAO;AAAA,IACT;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
* @param items Elements to insert into the copied array in place of the deleted elements.
|
|
6
6
|
* @returns The copied array.
|
|
7
7
|
*/
|
|
8
|
-
declare function
|
|
8
|
+
declare function iterableToSpliced<T>(iterable: Iterable<T>, start?: number | undefined, deleteCount?: number | undefined, ...items: T[]): Iterable<T>;
|
|
9
9
|
/**
|
|
10
10
|
* Copies an array and removes elements while returning the remaining elements.
|
|
11
11
|
* @param start The zero-based location in the array from which to start removing elements.
|
|
12
12
|
* @param deleteCount The number of elements to remove.
|
|
13
13
|
* @returns A copy of the original array with the remaining elements.
|
|
14
14
|
*/
|
|
15
|
-
declare function
|
|
15
|
+
declare function iterableToSpliced<T>(iterable: Iterable<T>, start?: number | undefined, deleteCount?: number | undefined): Iterable<T>;
|
|
16
16
|
|
|
17
|
-
export {
|
|
17
|
+
export { iterableToSpliced };
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
* @param items Elements to insert into the copied array in place of the deleted elements.
|
|
6
6
|
* @returns The copied array.
|
|
7
7
|
*/
|
|
8
|
-
declare function
|
|
8
|
+
declare function iterableToSpliced<T>(iterable: Iterable<T>, start?: number | undefined, deleteCount?: number | undefined, ...items: T[]): Iterable<T>;
|
|
9
9
|
/**
|
|
10
10
|
* Copies an array and removes elements while returning the remaining elements.
|
|
11
11
|
* @param start The zero-based location in the array from which to start removing elements.
|
|
12
12
|
* @param deleteCount The number of elements to remove.
|
|
13
13
|
* @returns A copy of the original array with the remaining elements.
|
|
14
14
|
*/
|
|
15
|
-
declare function
|
|
15
|
+
declare function iterableToSpliced<T>(iterable: Iterable<T>, start?: number | undefined, deleteCount?: number | undefined): Iterable<T>;
|
|
16
16
|
|
|
17
|
-
export {
|
|
17
|
+
export { iterableToSpliced };
|
|
@@ -17,23 +17,12 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
|
|
20
|
-
// src/
|
|
21
|
-
var
|
|
22
|
-
__export(
|
|
23
|
-
|
|
20
|
+
// src/iterableToSpliced.ts
|
|
21
|
+
var iterableToSpliced_exports = {};
|
|
22
|
+
__export(iterableToSpliced_exports, {
|
|
23
|
+
iterableToSpliced: () => iterableToSpliced
|
|
24
24
|
});
|
|
25
|
-
module.exports = __toCommonJS(
|
|
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
|
-
}
|
|
25
|
+
module.exports = __toCommonJS(iterableToSpliced_exports);
|
|
37
26
|
|
|
38
27
|
// src/private/toIntegerOrInfinity.ts
|
|
39
28
|
function toIntegerOrInfinity(value) {
|
|
@@ -43,8 +32,8 @@ function toIntegerOrInfinity(value) {
|
|
|
43
32
|
return ~~value;
|
|
44
33
|
}
|
|
45
34
|
|
|
46
|
-
// src/
|
|
47
|
-
function*
|
|
35
|
+
// src/iterableToSpliced.ts
|
|
36
|
+
function* iterableToSpliced(iterable, start = 0, deleteCount = 0, ...items) {
|
|
48
37
|
let index = 0;
|
|
49
38
|
start = toIntegerOrInfinity(start);
|
|
50
39
|
start = start === -Infinity ? 0 : start;
|
|
@@ -52,7 +41,7 @@ function* iteratorToSpliced(iterator, start = 0, deleteCount = 0, ...items) {
|
|
|
52
41
|
throw new TypeError("start cannot be a negative finite number");
|
|
53
42
|
}
|
|
54
43
|
let inserted = false;
|
|
55
|
-
for (const item of
|
|
44
|
+
for (const item of iterable) {
|
|
56
45
|
if (index + 1 > start && !inserted) {
|
|
57
46
|
yield* items;
|
|
58
47
|
inserted = true;
|
|
@@ -68,6 +57,6 @@ function* iteratorToSpliced(iterator, start = 0, deleteCount = 0, ...items) {
|
|
|
68
57
|
}
|
|
69
58
|
// Annotate the CommonJS export names for ESM import in node:
|
|
70
59
|
0 && (module.exports = {
|
|
71
|
-
|
|
60
|
+
iterableToSpliced
|
|
72
61
|
});
|
|
73
|
-
//# sourceMappingURL=iter-fest.
|
|
62
|
+
//# sourceMappingURL=iter-fest.iterableToSpliced.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/iterableToSpliced.ts","../src/private/toIntegerOrInfinity.ts"],"sourcesContent":["import 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 iterableToSpliced<T>(\n iterable: Iterable<T>,\n start?: number | undefined,\n deleteCount?: number | undefined,\n ...items: T[]\n): Iterable<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 iterableToSpliced<T>(\n iterable: Iterable<T>,\n start?: number | undefined,\n deleteCount?: number | undefined\n): Iterable<T>;\n\nexport function* iterableToSpliced<T>(\n iterable: Iterable<T>,\n start: number = 0,\n deleteCount: number = 0,\n ...items: T[]\n): Iterable<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 iterable) {\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","export default function toIntegerOrInfinity(value: number): number {\n if (value === Infinity || value === -Infinity) {\n return value;\n }\n\n return ~~value;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAe,SAAR,oBAAqC,OAAuB;AACjE,MAAI,UAAU,YAAY,UAAU,WAAW;AAC7C,WAAO;AAAA,EACT;AAEA,SAAO,CAAC,CAAC;AACX;;;ADsBO,UAAU,kBACf,UACA,QAAgB,GAChB,cAAsB,MACnB,OACU;AACb,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,UAAU;AAC3B,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":[]}
|
|
@@ -17,29 +17,18 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
|
|
20
|
-
// src/
|
|
21
|
-
var
|
|
22
|
-
__export(
|
|
23
|
-
|
|
20
|
+
// src/iterableToString.ts
|
|
21
|
+
var iterableToString_exports = {};
|
|
22
|
+
__export(iterableToString_exports, {
|
|
23
|
+
iterableToString: () => iterableToString
|
|
24
24
|
});
|
|
25
|
-
module.exports = __toCommonJS(
|
|
25
|
+
module.exports = __toCommonJS(iterableToString_exports);
|
|
26
26
|
|
|
27
|
-
// src/
|
|
28
|
-
function
|
|
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
|
-
}
|
|
37
|
-
|
|
38
|
-
// src/iteratorJoin.ts
|
|
39
|
-
function iteratorJoin(iterator, separator = ",") {
|
|
27
|
+
// src/iterableJoin.ts
|
|
28
|
+
function iterableJoin(iterable, separator = ",") {
|
|
40
29
|
let index = 0;
|
|
41
30
|
let result = "";
|
|
42
|
-
for (const item of
|
|
31
|
+
for (const item of iterable) {
|
|
43
32
|
if (index) {
|
|
44
33
|
result += separator;
|
|
45
34
|
}
|
|
@@ -50,8 +39,13 @@ function iteratorJoin(iterator, separator = ",") {
|
|
|
50
39
|
}
|
|
51
40
|
return result;
|
|
52
41
|
}
|
|
42
|
+
|
|
43
|
+
// src/iterableToString.ts
|
|
44
|
+
function iterableToString(iterable) {
|
|
45
|
+
return iterableJoin(iterable);
|
|
46
|
+
}
|
|
53
47
|
// Annotate the CommonJS export names for ESM import in node:
|
|
54
48
|
0 && (module.exports = {
|
|
55
|
-
|
|
49
|
+
iterableToString
|
|
56
50
|
});
|
|
57
|
-
//# sourceMappingURL=iter-fest.
|
|
51
|
+
//# sourceMappingURL=iter-fest.iterableToString.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/iterableToString.ts","../src/iterableJoin.ts"],"sourcesContent":["import { iterableJoin } from './iterableJoin';\n\n/**\n * Returns a string representation of an iterable.\n */\nexport function iterableToString<T>(iterable: Iterable<T>): string {\n return iterableJoin(iterable);\n}\n","/**\n * Adds all the elements of an iterable into a string, separated by the specified separator string.\n *\n * @param separator A string used to separate one element of the iterable from the next in the resulting string. If omitted, the iterable elements are separated with a comma.\n */\nexport function iterableJoin<T>(iterable: Iterable<T>, separator: string = ','): string {\n let index = 0;\n let result = '';\n\n for (const item of iterable) {\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":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACKO,SAAS,aAAgB,UAAuB,YAAoB,KAAa;AACtF,MAAI,QAAQ;AACZ,MAAI,SAAS;AAEb,aAAW,QAAQ,UAAU;AAC3B,QAAI,OAAO;AACT,gBAAU;AAAA,IACZ;AAEA,QAAI,OAAO,SAAS,eAAe,SAAS,MAAM;AAChD,gBAAU;AAAA,IACZ;AAEA;AAAA,EACF;AAEA,SAAO;AACT;;;ADjBO,SAAS,iBAAoB,UAA+B;AACjE,SAAO,aAAa,QAAQ;AAC9B;","names":[]}
|