iter-fest 0.1.1-main.f9dfd27 → 0.2.1-main.3735548
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 +189 -62
- 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-4RT2FROS.mjs +10 -0
- package/dist/chunk-4RT2FROS.mjs.map +1 -0
- package/dist/chunk-4ZBMXHD6.mjs +10 -0
- package/dist/chunk-4ZBMXHD6.mjs.map +1 -0
- package/dist/chunk-72AEHTPQ.mjs +38 -0
- package/dist/chunk-72AEHTPQ.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-AOZVPHE4.mjs +10 -0
- package/dist/chunk-AOZVPHE4.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-CNKIGQUS.mjs +10 -0
- package/dist/chunk-CNKIGQUS.mjs.map +1 -0
- package/dist/chunk-DC2ZV7KQ.mjs +10 -0
- package/dist/chunk-DC2ZV7KQ.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-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-FMIHIL6A.mjs +10 -0
- package/dist/chunk-FMIHIL6A.mjs.map +1 -0
- package/dist/chunk-GFJGWVES.mjs +10 -0
- package/dist/chunk-GFJGWVES.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-J3FQSENW.mjs +10 -0
- package/dist/chunk-J3FQSENW.mjs.map +1 -0
- package/dist/chunk-JVR6BUJA.mjs +10 -0
- package/dist/chunk-JVR6BUJA.mjs.map +1 -0
- package/dist/chunk-K4RCFPTZ.mjs +10 -0
- package/dist/chunk-K4RCFPTZ.mjs.map +1 -0
- package/dist/chunk-LB3MK3EU.mjs +10 -0
- package/dist/chunk-LB3MK3EU.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-NLXKATXE.mjs +10 -0
- package/dist/chunk-NLXKATXE.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-ODPKEUIR.mjs +10 -0
- package/dist/chunk-ODPKEUIR.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-QLVU73KN.mjs +10 -0
- package/dist/chunk-QLVU73KN.mjs.map +1 -0
- package/dist/chunk-R6SXIXMH.mjs +10 -0
- package/dist/chunk-R6SXIXMH.mjs.map +1 -0
- package/dist/{chunk-EUVK4YM7.mjs → chunk-RVIERPEV.mjs} +6 -5
- package/dist/chunk-RVIERPEV.mjs.map +1 -0
- package/dist/chunk-S2LECQKY.mjs +10 -0
- package/dist/chunk-S2LECQKY.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-VIMGYUMQ.mjs +10 -0
- package/dist/chunk-VIMGYUMQ.mjs.map +1 -0
- package/dist/chunk-WUFMEPOM.mjs +10 -0
- package/dist/chunk-WUFMEPOM.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/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.asyncIteratorDrop.d.mts +12 -0
- package/dist/iter-fest.asyncIteratorDrop.d.ts +12 -0
- package/dist/iter-fest.asyncIteratorDrop.js +44 -0
- package/dist/iter-fest.asyncIteratorDrop.js.map +1 -0
- package/dist/iter-fest.asyncIteratorDrop.mjs +7 -0
- package/dist/iter-fest.asyncIteratorEvery.d.mts +25 -0
- package/dist/iter-fest.asyncIteratorEvery.d.ts +25 -0
- package/dist/iter-fest.asyncIteratorEvery.js +44 -0
- package/dist/iter-fest.asyncIteratorEvery.js.map +1 -0
- package/dist/iter-fest.asyncIteratorEvery.mjs +7 -0
- package/dist/iter-fest.asyncIteratorFilter.d.mts +18 -0
- package/dist/iter-fest.asyncIteratorFilter.d.ts +18 -0
- package/dist/iter-fest.asyncIteratorFilter.js +44 -0
- package/dist/iter-fest.asyncIteratorFilter.js.map +1 -0
- package/dist/iter-fest.asyncIteratorFilter.mjs +7 -0
- package/dist/iter-fest.asyncIteratorFind.d.mts +14 -0
- package/dist/iter-fest.asyncIteratorFind.d.ts +14 -0
- package/dist/iter-fest.asyncIteratorFind.js +44 -0
- package/dist/iter-fest.asyncIteratorFind.js.map +1 -0
- package/dist/iter-fest.asyncIteratorFind.mjs +7 -0
- package/dist/iter-fest.asyncIteratorFlatMap.d.mts +12 -0
- package/dist/iter-fest.asyncIteratorFlatMap.d.ts +12 -0
- package/dist/iter-fest.asyncIteratorFlatMap.js +44 -0
- package/dist/iter-fest.asyncIteratorFlatMap.js.map +1 -0
- package/dist/iter-fest.asyncIteratorFlatMap.mjs +7 -0
- package/dist/iter-fest.asyncIteratorForEach.d.mts +10 -0
- package/dist/iter-fest.asyncIteratorForEach.d.ts +10 -0
- package/dist/iter-fest.asyncIteratorForEach.js +44 -0
- package/dist/iter-fest.asyncIteratorForEach.js.map +1 -0
- package/dist/iter-fest.asyncIteratorForEach.mjs +7 -0
- package/dist/iter-fest.asyncIteratorFrom.d.mts +10 -0
- package/dist/iter-fest.asyncIteratorFrom.d.ts +10 -0
- package/dist/iter-fest.asyncIteratorFrom.js +44 -0
- package/dist/iter-fest.asyncIteratorFrom.js.map +1 -0
- package/dist/iter-fest.asyncIteratorFrom.mjs +7 -0
- package/dist/iter-fest.asyncIteratorMap.d.mts +10 -0
- package/dist/iter-fest.asyncIteratorMap.d.ts +10 -0
- package/dist/iter-fest.asyncIteratorMap.js +44 -0
- package/dist/iter-fest.asyncIteratorMap.js.map +1 -0
- package/dist/iter-fest.asyncIteratorMap.mjs +7 -0
- package/dist/iter-fest.asyncIteratorReduce.d.mts +23 -0
- package/dist/iter-fest.asyncIteratorReduce.d.ts +23 -0
- package/dist/iter-fest.asyncIteratorReduce.js +44 -0
- package/dist/iter-fest.asyncIteratorReduce.js.map +1 -0
- package/dist/iter-fest.asyncIteratorReduce.mjs +7 -0
- package/dist/iter-fest.asyncIteratorSome.d.mts +10 -0
- package/dist/iter-fest.asyncIteratorSome.d.ts +10 -0
- package/dist/iter-fest.asyncIteratorSome.js +44 -0
- package/dist/iter-fest.asyncIteratorSome.js.map +1 -0
- package/dist/iter-fest.asyncIteratorSome.mjs +7 -0
- package/dist/iter-fest.asyncIteratorTake.d.mts +12 -0
- package/dist/iter-fest.asyncIteratorTake.d.ts +12 -0
- package/dist/iter-fest.asyncIteratorTake.js +44 -0
- package/dist/iter-fest.asyncIteratorTake.js.map +1 -0
- package/dist/iter-fest.asyncIteratorTake.mjs +7 -0
- package/dist/iter-fest.asyncIteratorToArray.d.mts +10 -0
- package/dist/iter-fest.asyncIteratorToArray.d.ts +10 -0
- package/dist/iter-fest.asyncIteratorToArray.js +44 -0
- package/dist/iter-fest.asyncIteratorToArray.js.map +1 -0
- package/dist/iter-fest.asyncIteratorToArray.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 +45 -22
- package/dist/iter-fest.d.ts +45 -22
- 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.pushAsyncIterableIterator.js → iter-fest.iterableWritableStream.js} +39 -30
- 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.iteratorFind.mjs.map +1 -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.iteratorFindIndex.mjs.map +1 -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.iteratorFindLast.mjs.map +1 -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.iteratorFindLastIndex.mjs.map +1 -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.iteratorFlatMap.mjs.map +1 -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.iteratorForEach.mjs.map +1 -0
- package/dist/iter-fest.iteratorFrom.d.mts +10 -0
- package/dist/iter-fest.iteratorFrom.d.ts +10 -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.iteratorFrom.mjs.map +1 -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.iteratorIncludes.mjs.map +1 -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.iteratorIndexOf.mjs.map +1 -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.iteratorJoin.mjs.map +1 -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 +10 -0
- package/dist/iter-fest.iteratorToArray.d.ts +10 -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.iteratorToAsync.d.mts +10 -0
- package/dist/iter-fest.iteratorToAsync.d.ts +10 -0
- package/dist/iter-fest.iteratorToAsync.js +44 -0
- package/dist/iter-fest.iteratorToAsync.js.map +1 -0
- package/dist/iter-fest.iteratorToAsync.mjs +7 -0
- package/dist/iter-fest.iteratorToAsync.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 +442 -210
- package/dist/iter-fest.js.map +1 -1
- package/dist/iter-fest.mjs +165 -73
- package/dist/iter-fest.observableValues.d.mts +7 -0
- package/dist/iter-fest.observableValues.d.ts +7 -0
- package/dist/iter-fest.observableValues.js +102 -0
- package/dist/iter-fest.observableValues.js.map +1 -0
- package/dist/iter-fest.observableValues.mjs +9 -0
- package/dist/iter-fest.observableValues.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.iterableFilter.js → iter-fest.readableStreamFrom.js} +21 -17
- 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.readableStreamValues.d.mts +3 -0
- package/dist/iter-fest.readableStreamValues.d.ts +3 -0
- package/dist/{iter-fest.readerValues.js → iter-fest.readableStreamValues.js} +10 -9
- package/dist/iter-fest.readableStreamValues.js.map +1 -0
- package/dist/iter-fest.readableStreamValues.mjs +7 -0
- package/dist/iter-fest.readableStreamValues.mjs.map +1 -0
- package/package.json +342 -112
- 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-EUVK4YM7.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-O5SQJUKB.mjs +0 -37
- package/dist/chunk-O5SQJUKB.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 +0 -43
- 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.pushAsyncIterableIterator.d.mts +0 -9
- package/dist/iter-fest.pushAsyncIterableIterator.d.ts +0 -9
- package/dist/iter-fest.pushAsyncIterableIterator.js.map +0 -1
- package/dist/iter-fest.pushAsyncIterableIterator.mjs +0 -7
- package/dist/iter-fest.readerValues.d.mts +0 -3
- package/dist/iter-fest.readerValues.d.ts +0 -3
- package/dist/iter-fest.readerValues.js.map +0 -1
- package/dist/iter-fest.readerValues.mjs +0 -7
- /package/dist/{iter-fest.iterableAt.mjs.map → iter-fest.asyncGeneratorWithLastValue.mjs.map} +0 -0
- /package/dist/{iter-fest.iterableConcat.mjs.map → iter-fest.asyncIteratorDrop.mjs.map} +0 -0
- /package/dist/{iter-fest.iterableEntries.mjs.map → iter-fest.asyncIteratorEvery.mjs.map} +0 -0
- /package/dist/{iter-fest.iterableEvery.mjs.map → iter-fest.asyncIteratorFilter.mjs.map} +0 -0
- /package/dist/{iter-fest.iterableFilter.mjs.map → iter-fest.asyncIteratorFind.mjs.map} +0 -0
- /package/dist/{iter-fest.iterableFind.mjs.map → iter-fest.asyncIteratorFlatMap.mjs.map} +0 -0
- /package/dist/{iter-fest.iterableFindIndex.mjs.map → iter-fest.asyncIteratorForEach.mjs.map} +0 -0
- /package/dist/{iter-fest.iterableFindLast.mjs.map → iter-fest.asyncIteratorFrom.mjs.map} +0 -0
- /package/dist/{iter-fest.iterableFindLastIndex.mjs.map → iter-fest.asyncIteratorMap.mjs.map} +0 -0
- /package/dist/{iter-fest.iterableForEach.mjs.map → iter-fest.asyncIteratorReduce.mjs.map} +0 -0
- /package/dist/{iter-fest.iterableIncludes.mjs.map → iter-fest.asyncIteratorSome.mjs.map} +0 -0
- /package/dist/{iter-fest.iterableIndexOf.mjs.map → iter-fest.asyncIteratorTake.mjs.map} +0 -0
- /package/dist/{iter-fest.iterableJoin.mjs.map → iter-fest.asyncIteratorToArray.mjs.map} +0 -0
- /package/dist/{iter-fest.iterableKeys.mjs.map → iter-fest.asyncIteratorToAsyncIterable.mjs.map} +0 -0
- /package/dist/{iter-fest.iterableMap.mjs.map → iter-fest.generatorWithLastValue.mjs.map} +0 -0
- /package/dist/{iter-fest.iterableReduce.mjs.map → iter-fest.iterableWritableStream.mjs.map} +0 -0
- /package/dist/{iter-fest.iterableSlice.mjs.map → iter-fest.iteratorAt.mjs.map} +0 -0
- /package/dist/{iter-fest.iterableSome.mjs.map → iter-fest.iteratorConcat.mjs.map} +0 -0
- /package/dist/{iter-fest.iterableToSpliced.mjs.map → iter-fest.iteratorDrop.mjs.map} +0 -0
- /package/dist/{iter-fest.iterableToString.mjs.map → iter-fest.iteratorEntries.mjs.map} +0 -0
- /package/dist/{iter-fest.pushAsyncIterableIterator.mjs.map → iter-fest.iteratorEvery.mjs.map} +0 -0
- /package/dist/{iter-fest.readerValues.mjs.map → iter-fest.iteratorFilter.mjs.map} +0 -0
package/dist/chunk-5CRMPYKD.mjs
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// src/iterableEvery.ts
|
|
2
|
-
function iterableEvery(iterable, predicate, thisArg = void 0) {
|
|
3
|
-
let index = 0;
|
|
4
|
-
if (typeof predicate !== "function") {
|
|
5
|
-
throw new TypeError(`${predicate} is not a function`);
|
|
6
|
-
}
|
|
7
|
-
const boundPredicate = predicate.bind(thisArg);
|
|
8
|
-
for (const value of iterable) {
|
|
9
|
-
if (!boundPredicate(value, index++, iterable)) {
|
|
10
|
-
return false;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
return true;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export {
|
|
17
|
-
iterableEvery
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=chunk-5CRMPYKD.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/iterableEvery.ts"],"sourcesContent":["/**\n * Determines whether all the members of an iterable 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 iterable until the predicate returns a value\n * which is coercible to the Boolean value false, or until the end of the iterable.\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 */\nexport function iterableEvery<T, S extends T>(\n iterable: Iterable<T>,\n predicate: (value: T, index: number, iterable: Iterable<T>) => value is S,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n thisArg?: any\n): iterable is S[];\n\n/**\n * Determines whether all the members of an iterable 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 iterable until the predicate returns a value\n * which is coercible to the Boolean value false, or until the end of the iterable.\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 */\nexport function iterableEvery<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\n): boolean;\n\nexport function iterableEvery<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 false;\n }\n }\n\n return true;\n}\n"],"mappings":";AAkCO,SAAS,cACd,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,CAAC,eAAe,OAAO,SAAS,QAAQ,GAAG;AAC7C,aAAO;AAAA,IACT;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
|
package/dist/chunk-6C3P4TNK.mjs
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// src/iterableSome.ts
|
|
2
|
-
function iterableSome(iterable, predicate, thisArg = void 0) {
|
|
3
|
-
let index = 0;
|
|
4
|
-
if (typeof predicate !== "function") {
|
|
5
|
-
throw new TypeError(`${predicate} is not a function`);
|
|
6
|
-
}
|
|
7
|
-
const boundPredicate = predicate.bind(thisArg);
|
|
8
|
-
for (const value of iterable) {
|
|
9
|
-
if (boundPredicate(value, index++, iterable)) {
|
|
10
|
-
return true;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
return false;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export {
|
|
17
|
-
iterableSome
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=chunk-6C3P4TNK.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
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":";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":[]}
|
|
@@ -1 +0,0 @@
|
|
|
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":[]}
|
package/dist/chunk-EZC33HE6.mjs
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// src/iterableMap.ts
|
|
2
|
-
function* iterableMap(iterable, callbackfn, thisArg) {
|
|
3
|
-
let index = 0;
|
|
4
|
-
if (typeof callbackfn !== "function") {
|
|
5
|
-
throw new TypeError(`${callbackfn} is not a function`);
|
|
6
|
-
}
|
|
7
|
-
for (const value of iterable) {
|
|
8
|
-
yield callbackfn.call(thisArg, value, index++, iterable);
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export {
|
|
13
|
-
iterableMap
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=chunk-EZC33HE6.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
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":";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":[]}
|
package/dist/chunk-GWZF5BB7.mjs
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// src/iterableConcat.ts
|
|
2
|
-
function* iterableConcat(iterable, ...items) {
|
|
3
|
-
yield* iterable;
|
|
4
|
-
for (const item of items) {
|
|
5
|
-
if (item && typeof item === "object" && Symbol.iterator in item) {
|
|
6
|
-
yield* item;
|
|
7
|
-
} else {
|
|
8
|
-
yield item;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export {
|
|
14
|
-
iterableConcat
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=chunk-GWZF5BB7.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/iterableConcat.ts"],"sourcesContent":["/**\n * Combines two or more iterables.\n * This method returns a new iterable without modifying any existing iterables.\n *\n * @param items Additional iterables and/or items to add to the end of the iterable.\n */\nexport function iterableConcat<T>(iterable: Iterable<T>, ...items: Iterable<T>[]): IterableIterator<T>;\n\n/**\n * Combines two or more iterables.\n * This method returns a new iterable without modifying any existing iterables.\n *\n * @param items Additional iterables and/or items to add to the end of the iterable.\n */\nexport function iterableConcat<T>(iterable: Iterable<T>, ...items: (T | Iterable<T>)[]): IterableIterator<T>;\n\nexport function* iterableConcat<T>(iterable: Iterable<T>, ...items: (T | Iterable<T>)[]): IterableIterator<T> {\n yield* iterable;\n\n for (const item of items) {\n if (item && typeof item === 'object' && Symbol.iterator in item) {\n yield* item;\n } else {\n yield item;\n }\n }\n}\n"],"mappings":";AAgBO,UAAU,eAAkB,aAA0B,OAAiD;AAC5G,SAAO;AAEP,aAAW,QAAQ,OAAO;AACxB,QAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,YAAY,MAAM;AAC/D,aAAO;AAAA,IACT,OAAO;AACL,YAAM;AAAA,IACR;AAAA,EACF;AACF;","names":[]}
|
package/dist/chunk-HYU4EN7J.mjs
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// src/iterableFindIndex.ts
|
|
2
|
-
function iterableFindIndex(iterable, predicate, thisArg) {
|
|
3
|
-
let index = 0;
|
|
4
|
-
if (typeof predicate !== "function") {
|
|
5
|
-
throw new TypeError(`${predicate} is not a function`);
|
|
6
|
-
}
|
|
7
|
-
const boundPredicate = predicate.bind(thisArg);
|
|
8
|
-
for (const value of iterable) {
|
|
9
|
-
if (boundPredicate(value, index, iterable)) {
|
|
10
|
-
return index;
|
|
11
|
-
}
|
|
12
|
-
index++;
|
|
13
|
-
}
|
|
14
|
-
return -1;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export {
|
|
18
|
-
iterableFindIndex
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=chunk-HYU4EN7J.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/iterableFindIndex.ts"],"sourcesContent":["/**\n * Returns the index of the first element in the iterable where predicate is true, and -1\n * otherwise.\n *\n * @param predicate find calls predicate once for each element of the iterable, 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 iterableFindIndex<T>(\n iterable: Iterable<T>,\n predicate: (value: T, index: number, obj: Iterable<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 iterable) {\n if (boundPredicate(value, index, iterable)) {\n return index;\n }\n\n index++;\n }\n\n return -1;\n}\n"],"mappings":";AAWO,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,UAAU;AAC5B,QAAI,eAAe,OAAO,OAAO,QAAQ,GAAG;AAC1C,aAAO;AAAA,IACT;AAEA;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
|
package/dist/chunk-JU353VSE.mjs
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// src/iterableForEach.ts
|
|
2
|
-
function iterableForEach(iterable, callbackfn, thisArg) {
|
|
3
|
-
let index = 0;
|
|
4
|
-
if (typeof callbackfn !== "function") {
|
|
5
|
-
throw new TypeError(`${callbackfn} is not a function`);
|
|
6
|
-
}
|
|
7
|
-
const boundCallbackfn = callbackfn.bind(thisArg);
|
|
8
|
-
for (const value of iterable) {
|
|
9
|
-
boundCallbackfn(value, index++, iterable);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export {
|
|
14
|
-
iterableForEach
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=chunk-JU353VSE.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/iterableForEach.ts"],"sourcesContent":["/**\n * Performs the specified action for each element in an iterable.\n *\n * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the iterable.\n *\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 iterableForEach<T>(\n iterable: Iterable<T>,\n callbackfn: (value: T, index: number, iterable: Iterable<T>) => void,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n thisArg?: any\n): void {\n let index = 0;\n\n if (typeof callbackfn !== 'function') {\n throw new TypeError(`${callbackfn} is not a function`);\n }\n\n const boundCallbackfn = callbackfn.bind(thisArg);\n\n for (const value of iterable) {\n boundCallbackfn(value, index++, iterable);\n }\n}\n"],"mappings":";AAOO,SAAS,gBACd,UACA,YAEA,SACM;AACN,MAAI,QAAQ;AAEZ,MAAI,OAAO,eAAe,YAAY;AACpC,UAAM,IAAI,UAAU,GAAG,UAAU,oBAAoB;AAAA,EACvD;AAEA,QAAM,kBAAkB,WAAW,KAAK,OAAO;AAE/C,aAAW,SAAS,UAAU;AAC5B,oBAAgB,OAAO,SAAS,QAAQ;AAAA,EAC1C;AACF;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/iterableSlice.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"],"mappings":";;;;;AAaO,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":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/iterableAt.ts"],"sourcesContent":["import 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 iterableAt<T>(iterable: Iterable<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 iterable) {\n if (currentIndex++ === index) {\n return value;\n }\n }\n\n return undefined;\n}\n"],"mappings":";;;;;AAOO,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,UAAU;AAC5B,QAAI,mBAAmB,OAAO;AAC5B,aAAO;AAAA,IACT;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
|
package/dist/chunk-MNLOWKTC.mjs
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// src/iterableFind.ts
|
|
2
|
-
function iterableFind(iterable, predicate, thisArg) {
|
|
3
|
-
let index = 0;
|
|
4
|
-
if (typeof predicate !== "function") {
|
|
5
|
-
throw new TypeError(`${predicate} is not a function`);
|
|
6
|
-
}
|
|
7
|
-
const boundPredicate = predicate.bind(thisArg);
|
|
8
|
-
for (const value of iterable) {
|
|
9
|
-
if (boundPredicate(value, index++, iterable)) {
|
|
10
|
-
return value;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
return void 0;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export {
|
|
17
|
-
iterableFind
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=chunk-MNLOWKTC.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/iterableFind.ts"],"sourcesContent":["/**\n * Returns the value of the first element in the iterable where predicate is true, and undefined\n * otherwise.\n *\n * @param predicate find calls predicate once for each element of the iterable, 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 * @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 iterableFind<T, S extends T>(\n iterable: Iterable<T>,\n predicate: (value: T, index: number, obj: Iterable<T>) => value is S,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n thisArg?: any\n): S | undefined;\n\nexport function iterableFind<T>(\n iterable: Iterable<T>,\n predicate: (value: T, index: number, obj: Iterable<T>) => unknown,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n thisArg?: any\n): T | undefined;\n\nexport function iterableFind<T, S extends T>(\n iterable: Iterable<T>,\n predicate: (value: T, index: number, obj: Iterable<T>) => unknown,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n thisArg?: any\n): S | undefined {\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 value as S;\n }\n }\n\n return undefined;\n}\n"],"mappings":";AAyBO,SAAS,aACd,UACA,WAEA,SACe;AACf,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":[]}
|
package/dist/chunk-O5SQJUKB.mjs
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
// src/private/withResolvers.ts
|
|
2
|
-
import coreJSPromiseWithResolvers from "core-js-pure/full/promise/with-resolvers";
|
|
3
|
-
function withResolvers() {
|
|
4
|
-
return coreJSPromiseWithResolvers();
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
// src/PushAsyncIterableIterator.ts
|
|
8
|
-
var CLOSE = Symbol("close");
|
|
9
|
-
var PushAsyncIterableIterator = class {
|
|
10
|
-
#closed = false;
|
|
11
|
-
#pushResolvers = withResolvers();
|
|
12
|
-
[Symbol.asyncIterator]() {
|
|
13
|
-
return this;
|
|
14
|
-
}
|
|
15
|
-
close() {
|
|
16
|
-
this.#closed = true;
|
|
17
|
-
this.#pushResolvers.resolve(CLOSE);
|
|
18
|
-
}
|
|
19
|
-
async next() {
|
|
20
|
-
const value = await this.#pushResolvers.promise;
|
|
21
|
-
if (value === CLOSE) {
|
|
22
|
-
return { done: true, value: void 0 };
|
|
23
|
-
}
|
|
24
|
-
return { done: false, value };
|
|
25
|
-
}
|
|
26
|
-
push(value) {
|
|
27
|
-
if (!this.#closed) {
|
|
28
|
-
this.#pushResolvers.resolve(value);
|
|
29
|
-
this.#pushResolvers = withResolvers();
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export {
|
|
35
|
-
PushAsyncIterableIterator
|
|
36
|
-
};
|
|
37
|
-
//# sourceMappingURL=chunk-O5SQJUKB.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/private/withResolvers.ts","../src/PushAsyncIterableIterator.ts"],"sourcesContent":["// @ts-expect-error \"core-js\" is not typed.\nimport coreJSPromiseWithResolvers from 'core-js-pure/full/promise/with-resolvers';\n\nexport default function withResolvers<T>(): PromiseWithResolvers<T> {\n return coreJSPromiseWithResolvers();\n}\n","import withResolvers from './private/withResolvers';\n\nconst CLOSE = Symbol('close');\n\nexport class PushAsyncIterableIterator<T> implements AsyncIterableIterator<T> {\n #closed: boolean = false;\n #pushResolvers: PromiseWithResolvers<T | typeof CLOSE> = withResolvers();\n\n [Symbol.asyncIterator]() {\n return this;\n }\n\n close() {\n this.#closed = true;\n this.#pushResolvers.resolve(CLOSE);\n }\n\n async next(): Promise<IteratorResult<T>> {\n const value = await this.#pushResolvers.promise;\n\n if (value === CLOSE) {\n return { done: true, value: undefined };\n }\n\n return { done: false, value };\n }\n\n push(value: T) {\n if (!this.#closed) {\n this.#pushResolvers.resolve(value);\n this.#pushResolvers = withResolvers();\n }\n }\n}\n"],"mappings":";AACA,OAAO,gCAAgC;AAExB,SAAR,gBAA6D;AAClE,SAAO,2BAA2B;AACpC;;;ACHA,IAAM,QAAQ,OAAO,OAAO;AAErB,IAAM,4BAAN,MAAuE;AAAA,EAC5E,UAAmB;AAAA,EACnB,iBAAyD,cAAc;AAAA,EAEvE,CAAC,OAAO,aAAa,IAAI;AACvB,WAAO;AAAA,EACT;AAAA,EAEA,QAAQ;AACN,SAAK,UAAU;AACf,SAAK,eAAe,QAAQ,KAAK;AAAA,EACnC;AAAA,EAEA,MAAM,OAAmC;AACvC,UAAM,QAAQ,MAAM,KAAK,eAAe;AAExC,QAAI,UAAU,OAAO;AACnB,aAAO,EAAE,MAAM,MAAM,OAAO,OAAU;AAAA,IACxC;AAEA,WAAO,EAAE,MAAM,OAAO,MAAM;AAAA,EAC9B;AAAA,EAEA,KAAK,OAAU;AACb,QAAI,CAAC,KAAK,SAAS;AACjB,WAAK,eAAe,QAAQ,KAAK;AACjC,WAAK,iBAAiB,cAAc;AAAA,IACtC;AAAA,EACF;AACF;","names":[]}
|
package/dist/chunk-TEI3K6GT.mjs
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// src/iterableFindLastIndex.ts
|
|
2
|
-
function iterableFindLastIndex(iterable, predicate, thisArg) {
|
|
3
|
-
let index = 0;
|
|
4
|
-
let lastIndex = -1;
|
|
5
|
-
if (typeof predicate !== "function") {
|
|
6
|
-
throw new TypeError(`${predicate} is not a function`);
|
|
7
|
-
}
|
|
8
|
-
const boundPredicate = predicate.bind(thisArg);
|
|
9
|
-
for (const value of iterable) {
|
|
10
|
-
if (boundPredicate(value, index, iterable)) {
|
|
11
|
-
lastIndex = index;
|
|
12
|
-
}
|
|
13
|
-
index++;
|
|
14
|
-
}
|
|
15
|
-
return lastIndex;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export {
|
|
19
|
-
iterableFindLastIndex
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=chunk-TEI3K6GT.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/iterableFindLastIndex.ts"],"sourcesContent":["/**\n * Returns the index of the last element in the iterable where predicate is true, and -1\n * otherwise.\n *\n * @param predicate findLastIndex calls predicate once for each element of the iterable, 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 iterableFindLastIndex<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\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 iterable) {\n if (boundPredicate(value, index, iterable)) {\n lastIndex = index;\n }\n\n index++;\n }\n\n return lastIndex;\n}\n"],"mappings":";AAWO,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,UAAU;AAC5B,QAAI,eAAe,OAAO,OAAO,QAAQ,GAAG;AAC1C,kBAAY;AAAA,IACd;AAEA;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/iterableIndexOf.ts"],"sourcesContent":["import toIntegerOrInfinity from './private/toIntegerOrInfinity';\n\n/**\n * Returns the index of the first occurrence of a value in an iterable, or -1 if it is not present.\n *\n * @param searchElement The value to locate in the iterable.\n * @param fromIndex The iterable index at which to begin the search. If fromIndex is omitted, the search starts at index 0.\n */\nexport function iterableIndexOf<T>(iterable: Iterable<T>, searchElement: T, fromIndex: number = 0): number {\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 iterable) {\n if (index >= fromIndex && Object.is(item, searchElement)) {\n return index;\n }\n\n index++;\n }\n }\n\n return -1;\n}\n"],"mappings":";;;;;AAQO,SAAS,gBAAmB,UAAuB,eAAkB,YAAoB,GAAW;AACzG,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,UAAU;AAC3B,UAAI,SAAS,aAAa,OAAO,GAAG,MAAM,aAAa,GAAG;AACxD,eAAO;AAAA,MACT;AAEA;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
|
package/dist/chunk-V6OWQQ3Q.mjs
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// src/iterableFindLast.ts
|
|
2
|
-
function iterableFindLast(iterable, predicate, thisArg) {
|
|
3
|
-
let index = 0;
|
|
4
|
-
let last;
|
|
5
|
-
if (typeof predicate !== "function") {
|
|
6
|
-
throw new TypeError(`${predicate} is not a function`);
|
|
7
|
-
}
|
|
8
|
-
const boundPredicate = predicate.bind(thisArg);
|
|
9
|
-
for (const value of iterable) {
|
|
10
|
-
if (boundPredicate(value, index++, iterable)) {
|
|
11
|
-
last = value;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
return last;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export {
|
|
18
|
-
iterableFindLast
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=chunk-V6OWQQ3Q.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/iterableFindLast.ts"],"sourcesContent":["/**\n * Returns the value of the last element in the iterable where predicate is true, and undefined\n * otherwise.\n *\n * @param predicate findLast calls predicate once for each element of the iterable, 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 iterableFindLast<T, S extends T>(\n iterable: Iterable<T>,\n predicate: (value: T, index: number, iterable: Iterable<T>) => value is S,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n thisArg?: any\n): S | undefined;\n\nexport function iterableFindLast<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\n): T | undefined;\n\nexport function iterableFindLast<T, S extends 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\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 iterable) {\n if (boundPredicate(value, index++, iterable)) {\n last = value as S;\n }\n }\n\n return last;\n}\n"],"mappings":";AAyBO,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,UAAU;AAC5B,QAAI,eAAe,OAAO,SAAS,QAAQ,GAAG;AAC5C,aAAO;AAAA,IACT;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/iterableToSpliced.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"],"mappings":";;;;;AA4BO,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":[]}
|
package/dist/chunk-XKBVB2JN.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/iterableKeys.ts"],"sourcesContent":["/**\n * Returns an iterable of keys in the iterable\n */\nexport function* iterableKeys<T>(iterable: Iterable<T>): IterableIterator<number> {\n let index = 0;\n\n for (const _ of iterable) {\n yield index++;\n }\n}\n"],"mappings":";AAGO,UAAU,aAAgB,UAAiD;AAChF,MAAI,QAAQ;AAEZ,aAAW,KAAK,UAAU;AACxB,UAAM;AAAA,EACR;AACF;","names":[]}
|
package/dist/chunk-XW34KZRY.mjs
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
// src/iterableReduce.ts
|
|
2
|
-
function iterableReduce(iterable, callbackfn, initialValue) {
|
|
3
|
-
let index = 0;
|
|
4
|
-
let previousValue = initialValue;
|
|
5
|
-
if (typeof callbackfn !== "function") {
|
|
6
|
-
throw new TypeError(`${callbackfn} is not a function`);
|
|
7
|
-
}
|
|
8
|
-
for (const currentValue of iterable) {
|
|
9
|
-
previousValue = callbackfn(previousValue, currentValue, index++, iterable);
|
|
10
|
-
}
|
|
11
|
-
return previousValue;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export {
|
|
15
|
-
iterableReduce
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=chunk-XW34KZRY.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
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":";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":[]}
|
package/dist/chunk-Y5M2C7NQ.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/iterableToString.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"],"mappings":";;;;;AAKO,SAAS,iBAAoB,UAA+B;AACjE,SAAO,aAAa,QAAQ;AAC9B;","names":[]}
|
package/dist/chunk-ZUBHGSCW.mjs
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
// src/iterableFilter.ts
|
|
2
|
-
function* iterableFilter(iterable, predicate, thisArg) {
|
|
3
|
-
let index = 0;
|
|
4
|
-
if (typeof predicate !== "function") {
|
|
5
|
-
throw new TypeError(`${predicate} is not a function`);
|
|
6
|
-
}
|
|
7
|
-
const boundPredicate = predicate.bind(thisArg);
|
|
8
|
-
for (const value of iterable) {
|
|
9
|
-
if (boundPredicate(value, index++, iterable)) {
|
|
10
|
-
yield value;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export {
|
|
16
|
-
iterableFilter
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=chunk-ZUBHGSCW.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/iterableFilter.ts"],"sourcesContent":["/**\n * Returns the elements of an iterable 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 iterable.\n * @param thisArg 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 iterableFilter<T, S extends T>(\n iterable: Iterable<T>,\n predicate: (value: T, index: number, iterable: Iterable<T>) => value is S,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n thisArg?: unknown\n): IterableIterator<S>;\n\n/**\n * Returns the elements of an iterable 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 iterable.\n * @param thisArg 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 iterableFilter<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\n): IterableIterator<T>;\n\nexport function* iterableFilter<T, S extends 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?: unknown\n): IterableIterator<S> {\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 yield value as S;\n }\n }\n}\n"],"mappings":";AA0BO,UAAU,eACf,UACA,WAEA,SACqB;AACrB,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,YAAM;AAAA,IACR;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/iterableAt.ts","../src/private/toIntegerOrInfinity.ts"],"sourcesContent":["import 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 iterableAt<T>(iterable: Iterable<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 iterable) {\n if (currentIndex++ === index) {\n return value;\n }\n }\n\n return undefined;\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;;;ADCO,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,UAAU;AAC5B,QAAI,mBAAmB,OAAO;AAC5B,aAAO;AAAA,IACT;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Combines two or more iterables.
|
|
3
|
-
* This method returns a new iterable without modifying any existing iterables.
|
|
4
|
-
*
|
|
5
|
-
* @param items Additional iterables and/or items to add to the end of the iterable.
|
|
6
|
-
*/
|
|
7
|
-
declare function iterableConcat<T>(iterable: Iterable<T>, ...items: Iterable<T>[]): IterableIterator<T>;
|
|
8
|
-
/**
|
|
9
|
-
* Combines two or more iterables.
|
|
10
|
-
* This method returns a new iterable without modifying any existing iterables.
|
|
11
|
-
*
|
|
12
|
-
* @param items Additional iterables and/or items to add to the end of the iterable.
|
|
13
|
-
*/
|
|
14
|
-
declare function iterableConcat<T>(iterable: Iterable<T>, ...items: (T | Iterable<T>)[]): IterableIterator<T>;
|
|
15
|
-
|
|
16
|
-
export { iterableConcat };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Combines two or more iterables.
|
|
3
|
-
* This method returns a new iterable without modifying any existing iterables.
|
|
4
|
-
*
|
|
5
|
-
* @param items Additional iterables and/or items to add to the end of the iterable.
|
|
6
|
-
*/
|
|
7
|
-
declare function iterableConcat<T>(iterable: Iterable<T>, ...items: Iterable<T>[]): IterableIterator<T>;
|
|
8
|
-
/**
|
|
9
|
-
* Combines two or more iterables.
|
|
10
|
-
* This method returns a new iterable without modifying any existing iterables.
|
|
11
|
-
*
|
|
12
|
-
* @param items Additional iterables and/or items to add to the end of the iterable.
|
|
13
|
-
*/
|
|
14
|
-
declare function iterableConcat<T>(iterable: Iterable<T>, ...items: (T | Iterable<T>)[]): IterableIterator<T>;
|
|
15
|
-
|
|
16
|
-
export { iterableConcat };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/iterableConcat.ts"],"sourcesContent":["/**\n * Combines two or more iterables.\n * This method returns a new iterable without modifying any existing iterables.\n *\n * @param items Additional iterables and/or items to add to the end of the iterable.\n */\nexport function iterableConcat<T>(iterable: Iterable<T>, ...items: Iterable<T>[]): IterableIterator<T>;\n\n/**\n * Combines two or more iterables.\n * This method returns a new iterable without modifying any existing iterables.\n *\n * @param items Additional iterables and/or items to add to the end of the iterable.\n */\nexport function iterableConcat<T>(iterable: Iterable<T>, ...items: (T | Iterable<T>)[]): IterableIterator<T>;\n\nexport function* iterableConcat<T>(iterable: Iterable<T>, ...items: (T | Iterable<T>)[]): IterableIterator<T> {\n yield* iterable;\n\n for (const item of items) {\n if (item && typeof item === 'object' && Symbol.iterator in item) {\n yield* item;\n } else {\n yield item;\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBO,UAAU,eAAkB,aAA0B,OAAiD;AAC5G,SAAO;AAEP,aAAW,QAAQ,OAAO;AACxB,QAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,YAAY,MAAM;AAC/D,aAAO;AAAA,IACT,OAAO;AACL,YAAM;AAAA,IACR;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/iterableEntries.ts"],"sourcesContent":["/**\n * Returns an iterable of key, value pairs for every entry in the iterable\n */\nexport function* iterableEntries<T>(iterable: Iterable<T>): IterableIterator<[number, T]> {\n let index = 0;\n\n for (const value of iterable) {\n yield [index++, value];\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGO,UAAU,gBAAmB,UAAsD;AACxF,MAAI,QAAQ;AAEZ,aAAW,SAAS,UAAU;AAC5B,UAAM,CAAC,SAAS,KAAK;AAAA,EACvB;AACF;","names":[]}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Determines whether all the members of an iterable satisfy the specified test.
|
|
3
|
-
*
|
|
4
|
-
* @param predicate A function that accepts up to three arguments. The every method calls
|
|
5
|
-
* the predicate function for each element in the iterable until the predicate returns a value
|
|
6
|
-
* which is coercible to the Boolean value false, or until the end of the iterable.
|
|
7
|
-
*
|
|
8
|
-
* @param thisArg An object to which the this keyword can refer in the predicate function.
|
|
9
|
-
* If thisArg is omitted, undefined is used as the this value.
|
|
10
|
-
*/
|
|
11
|
-
declare function iterableEvery<T, S extends T>(iterable: Iterable<T>, predicate: (value: T, index: number, iterable: Iterable<T>) => value is S, thisArg?: any): iterable is S[];
|
|
12
|
-
/**
|
|
13
|
-
* Determines whether all the members of an iterable satisfy the specified test.
|
|
14
|
-
*
|
|
15
|
-
* @param predicate A function that accepts up to three arguments. The every method calls
|
|
16
|
-
* the predicate function for each element in the iterable until the predicate returns a value
|
|
17
|
-
* which is coercible to the Boolean value false, or until the end of the iterable.
|
|
18
|
-
*
|
|
19
|
-
* @param thisArg An object to which the this keyword can refer in the predicate function.
|
|
20
|
-
* If thisArg is omitted, undefined is used as the this value.
|
|
21
|
-
*/
|
|
22
|
-
declare function iterableEvery<T>(iterable: Iterable<T>, predicate: (value: T, index: number, iterable: Iterable<T>) => unknown, thisArg?: any): boolean;
|
|
23
|
-
|
|
24
|
-
export { iterableEvery };
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Determines whether all the members of an iterable satisfy the specified test.
|
|
3
|
-
*
|
|
4
|
-
* @param predicate A function that accepts up to three arguments. The every method calls
|
|
5
|
-
* the predicate function for each element in the iterable until the predicate returns a value
|
|
6
|
-
* which is coercible to the Boolean value false, or until the end of the iterable.
|
|
7
|
-
*
|
|
8
|
-
* @param thisArg An object to which the this keyword can refer in the predicate function.
|
|
9
|
-
* If thisArg is omitted, undefined is used as the this value.
|
|
10
|
-
*/
|
|
11
|
-
declare function iterableEvery<T, S extends T>(iterable: Iterable<T>, predicate: (value: T, index: number, iterable: Iterable<T>) => value is S, thisArg?: any): iterable is S[];
|
|
12
|
-
/**
|
|
13
|
-
* Determines whether all the members of an iterable satisfy the specified test.
|
|
14
|
-
*
|
|
15
|
-
* @param predicate A function that accepts up to three arguments. The every method calls
|
|
16
|
-
* the predicate function for each element in the iterable until the predicate returns a value
|
|
17
|
-
* which is coercible to the Boolean value false, or until the end of the iterable.
|
|
18
|
-
*
|
|
19
|
-
* @param thisArg An object to which the this keyword can refer in the predicate function.
|
|
20
|
-
* If thisArg is omitted, undefined is used as the this value.
|
|
21
|
-
*/
|
|
22
|
-
declare function iterableEvery<T>(iterable: Iterable<T>, predicate: (value: T, index: number, iterable: Iterable<T>) => unknown, thisArg?: any): boolean;
|
|
23
|
-
|
|
24
|
-
export { iterableEvery };
|
|
@@ -1,43 +0,0 @@
|
|
|
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/iterableEvery.ts
|
|
21
|
-
var iterableEvery_exports = {};
|
|
22
|
-
__export(iterableEvery_exports, {
|
|
23
|
-
iterableEvery: () => iterableEvery
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(iterableEvery_exports);
|
|
26
|
-
function iterableEvery(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 false;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
return true;
|
|
38
|
-
}
|
|
39
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
40
|
-
0 && (module.exports = {
|
|
41
|
-
iterableEvery
|
|
42
|
-
});
|
|
43
|
-
//# sourceMappingURL=iter-fest.iterableEvery.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/iterableEvery.ts"],"sourcesContent":["/**\n * Determines whether all the members of an iterable 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 iterable until the predicate returns a value\n * which is coercible to the Boolean value false, or until the end of the iterable.\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 */\nexport function iterableEvery<T, S extends T>(\n iterable: Iterable<T>,\n predicate: (value: T, index: number, iterable: Iterable<T>) => value is S,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n thisArg?: any\n): iterable is S[];\n\n/**\n * Determines whether all the members of an iterable 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 iterable until the predicate returns a value\n * which is coercible to the Boolean value false, or until the end of the iterable.\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 */\nexport function iterableEvery<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\n): boolean;\n\nexport function iterableEvery<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 false;\n }\n }\n\n return true;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAkCO,SAAS,cACd,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,CAAC,eAAe,OAAO,SAAS,QAAQ,GAAG;AAC7C,aAAO;AAAA,IACT;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
|