iter-fest 0.1.1-main.dd552c2 → 0.1.1-main.e1f1fd3
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 +7 -26
- 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-EZC33HE6.mjs +15 -0
- package/dist/chunk-EZC33HE6.mjs.map +1 -0
- package/dist/chunk-JU353VSE.mjs +16 -0
- package/dist/chunk-JU353VSE.mjs.map +1 -0
- package/dist/chunk-MNLOWKTC.mjs +19 -0
- package/dist/chunk-MNLOWKTC.mjs.map +1 -0
- package/dist/chunk-XW34KZRY.mjs +17 -0
- package/dist/chunk-XW34KZRY.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 +7 -12
- package/dist/iter-fest.d.ts +7 -12
- 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.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.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.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.js +113 -100
- package/dist/iter-fest.js.map +1 -1
- package/dist/iter-fest.mjs +43 -63
- package/package.json +72 -122
- package/dist/chunk-3S6LCGE6.mjs +0 -10
- package/dist/chunk-3S6LCGE6.mjs.map +0 -1
- package/dist/chunk-FBST4AUL.mjs +0 -10
- package/dist/chunk-FBST4AUL.mjs.map +0 -1
- package/dist/chunk-FMIHIL6A.mjs +0 -10
- package/dist/chunk-FMIHIL6A.mjs.map +0 -1
- package/dist/chunk-KYMTQJIJ.mjs +0 -10
- package/dist/chunk-KYMTQJIJ.mjs.map +0 -1
- package/dist/chunk-LIMQXDFK.mjs +0 -10
- package/dist/chunk-LIMQXDFK.mjs.map +0 -1
- package/dist/chunk-OWUGLCQB.mjs +0 -10
- package/dist/chunk-OWUGLCQB.mjs.map +0 -1
- package/dist/chunk-QX6EMOSQ.mjs +0 -10
- package/dist/chunk-QX6EMOSQ.mjs.map +0 -1
- package/dist/chunk-R6SXIXMH.mjs +0 -10
- package/dist/chunk-R6SXIXMH.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-XQDGXAAF.mjs +0 -10
- package/dist/chunk-XQDGXAAF.mjs.map +0 -1
- package/dist/chunk-YLERARWI.mjs +0 -10
- package/dist/chunk-YLERARWI.mjs.map +0 -1
- 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.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.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.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.iteratorFrom.d.mts +0 -12
- package/dist/iter-fest.iteratorFrom.d.ts +0 -12
- 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.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.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 -13
- package/dist/iter-fest.iteratorToArray.d.ts +0 -13
- 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.iteratorDrop.mjs.map → iter-fest.iterableEvery.mjs.map} +0 -0
- /package/dist/{iter-fest.iteratorEvery.mjs.map → iter-fest.iterableFilter.mjs.map} +0 -0
- /package/dist/{iter-fest.iteratorFilter.mjs.map → iter-fest.iterableFind.mjs.map} +0 -0
- /package/dist/{iter-fest.iteratorFind.mjs.map → iter-fest.iterableForEach.mjs.map} +0 -0
- /package/dist/{iter-fest.iteratorFlatMap.mjs.map → iter-fest.iterableMap.mjs.map} +0 -0
- /package/dist/{iter-fest.iteratorForEach.mjs.map → iter-fest.iterableReduce.mjs.map} +0 -0
- /package/dist/{iter-fest.iteratorFrom.mjs.map → iter-fest.iterableSome.mjs.map} +0 -0
package/dist/chunk-FBST4AUL.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/iteratorFind.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport find from 'core-js-pure/full/iterator/find';\n\n/**\n * Returns the value of the first element in the iterator where predicate is true, and undefined\n * otherwise.\n *\n * @param predicate find calls predicate once for each element of the iterator, in ascending\n * order, until it finds one where predicate returns true. If such an element is found, find\n * immediately returns that element value. Otherwise, find returns undefined.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorFind<T, S extends T>(\n iterator: Iterator<T>,\n predicate: (value: T, index: number) => value is S\n): S | undefined;\n\nexport function iteratorFind<T>(iterator: Iterator<T>, predicate: (value: T, index: number) => unknown): T | undefined;\n\nexport function iteratorFind<T, S extends T>(\n iterator: Iterator<T>,\n predicate: (value: T, index: number) => unknown\n): S | undefined {\n return find(iterator, predicate);\n}\n"],"mappings":";AACA,OAAO,UAAU;AAmBV,SAAS,aACd,UACA,WACe;AACf,SAAO,KAAK,UAAU,SAAS;AACjC;","names":[]}
|
package/dist/chunk-FMIHIL6A.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/iteratorForEach.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport forEach from 'core-js-pure/full/iterator/for-each';\n\n/**\n * Performs the specified action for each element in an iterator.\n *\n * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the iterator.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorForEach<T>(iterator: Iterator<T>, callbackfn: (value: T, index: number) => void): void {\n forEach(iterator, callbackfn);\n}\n"],"mappings":";AACA,OAAO,aAAa;AASb,SAAS,gBAAmB,UAAuB,YAAqD;AAC7G,UAAQ,UAAU,UAAU;AAC9B;","names":[]}
|
package/dist/chunk-KYMTQJIJ.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/iteratorFrom.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport from from 'core-js-pure/full/iterator/from';\n\n/**\n * `.from` is a static method (unlike the others listed above) which takes an object as an argument. This method allows wrapping \"iterator-like\" objects with an iterator.\n *\n * @param limit\n *\n * @return Returns the object if it is already an iterator, returns a wrapping iterator if the passed object implements a callable @@iterator property.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorFrom<T>(iteratorLike: Iterator<T>): Iterator<T> {\n return from(iteratorLike);\n}\n"],"mappings":";AACA,OAAO,UAAU;AAWV,SAAS,aAAgB,cAAwC;AACtE,SAAO,KAAK,YAAY;AAC1B;","names":[]}
|
package/dist/chunk-LIMQXDFK.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// src/iteratorReduce.ts
|
|
2
|
-
import reduce from "core-js-pure/full/iterator/reduce";
|
|
3
|
-
function iteratorReduce(iterator, callbackfn, initialValue) {
|
|
4
|
-
return reduce(iterator, callbackfn, initialValue);
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export {
|
|
8
|
-
iteratorReduce
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=chunk-LIMQXDFK.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/iteratorReduce.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport reduce from 'core-js-pure/full/iterator/reduce';\n\n/**\n * Calls the specified callback function for all the elements in an iterator. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.\n *\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the iterator.\n *\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an iterator value.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorReduce<T>(\n iterator: Iterator<T>,\n callbackfn: (previousValue: T, currentValue: T, currentIndex: number) => T\n): T;\n\nexport function iteratorReduce<T>(\n iterator: Iterator<T>,\n callbackfn: (previousValue: T, currentValue: T, currentIndex: number) => T,\n initialValue: T\n): T;\n\n/**\n * Calls the specified callback function for all the elements in an iterator. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.\n *\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the iterator.\n *\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorReduce<T, U>(\n iterator: Iterator<T>,\n callbackfn: (previousValue: U, currentValue: T, currentIndex: number) => U,\n initialValue: U\n): U;\n\nexport function iteratorReduce<T, U = undefined>(\n iterator: Iterator<T>,\n callbackfn: (previousValue: U | undefined, currentValue: T, currentIndex: number) => U,\n initialValue?: U\n): U | undefined {\n return reduce(iterator, callbackfn, initialValue);\n}\n"],"mappings":";AACA,OAAO,YAAY;AAqCZ,SAAS,eACd,UACA,YACA,cACe;AACf,SAAO,OAAO,UAAU,YAAY,YAAY;AAClD;","names":[]}
|
package/dist/chunk-OWUGLCQB.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/iteratorEvery.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport every from 'core-js-pure/full/iterator/every';\n\n/**\n * Determines whether all the members of an iterator satisfy the specified test.\n *\n * @param predicate A function that accepts up to three arguments. The every method calls\n * the predicate function for each element in the iterator until the predicate returns a value\n * which is coercible to the Boolean value false, or until the end of the iterator.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorEvery<T, S extends T>(\n iterator: Iterator<T>,\n predicate: (value: T, index: number) => value is S\n): iterator is Iterator<S>;\n\n/**\n * Determines whether all the members of an iterator satisfy the specified test.\n *\n * @param predicate A function that accepts up to three arguments. The every method calls\n * the predicate function for each element in the iterator until the predicate returns a value\n * which is coercible to the Boolean value false, or until the end of the iterator.\n *\n * @param thisArg An object to which the this keyword can refer in the predicate function.\n * If thisArg is omitted, undefined is used as the this value.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorEvery<T>(iterator: Iterator<T>, predicate: (value: T, index: number) => unknown): boolean;\n\nexport function iteratorEvery<T>(iterator: Iterator<T>, predicate: (value: T, index: number) => unknown): boolean {\n return every(iterator, predicate);\n}\n"],"mappings":";AACA,OAAO,WAAW;AA8BX,SAAS,cAAiB,UAAuB,WAA0D;AAChH,SAAO,MAAM,UAAU,SAAS;AAClC;","names":[]}
|
package/dist/chunk-QX6EMOSQ.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/iteratorFlatMap.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport flatMap from 'core-js-pure/full/iterator/flat-map';\n\n/**\n * `.flatMap` takes a mapping function as an argument. It returns an iterator that produces all elements of the iterators produced by applying the mapping function to the elements produced by the underlying iterator.\n *\n * @param mapperFn\n *\n * @return Returns an iterator of flat values.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorFlatMap<T, U>(iterable: Iterable<T>, mapperFn: (value: T, index: number) => U): Iterator<T> {\n return flatMap(iterable, mapperFn);\n}\n"],"mappings":";AACA,OAAO,aAAa;AAWb,SAAS,gBAAsB,UAAuB,UAAuD;AAClH,SAAO,QAAQ,UAAU,QAAQ;AACnC;","names":[]}
|
package/dist/chunk-R6SXIXMH.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/iteratorDrop.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport drop from 'core-js-pure/full/iterator/drop';\n\n/**\n * `drop` takes an integer as an argument. It skips the given number of elements produced by the underlying iterator before itself producing any remaining elements.\n *\n * @param limit\n *\n * @return Returns an iterator of items after the limit.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorDrop<T>(iterator: Iterator<T>, limit: number): Iterator<T> {\n return drop(iterator, limit);\n}\n"],"mappings":";AACA,OAAO,UAAU;AAWV,SAAS,aAAgB,UAAuB,OAA4B;AACjF,SAAO,KAAK,UAAU,KAAK;AAC7B;","names":[]}
|
package/dist/chunk-TDHR35S7.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/iteratorFilter.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport filter from 'core-js-pure/full/iterator/filter';\n\n/**\n * Returns the elements of an iterator that meet the condition specified in a callback function.\n *\n * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the iterator.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorFilter<T, S extends T>(\n iterator: Iterator<T>,\n predicate: (value: T, index: number) => value is S\n): IterableIterator<S>;\n\n/**\n * Returns the elements of an iterator that meet the condition specified in a callback function.\n *\n * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the iterator.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorFilter<T>(\n iterator: Iterator<T>,\n predicate: (value: T, index: number) => unknown\n): IterableIterator<T>;\n\nexport function iteratorFilter<T, S extends T>(\n iterator: Iterator<T>,\n predicate: (value: T, index: number) => unknown\n): IterableIterator<S> {\n return filter(iterator, predicate);\n}\n"],"mappings":";AACA,OAAO,YAAY;AA0BZ,SAAS,eACd,UACA,WACqB;AACrB,SAAO,OAAO,UAAU,SAAS;AACnC;","names":[]}
|
package/dist/chunk-VCKLUCOT.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/iteratorTake.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport take from 'core-js-pure/full/iterator/take';\n\n/**\n * `take` takes an integer as an argument. It returns an iterator that produces, at most, the given number of elements produced by the underlying iterator.\n *\n * @param limit\n *\n * @return Returns an iterator with items from the original iterator from 0 until the limit.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorTake<T>(iterator: Iterator<T>, limit: number): Iterator<T> {\n return take(iterator, limit);\n}\n"],"mappings":";AACA,OAAO,UAAU;AAWV,SAAS,aAAgB,UAAuB,OAA4B;AACjF,SAAO,KAAK,UAAU,KAAK;AAC7B;","names":[]}
|
package/dist/chunk-XQDGXAAF.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/iteratorMap.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport map from 'core-js-pure/full/iterator/map';\n\n/**\n * Calls a defined callback function on each element of an array, and returns an array that contains the results.\n *\n * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorMap<T, U>(\n iterator: Iterator<T>,\n callbackfn: (value: T, index: number) => U\n): IterableIterator<U> {\n return map(iterator, callbackfn);\n}\n"],"mappings":";AACA,OAAO,SAAS;AAST,SAAS,YACd,UACA,YACqB;AACrB,SAAO,IAAI,UAAU,UAAU;AACjC;","names":[]}
|
package/dist/chunk-YLERARWI.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/iteratorToArray.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport toArray from 'core-js-pure/full/iterator/to-array';\n\ntype IteratorLike<T> = Pick<Iterator<T>, 'next'>;\n\n/**\n * When you have a non-infinite iterator which you wish to transform into an array, you can do so with the builtin toArray method.\n *\n * @param limit\n *\n * @return Returns an Array containing the values from the iterator.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorToArray<T>(iteratorLike: IteratorLike<T>): T[] {\n return toArray(iteratorLike);\n}\n"],"mappings":";AACA,OAAO,aAAa;AAab,SAAS,gBAAmB,cAAoC;AACrE,SAAO,QAAQ,YAAY;AAC7B;","names":[]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `drop` takes an integer as an argument. It skips the given number of elements produced by the underlying iterator before itself producing any remaining elements.
|
|
3
|
-
*
|
|
4
|
-
* @param limit
|
|
5
|
-
*
|
|
6
|
-
* @return Returns an iterator of items after the limit.
|
|
7
|
-
*
|
|
8
|
-
* @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md
|
|
9
|
-
*/
|
|
10
|
-
declare function iteratorDrop<T>(iterator: Iterator<T>, limit: number): Iterator<T>;
|
|
11
|
-
|
|
12
|
-
export { iteratorDrop };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `drop` takes an integer as an argument. It skips the given number of elements produced by the underlying iterator before itself producing any remaining elements.
|
|
3
|
-
*
|
|
4
|
-
* @param limit
|
|
5
|
-
*
|
|
6
|
-
* @return Returns an iterator of items after the limit.
|
|
7
|
-
*
|
|
8
|
-
* @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md
|
|
9
|
-
*/
|
|
10
|
-
declare function iteratorDrop<T>(iterator: Iterator<T>, limit: number): Iterator<T>;
|
|
11
|
-
|
|
12
|
-
export { iteratorDrop };
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// src/iteratorDrop.ts
|
|
31
|
-
var iteratorDrop_exports = {};
|
|
32
|
-
__export(iteratorDrop_exports, {
|
|
33
|
-
iteratorDrop: () => iteratorDrop
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(iteratorDrop_exports);
|
|
36
|
-
var import_drop = __toESM(require("core-js-pure/full/iterator/drop"));
|
|
37
|
-
function iteratorDrop(iterator, limit) {
|
|
38
|
-
return (0, import_drop.default)(iterator, limit);
|
|
39
|
-
}
|
|
40
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
41
|
-
0 && (module.exports = {
|
|
42
|
-
iteratorDrop
|
|
43
|
-
});
|
|
44
|
-
//# sourceMappingURL=iter-fest.iteratorDrop.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/iteratorDrop.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport drop from 'core-js-pure/full/iterator/drop';\n\n/**\n * `drop` takes an integer as an argument. It skips the given number of elements produced by the underlying iterator before itself producing any remaining elements.\n *\n * @param limit\n *\n * @return Returns an iterator of items after the limit.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorDrop<T>(iterator: Iterator<T>, limit: number): Iterator<T> {\n return drop(iterator, limit);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,kBAAiB;AAWV,SAAS,aAAgB,UAAuB,OAA4B;AACjF,aAAO,YAAAA,SAAK,UAAU,KAAK;AAC7B;","names":["drop"]}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Determines whether all the members of an iterator 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 iterator until the predicate returns a value
|
|
6
|
-
* which is coercible to the Boolean value false, or until the end of the iterator.
|
|
7
|
-
*
|
|
8
|
-
* @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md
|
|
9
|
-
*/
|
|
10
|
-
declare function iteratorEvery<T, S extends T>(iterator: Iterator<T>, predicate: (value: T, index: number) => value is S): iterator is Iterator<S>;
|
|
11
|
-
/**
|
|
12
|
-
* Determines whether all the members of an iterator satisfy the specified test.
|
|
13
|
-
*
|
|
14
|
-
* @param predicate A function that accepts up to three arguments. The every method calls
|
|
15
|
-
* the predicate function for each element in the iterator until the predicate returns a value
|
|
16
|
-
* which is coercible to the Boolean value false, or until the end of the iterator.
|
|
17
|
-
*
|
|
18
|
-
* @param thisArg An object to which the this keyword can refer in the predicate function.
|
|
19
|
-
* If thisArg is omitted, undefined is used as the this value.
|
|
20
|
-
*
|
|
21
|
-
* @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md
|
|
22
|
-
*/
|
|
23
|
-
declare function iteratorEvery<T>(iterator: Iterator<T>, predicate: (value: T, index: number) => unknown): boolean;
|
|
24
|
-
|
|
25
|
-
export { iteratorEvery };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Determines whether all the members of an iterator 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 iterator until the predicate returns a value
|
|
6
|
-
* which is coercible to the Boolean value false, or until the end of the iterator.
|
|
7
|
-
*
|
|
8
|
-
* @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md
|
|
9
|
-
*/
|
|
10
|
-
declare function iteratorEvery<T, S extends T>(iterator: Iterator<T>, predicate: (value: T, index: number) => value is S): iterator is Iterator<S>;
|
|
11
|
-
/**
|
|
12
|
-
* Determines whether all the members of an iterator satisfy the specified test.
|
|
13
|
-
*
|
|
14
|
-
* @param predicate A function that accepts up to three arguments. The every method calls
|
|
15
|
-
* the predicate function for each element in the iterator until the predicate returns a value
|
|
16
|
-
* which is coercible to the Boolean value false, or until the end of the iterator.
|
|
17
|
-
*
|
|
18
|
-
* @param thisArg An object to which the this keyword can refer in the predicate function.
|
|
19
|
-
* If thisArg is omitted, undefined is used as the this value.
|
|
20
|
-
*
|
|
21
|
-
* @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md
|
|
22
|
-
*/
|
|
23
|
-
declare function iteratorEvery<T>(iterator: Iterator<T>, predicate: (value: T, index: number) => unknown): boolean;
|
|
24
|
-
|
|
25
|
-
export { iteratorEvery };
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// src/iteratorEvery.ts
|
|
31
|
-
var iteratorEvery_exports = {};
|
|
32
|
-
__export(iteratorEvery_exports, {
|
|
33
|
-
iteratorEvery: () => iteratorEvery
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(iteratorEvery_exports);
|
|
36
|
-
var import_every = __toESM(require("core-js-pure/full/iterator/every"));
|
|
37
|
-
function iteratorEvery(iterator, predicate) {
|
|
38
|
-
return (0, import_every.default)(iterator, predicate);
|
|
39
|
-
}
|
|
40
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
41
|
-
0 && (module.exports = {
|
|
42
|
-
iteratorEvery
|
|
43
|
-
});
|
|
44
|
-
//# sourceMappingURL=iter-fest.iteratorEvery.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/iteratorEvery.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport every from 'core-js-pure/full/iterator/every';\n\n/**\n * Determines whether all the members of an iterator satisfy the specified test.\n *\n * @param predicate A function that accepts up to three arguments. The every method calls\n * the predicate function for each element in the iterator until the predicate returns a value\n * which is coercible to the Boolean value false, or until the end of the iterator.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorEvery<T, S extends T>(\n iterator: Iterator<T>,\n predicate: (value: T, index: number) => value is S\n): iterator is Iterator<S>;\n\n/**\n * Determines whether all the members of an iterator satisfy the specified test.\n *\n * @param predicate A function that accepts up to three arguments. The every method calls\n * the predicate function for each element in the iterator until the predicate returns a value\n * which is coercible to the Boolean value false, or until the end of the iterator.\n *\n * @param thisArg An object to which the this keyword can refer in the predicate function.\n * If thisArg is omitted, undefined is used as the this value.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorEvery<T>(iterator: Iterator<T>, predicate: (value: T, index: number) => unknown): boolean;\n\nexport function iteratorEvery<T>(iterator: Iterator<T>, predicate: (value: T, index: number) => unknown): boolean {\n return every(iterator, predicate);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAAkB;AA8BX,SAAS,cAAiB,UAAuB,WAA0D;AAChH,aAAO,aAAAA,SAAM,UAAU,SAAS;AAClC;","names":["every"]}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns the elements of an iterator that meet the condition specified in a callback function.
|
|
3
|
-
*
|
|
4
|
-
* @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the iterator.
|
|
5
|
-
*
|
|
6
|
-
* @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md
|
|
7
|
-
*/
|
|
8
|
-
declare function iteratorFilter<T, S extends T>(iterator: Iterator<T>, predicate: (value: T, index: number) => value is S): IterableIterator<S>;
|
|
9
|
-
/**
|
|
10
|
-
* Returns the elements of an iterator that meet the condition specified in a callback function.
|
|
11
|
-
*
|
|
12
|
-
* @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the iterator.
|
|
13
|
-
*
|
|
14
|
-
* @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md
|
|
15
|
-
*/
|
|
16
|
-
declare function iteratorFilter<T>(iterator: Iterator<T>, predicate: (value: T, index: number) => unknown): IterableIterator<T>;
|
|
17
|
-
|
|
18
|
-
export { iteratorFilter };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns the elements of an iterator that meet the condition specified in a callback function.
|
|
3
|
-
*
|
|
4
|
-
* @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the iterator.
|
|
5
|
-
*
|
|
6
|
-
* @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md
|
|
7
|
-
*/
|
|
8
|
-
declare function iteratorFilter<T, S extends T>(iterator: Iterator<T>, predicate: (value: T, index: number) => value is S): IterableIterator<S>;
|
|
9
|
-
/**
|
|
10
|
-
* Returns the elements of an iterator that meet the condition specified in a callback function.
|
|
11
|
-
*
|
|
12
|
-
* @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the iterator.
|
|
13
|
-
*
|
|
14
|
-
* @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md
|
|
15
|
-
*/
|
|
16
|
-
declare function iteratorFilter<T>(iterator: Iterator<T>, predicate: (value: T, index: number) => unknown): IterableIterator<T>;
|
|
17
|
-
|
|
18
|
-
export { iteratorFilter };
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// src/iteratorFilter.ts
|
|
31
|
-
var iteratorFilter_exports = {};
|
|
32
|
-
__export(iteratorFilter_exports, {
|
|
33
|
-
iteratorFilter: () => iteratorFilter
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(iteratorFilter_exports);
|
|
36
|
-
var import_filter = __toESM(require("core-js-pure/full/iterator/filter"));
|
|
37
|
-
function iteratorFilter(iterator, predicate) {
|
|
38
|
-
return (0, import_filter.default)(iterator, predicate);
|
|
39
|
-
}
|
|
40
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
41
|
-
0 && (module.exports = {
|
|
42
|
-
iteratorFilter
|
|
43
|
-
});
|
|
44
|
-
//# sourceMappingURL=iter-fest.iteratorFilter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/iteratorFilter.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport filter from 'core-js-pure/full/iterator/filter';\n\n/**\n * Returns the elements of an iterator that meet the condition specified in a callback function.\n *\n * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the iterator.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorFilter<T, S extends T>(\n iterator: Iterator<T>,\n predicate: (value: T, index: number) => value is S\n): IterableIterator<S>;\n\n/**\n * Returns the elements of an iterator that meet the condition specified in a callback function.\n *\n * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the iterator.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorFilter<T>(\n iterator: Iterator<T>,\n predicate: (value: T, index: number) => unknown\n): IterableIterator<T>;\n\nexport function iteratorFilter<T, S extends T>(\n iterator: Iterator<T>,\n predicate: (value: T, index: number) => unknown\n): IterableIterator<S> {\n return filter(iterator, predicate);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAAmB;AA0BZ,SAAS,eACd,UACA,WACqB;AACrB,aAAO,cAAAA,SAAO,UAAU,SAAS;AACnC;","names":["filter"]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns the value of the first element in the iterator where predicate is true, and undefined
|
|
3
|
-
* otherwise.
|
|
4
|
-
*
|
|
5
|
-
* @param predicate find calls predicate once for each element of the iterator, in ascending
|
|
6
|
-
* order, until it finds one where predicate returns true. If such an element is found, find
|
|
7
|
-
* immediately returns that element value. Otherwise, find returns undefined.
|
|
8
|
-
*
|
|
9
|
-
* @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md
|
|
10
|
-
*/
|
|
11
|
-
declare function iteratorFind<T, S extends T>(iterator: Iterator<T>, predicate: (value: T, index: number) => value is S): S | undefined;
|
|
12
|
-
declare function iteratorFind<T>(iterator: Iterator<T>, predicate: (value: T, index: number) => unknown): T | undefined;
|
|
13
|
-
|
|
14
|
-
export { iteratorFind };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns the value of the first element in the iterator where predicate is true, and undefined
|
|
3
|
-
* otherwise.
|
|
4
|
-
*
|
|
5
|
-
* @param predicate find calls predicate once for each element of the iterator, in ascending
|
|
6
|
-
* order, until it finds one where predicate returns true. If such an element is found, find
|
|
7
|
-
* immediately returns that element value. Otherwise, find returns undefined.
|
|
8
|
-
*
|
|
9
|
-
* @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md
|
|
10
|
-
*/
|
|
11
|
-
declare function iteratorFind<T, S extends T>(iterator: Iterator<T>, predicate: (value: T, index: number) => value is S): S | undefined;
|
|
12
|
-
declare function iteratorFind<T>(iterator: Iterator<T>, predicate: (value: T, index: number) => unknown): T | undefined;
|
|
13
|
-
|
|
14
|
-
export { iteratorFind };
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// src/iteratorFind.ts
|
|
31
|
-
var iteratorFind_exports = {};
|
|
32
|
-
__export(iteratorFind_exports, {
|
|
33
|
-
iteratorFind: () => iteratorFind
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(iteratorFind_exports);
|
|
36
|
-
var import_find = __toESM(require("core-js-pure/full/iterator/find"));
|
|
37
|
-
function iteratorFind(iterator, predicate) {
|
|
38
|
-
return (0, import_find.default)(iterator, predicate);
|
|
39
|
-
}
|
|
40
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
41
|
-
0 && (module.exports = {
|
|
42
|
-
iteratorFind
|
|
43
|
-
});
|
|
44
|
-
//# sourceMappingURL=iter-fest.iteratorFind.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/iteratorFind.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport find from 'core-js-pure/full/iterator/find';\n\n/**\n * Returns the value of the first element in the iterator where predicate is true, and undefined\n * otherwise.\n *\n * @param predicate find calls predicate once for each element of the iterator, in ascending\n * order, until it finds one where predicate returns true. If such an element is found, find\n * immediately returns that element value. Otherwise, find returns undefined.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorFind<T, S extends T>(\n iterator: Iterator<T>,\n predicate: (value: T, index: number) => value is S\n): S | undefined;\n\nexport function iteratorFind<T>(iterator: Iterator<T>, predicate: (value: T, index: number) => unknown): T | undefined;\n\nexport function iteratorFind<T, S extends T>(\n iterator: Iterator<T>,\n predicate: (value: T, index: number) => unknown\n): S | undefined {\n return find(iterator, predicate);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,kBAAiB;AAmBV,SAAS,aACd,UACA,WACe;AACf,aAAO,YAAAA,SAAK,UAAU,SAAS;AACjC;","names":["find"]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `.flatMap` takes a mapping function as an argument. It returns an iterator that produces all elements of the iterators produced by applying the mapping function to the elements produced by the underlying iterator.
|
|
3
|
-
*
|
|
4
|
-
* @param mapperFn
|
|
5
|
-
*
|
|
6
|
-
* @return Returns an iterator of flat values.
|
|
7
|
-
*
|
|
8
|
-
* @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md
|
|
9
|
-
*/
|
|
10
|
-
declare function iteratorFlatMap<T, U>(iterable: Iterable<T>, mapperFn: (value: T, index: number) => U): Iterator<T>;
|
|
11
|
-
|
|
12
|
-
export { iteratorFlatMap };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `.flatMap` takes a mapping function as an argument. It returns an iterator that produces all elements of the iterators produced by applying the mapping function to the elements produced by the underlying iterator.
|
|
3
|
-
*
|
|
4
|
-
* @param mapperFn
|
|
5
|
-
*
|
|
6
|
-
* @return Returns an iterator of flat values.
|
|
7
|
-
*
|
|
8
|
-
* @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md
|
|
9
|
-
*/
|
|
10
|
-
declare function iteratorFlatMap<T, U>(iterable: Iterable<T>, mapperFn: (value: T, index: number) => U): Iterator<T>;
|
|
11
|
-
|
|
12
|
-
export { iteratorFlatMap };
|