iter-fest 0.1.1-main.57b2094 → 0.1.1-main.7690009
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 +14 -2
- 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-AOZVPHE4.mjs +10 -0
- package/dist/chunk-AOZVPHE4.mjs.map +1 -0
- package/dist/chunk-CNKIGQUS.mjs +10 -0
- package/dist/chunk-CNKIGQUS.mjs.map +1 -0
- package/dist/chunk-GFJGWVES.mjs +10 -0
- package/dist/chunk-GFJGWVES.mjs.map +1 -0
- package/dist/chunk-J3FQSENW.mjs +10 -0
- package/dist/chunk-J3FQSENW.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-NLXKATXE.mjs +10 -0
- package/dist/chunk-NLXKATXE.mjs.map +1 -0
- package/dist/chunk-ODPKEUIR.mjs +10 -0
- package/dist/chunk-ODPKEUIR.mjs.map +1 -0
- package/dist/chunk-QLVU73KN.mjs +10 -0
- package/dist/chunk-QLVU73KN.mjs.map +1 -0
- package/dist/chunk-TQCZXEK7.mjs +10 -0
- package/dist/chunk-TQCZXEK7.mjs.map +1 -0
- package/dist/{chunk-KYMTQJIJ.mjs → chunk-V7VAGILV.mjs} +1 -1
- package/dist/chunk-V7VAGILV.mjs.map +1 -0
- package/dist/chunk-VIMGYUMQ.mjs +10 -0
- package/dist/{chunk-QX6EMOSQ.mjs.map → chunk-VIMGYUMQ.mjs.map} +1 -1
- package/dist/chunk-WUFMEPOM.mjs +10 -0
- package/dist/chunk-WUFMEPOM.mjs.map +1 -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.asyncIteratorDrop.mjs.map +1 -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.asyncIteratorEvery.mjs.map +1 -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.asyncIteratorFilter.mjs.map +1 -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.asyncIteratorFind.mjs.map +1 -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.asyncIteratorFlatMap.mjs.map +1 -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.asyncIteratorForEach.mjs.map +1 -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.asyncIteratorFrom.mjs.map +1 -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.asyncIteratorMap.mjs.map +1 -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.asyncIteratorReduce.mjs.map +1 -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.asyncIteratorSome.mjs.map +1 -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.asyncIteratorTake.mjs.map +1 -0
- package/dist/iter-fest.asyncIteratorToArray.d.mts +13 -0
- package/dist/iter-fest.asyncIteratorToArray.d.ts +13 -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.asyncIteratorToArray.mjs.map +1 -0
- package/dist/iter-fest.d.mts +14 -1
- package/dist/iter-fest.d.ts +14 -1
- package/dist/iter-fest.iteratorFlatMap.d.mts +1 -1
- package/dist/iter-fest.iteratorFlatMap.d.ts +1 -1
- package/dist/iter-fest.iteratorFlatMap.js +2 -2
- package/dist/iter-fest.iteratorFlatMap.js.map +1 -1
- package/dist/iter-fest.iteratorFlatMap.mjs +1 -1
- package/dist/iter-fest.iteratorFrom.d.mts +0 -2
- package/dist/iter-fest.iteratorFrom.d.ts +0 -2
- package/dist/iter-fest.iteratorFrom.js.map +1 -1
- package/dist/iter-fest.iteratorFrom.mjs +1 -1
- 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.js +179 -75
- package/dist/iter-fest.js.map +1 -1
- package/dist/iter-fest.mjs +92 -40
- package/package.json +132 -2
- package/dist/chunk-KYMTQJIJ.mjs.map +0 -1
- package/dist/chunk-QX6EMOSQ.mjs +0 -10
package/README.md
CHANGED
|
@@ -59,7 +59,7 @@ Note: calling `[Symbol.iterator]()` or `[Symbol.asyncIterator]()` will not resta
|
|
|
59
59
|
|
|
60
60
|
`ReadableStream` can be used as an intermediate format when converting an `Observable` to `AsyncIterableIterator`.
|
|
61
61
|
|
|
62
|
-
Note: `Observable` is push-based and it does not support flow control. When converting to `
|
|
62
|
+
Note: `Observable` is push-based and it does not support flow control. When converting to `AsyncIterableIterator`, the internal buffer of `ReadableStream` could build up quickly.
|
|
63
63
|
|
|
64
64
|
```ts
|
|
65
65
|
const observable = Observable.from([1, 2, 3]);
|
|
@@ -226,7 +226,7 @@ const generator = generatorWithLastValue(
|
|
|
226
226
|
|
|
227
227
|
## Adding types to `core-js-pure`
|
|
228
228
|
|
|
229
|
-
We added types to implementation from `core-js-pure`:
|
|
229
|
+
We added types to [Iterator Helpers](https://github.com/tc39/proposal-iterator-helpers) and [Async Iterator Helpers](https://github.com/tc39/proposal-async-iterator-helpers) implementation from `core-js-pure`:
|
|
230
230
|
|
|
231
231
|
- [`Iterator.drop`](https://tc39.es/ecma262/#sec-array.prototype.drop)
|
|
232
232
|
- [`Iterator.every`](https://tc39.es/ecma262/#sec-array.prototype.every)
|
|
@@ -240,6 +240,18 @@ We added types to implementation from `core-js-pure`:
|
|
|
240
240
|
- [`Iterator.some`](https://tc39.es/ecma262/#sec-array.prototype.some)
|
|
241
241
|
- [`Iterator.take`](https://tc39.es/ecma262/#sec-array.prototype.take)
|
|
242
242
|
- [`Iterator.toArray`](https://tc39.es/ecma262/#sec-array.prototype.toarray)
|
|
243
|
+
- [`AsyncIterator.drop`](https://tc39.es/ecma262/#sec-array.prototype.drop)
|
|
244
|
+
- [`AsyncIterator.every`](https://tc39.es/ecma262/#sec-array.prototype.every)
|
|
245
|
+
- [`AsyncIterator.filter`](https://tc39.es/ecma262/#sec-array.prototype.filter)
|
|
246
|
+
- [`AsyncIterator.find`](https://tc39.es/ecma262/#sec-array.prototype.find)
|
|
247
|
+
- [`AsyncIterator.flatMap`](https://tc39.es/ecma262/#sec-array.prototype.flatmap)
|
|
248
|
+
- [`AsyncIterator.forEach`](https://tc39.es/ecma262/#sec-array.prototype.foreach)
|
|
249
|
+
- [`AsyncIterator.from`](https://tc39.es/ecma262/#sec-array.prototype.from)
|
|
250
|
+
- [`AsyncIterator.map`](https://tc39.es/ecma262/#sec-array.prototype.map)
|
|
251
|
+
- [`AsyncIterator.reduce`](https://tc39.es/ecma262/#sec-array.prototype.reduce)
|
|
252
|
+
- [`AsyncIterator.some`](https://tc39.es/ecma262/#sec-array.prototype.some)
|
|
253
|
+
- [`AsyncIterator.take`](https://tc39.es/ecma262/#sec-array.prototype.take)
|
|
254
|
+
- [`AsyncIterator.toArray`](https://tc39.es/ecma262/#sec-array.prototype.toarray)
|
|
243
255
|
|
|
244
256
|
## `Array.prototype` ports
|
|
245
257
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// src/asyncIteratorEvery.ts
|
|
2
|
+
import every from "core-js-pure/full/async-iterator/every";
|
|
3
|
+
function asyncIteratorEvery(iterator, predicate) {
|
|
4
|
+
return every(iterator, predicate);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export {
|
|
8
|
+
asyncIteratorEvery
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=chunk-4RT2FROS.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/asyncIteratorEvery.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport every from 'core-js-pure/full/async-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 asyncIteratorEvery<T>(\n asyncIterator: AsyncIterator<T>,\n predicate: (value: T, index: number) => Promise<boolean>\n): Promise<boolean>;\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 asyncIteratorEvery<T>(\n iterator: AsyncIterator<T>,\n predicate: (value: T, index: number) => Promise<unknown>\n): Promise<boolean>;\n\nexport function asyncIteratorEvery<T>(\n iterator: AsyncIterator<T>,\n predicate: (value: T, index: number) => Promise<unknown>\n): Promise<boolean> {\n return every(iterator, predicate);\n}\n"],"mappings":";AACA,OAAO,WAAW;AAiCX,SAAS,mBACd,UACA,WACkB;AAClB,SAAO,MAAM,UAAU,SAAS;AAClC;","names":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// src/asyncIteratorFilter.ts
|
|
2
|
+
import filter from "core-js-pure/full/async-iterator/filter";
|
|
3
|
+
function asyncIteratorFilter(asyncIterator, predicate) {
|
|
4
|
+
return filter(asyncIterator, predicate);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export {
|
|
8
|
+
asyncIteratorFilter
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=chunk-4ZBMXHD6.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/asyncIteratorFilter.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport filter from 'core-js-pure/full/async-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 asyncIteratorFilter<T, S extends T>(\n asyncIterator: AsyncIterator<T>,\n predicate: (value: T, index: number) => value is S\n): AsyncIterableIterator<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 asyncIteratorFilter<T>(\n asyncIterator: AsyncIterator<T>,\n predicate: (value: T, index: number) => unknown\n): AsyncIterableIterator<T>;\n\nexport function asyncIteratorFilter<T, S extends T>(\n asyncIterator: AsyncIterator<T>,\n predicate: (value: T, index: number) => unknown\n): AsyncIterableIterator<S> {\n return filter(asyncIterator, predicate);\n}\n"],"mappings":";AACA,OAAO,YAAY;AA0BZ,SAAS,oBACd,eACA,WAC0B;AAC1B,SAAO,OAAO,eAAe,SAAS;AACxC;","names":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// src/asyncIteratorTake.ts
|
|
2
|
+
import take from "core-js-pure/full/async-iterator/take";
|
|
3
|
+
function asyncIteratorTake(asyncIterator, limit) {
|
|
4
|
+
return take(asyncIterator, limit);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export {
|
|
8
|
+
asyncIteratorTake
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=chunk-AOZVPHE4.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/asyncIteratorTake.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport take from 'core-js-pure/full/async-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 asyncIteratorTake<T>(asyncIterator: AsyncIterator<T>, limit: number): AsyncIterator<T> {\n return take(asyncIterator, limit);\n}\n"],"mappings":";AACA,OAAO,UAAU;AAWV,SAAS,kBAAqB,eAAiC,OAAiC;AACrG,SAAO,KAAK,eAAe,KAAK;AAClC;","names":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// src/asyncIteratorFind.ts
|
|
2
|
+
import find from "core-js-pure/full/async-iterator/find";
|
|
3
|
+
function asyncIteratorFind(asyncIterator, predicate) {
|
|
4
|
+
return find(asyncIterator, predicate);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export {
|
|
8
|
+
asyncIteratorFind
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=chunk-CNKIGQUS.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/asyncIteratorFind.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport find from 'core-js-pure/full/async-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 asyncIteratorFind<T, S extends T>(\n asyncIterator: AsyncIterator<T>,\n predicate: (value: T, index: number) => Promise<boolean>\n): Promise<S | undefined>;\n\nexport function asyncIteratorFind<T>(\n asyncIterator: AsyncIterator<T>,\n predicate: (value: T, index: number) => Promise<unknown>\n): Promise<T | undefined>;\n\nexport function asyncIteratorFind<T, S extends T>(\n asyncIterator: AsyncIterator<T>,\n predicate: (value: T, index: number) => Promise<unknown>\n): Promise<S | undefined> {\n return find(asyncIterator, predicate);\n}\n"],"mappings":";AACA,OAAO,UAAU;AAsBV,SAAS,kBACd,eACA,WACwB;AACxB,SAAO,KAAK,eAAe,SAAS;AACtC;","names":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// src/asyncIteratorFlatMap.ts
|
|
2
|
+
import flatMap from "core-js-pure/full/async-iterator/flat-map";
|
|
3
|
+
function asyncIteratorFlatMap(asyncIterator, mapperFn) {
|
|
4
|
+
return flatMap(asyncIterator, mapperFn);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export {
|
|
8
|
+
asyncIteratorFlatMap
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=chunk-GFJGWVES.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/asyncIteratorFlatMap.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport flatMap from 'core-js-pure/full/async-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 asyncIteratorFlatMap<T, U>(\n asyncIterator: AsyncIterator<T>,\n mapperFn: (value: T, index: number) => Promise<U>\n): AsyncIterator<T> {\n return flatMap(asyncIterator, mapperFn);\n}\n"],"mappings":";AACA,OAAO,aAAa;AAWb,SAAS,qBACd,eACA,UACkB;AAClB,SAAO,QAAQ,eAAe,QAAQ;AACxC;","names":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// src/asyncIteratorForEach.ts
|
|
2
|
+
import forEach from "core-js-pure/full/async-iterator/for-each";
|
|
3
|
+
function asyncIteratorForEach(asyncIterator, callbackfn) {
|
|
4
|
+
return forEach(asyncIterator, callbackfn);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export {
|
|
8
|
+
asyncIteratorForEach
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=chunk-J3FQSENW.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/asyncIteratorForEach.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport forEach from 'core-js-pure/full/async-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 asyncIteratorForEach<T>(\n asyncIterator: AsyncIterator<T>,\n callbackfn: (value: T, index: number) => Promise<void>\n): Promise<void> {\n return forEach(asyncIterator, callbackfn);\n}\n"],"mappings":";AACA,OAAO,aAAa;AASb,SAAS,qBACd,eACA,YACe;AACf,SAAO,QAAQ,eAAe,UAAU;AAC1C;","names":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// src/asyncIteratorDrop.ts
|
|
2
|
+
import drop from "core-js-pure/full/async-iterator/drop";
|
|
3
|
+
function asyncIteratorDrop(asyncIterator, limit) {
|
|
4
|
+
return drop(asyncIterator, limit);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export {
|
|
8
|
+
asyncIteratorDrop
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=chunk-K4RCFPTZ.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/asyncIteratorDrop.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport drop from 'core-js-pure/full/async-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 asyncIteratorDrop<T>(asyncIterator: AsyncIterator<T>, limit: number): AsyncIterator<T> {\n return drop(asyncIterator, limit);\n}\n"],"mappings":";AACA,OAAO,UAAU;AAWV,SAAS,kBAAqB,eAAiC,OAAiC;AACrG,SAAO,KAAK,eAAe,KAAK;AAClC;","names":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// src/asyncIteratorMap.ts
|
|
2
|
+
import map from "core-js-pure/full/async-iterator/map";
|
|
3
|
+
function asyncIteratorMap(asyncIterator, callbackfn) {
|
|
4
|
+
return map(asyncIterator, callbackfn);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export {
|
|
8
|
+
asyncIteratorMap
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=chunk-LB3MK3EU.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/asyncIteratorMap.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport map from 'core-js-pure/full/async-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 asyncIteratorMap<T, U>(\n asyncIterator: AsyncIterator<T>,\n callbackfn: (value: T, index: number) => U\n): AsyncIterableIterator<U> {\n return map(asyncIterator, callbackfn);\n}\n"],"mappings":";AACA,OAAO,SAAS;AAST,SAAS,iBACd,eACA,YAC0B;AAC1B,SAAO,IAAI,eAAe,UAAU;AACtC;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/asyncIteratorFrom.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport from from 'core-js-pure/full/async-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 * @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 asyncIteratorFrom<T>(asyncIteratorLike: Pick<AsyncIterator<T>, 'next'>): AsyncIterator<T> {\n return from(asyncIteratorLike);\n}\n"],"mappings":";AACA,OAAO,UAAU;AASV,SAAS,kBAAqB,mBAAqE;AACxG,SAAO,KAAK,iBAAiB;AAC/B;","names":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// src/asyncIteratorSome.ts
|
|
2
|
+
import some from "core-js-pure/full/async-iterator/some";
|
|
3
|
+
function asyncIteratorSome(asyncIterator, predicate) {
|
|
4
|
+
return some(asyncIterator, predicate);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export {
|
|
8
|
+
asyncIteratorSome
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=chunk-ODPKEUIR.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/asyncIteratorSome.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport some from 'core-js-pure/full/async-iterator/some';\n\n/**\n * Determines whether the specified callback function returns true for any element of an iterable.\n *\n * @param predicate 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 * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function asyncIteratorSome<T>(\n asyncIterator: AsyncIterator<T>,\n predicate: (value: T, index: number) => Promise<unknown>\n): Promise<boolean> {\n return some(asyncIterator, predicate);\n}\n"],"mappings":";AACA,OAAO,UAAU;AASV,SAAS,kBACd,eACA,WACkB;AAClB,SAAO,KAAK,eAAe,SAAS;AACtC;","names":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// src/asyncIteratorReduce.ts
|
|
2
|
+
import reduce from "core-js-pure/full/async-iterator/reduce";
|
|
3
|
+
function asyncIteratorReduce(asyncIterator, callbackfn, initialValue) {
|
|
4
|
+
return reduce(asyncIterator, callbackfn, initialValue);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export {
|
|
8
|
+
asyncIteratorReduce
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=chunk-QLVU73KN.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/asyncIteratorReduce.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport reduce from 'core-js-pure/full/async-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 asyncIteratorReduce<T>(\n asyncIterator: AsyncIterator<T>,\n callbackfn: (previousValue: T, currentValue: T, currentIndex: number) => Promise<T>\n): Promise<T>;\n\nexport function asyncIteratorReduce<T>(\n asyncIterator: AsyncIterator<T>,\n callbackfn: (previousValue: T, currentValue: T, currentIndex: number) => Promise<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 asyncIteratorReduce<T, U>(\n asyncIterator: AsyncIterator<T>,\n callbackfn: (previousValue: U, currentValue: T, currentIndex: number) => Promise<U>,\n initialValue: U\n): U;\n\nexport function asyncIteratorReduce<T, U = undefined>(\n asyncIterator: AsyncIterator<T>,\n callbackfn: (previousValue: U | undefined, currentValue: T, currentIndex: number) => Promise<U>,\n initialValue?: U\n): Promise<U | undefined> {\n return reduce(asyncIterator, callbackfn, initialValue);\n}\n"],"mappings":";AACA,OAAO,YAAY;AAqCZ,SAAS,oBACd,eACA,YACA,cACwB;AACxB,SAAO,OAAO,eAAe,YAAY,YAAY;AACvD;","names":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// src/asyncIteratorToArray.ts
|
|
2
|
+
import toArray from "core-js-pure/full/async-iterator/to-array";
|
|
3
|
+
function asyncIteratorToArray(asyncIteratorLike) {
|
|
4
|
+
return toArray(asyncIteratorLike);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export {
|
|
8
|
+
asyncIteratorToArray
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=chunk-TQCZXEK7.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/asyncIteratorToArray.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport toArray from 'core-js-pure/full/async-iterator/to-array';\n\ntype AsyncIteratorLike<T> = Pick<AsyncIterator<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 asyncIteratorToArray<T>(asyncIteratorLike: AsyncIteratorLike<T>): Promise<T[]> {\n return toArray(asyncIteratorLike);\n}\n"],"mappings":";AACA,OAAO,aAAa;AAab,SAAS,qBAAwB,mBAAuD;AAC7F,SAAO,QAAQ,iBAAiB;AAClC;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/iteratorFrom.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport from from 'core-js-pure/full/iterator/from';\n\n/**\n * `.from` is a static method (unlike the others listed above) which takes an object as an argument. This method allows wrapping \"iterator-like\" objects with an iterator.\n *\n * @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;AASV,SAAS,aAAgB,cAAwC;AACtE,SAAO,KAAK,YAAY;AAC1B;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/iteratorFlatMap.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport flatMap from 'core-js-pure/full/iterator/flat-map';\n\n/**\n * `.flatMap` takes a mapping function as an argument. It returns an iterator that produces all elements of the iterators produced by applying the mapping function to the elements produced by the underlying iterator.\n *\n * @param mapperFn\n *\n * @return Returns an iterator of flat values.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorFlatMap<T, U>(
|
|
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>(iterator: Iterator<T>, mapperFn: (value: T, index: number) => U): Iterator<T> {\n return flatMap(iterator, mapperFn);\n}\n"],"mappings":";AACA,OAAO,aAAa;AAWb,SAAS,gBAAsB,UAAuB,UAAuD;AAClH,SAAO,QAAQ,UAAU,QAAQ;AACnC;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/iteratorToAsync.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport toAsync from 'core-js-pure/full/iterator/to-async';\n\n/**\n * Converts an iterator into async iterator.\n *\n * @return Returns an async iterator.\n *\n * @link https://github.com/tc39/proposal-async-iterator-helpers/blob/main/README.md\n */\nexport function iteratorToAsync<T>(iterator: Iterator<T>): AsyncIterator<T> {\n return toAsync(iterator);\n}\n"],"mappings":";AACA,OAAO,aAAa;AASb,SAAS,gBAAmB,UAAyC;AAC1E,SAAO,QAAQ,QAAQ;AACzB;","names":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
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 asyncIteratorDrop<T>(asyncIterator: AsyncIterator<T>, limit: number): AsyncIterator<T>;
|
|
11
|
+
|
|
12
|
+
export { asyncIteratorDrop };
|
|
@@ -0,0 +1,12 @@
|
|
|
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 asyncIteratorDrop<T>(asyncIterator: AsyncIterator<T>, limit: number): AsyncIterator<T>;
|
|
11
|
+
|
|
12
|
+
export { asyncIteratorDrop };
|
|
@@ -0,0 +1,44 @@
|
|
|
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/asyncIteratorDrop.ts
|
|
31
|
+
var asyncIteratorDrop_exports = {};
|
|
32
|
+
__export(asyncIteratorDrop_exports, {
|
|
33
|
+
asyncIteratorDrop: () => asyncIteratorDrop
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(asyncIteratorDrop_exports);
|
|
36
|
+
var import_drop = __toESM(require("core-js-pure/full/async-iterator/drop"));
|
|
37
|
+
function asyncIteratorDrop(asyncIterator, limit) {
|
|
38
|
+
return (0, import_drop.default)(asyncIterator, limit);
|
|
39
|
+
}
|
|
40
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
41
|
+
0 && (module.exports = {
|
|
42
|
+
asyncIteratorDrop
|
|
43
|
+
});
|
|
44
|
+
//# sourceMappingURL=iter-fest.asyncIteratorDrop.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/asyncIteratorDrop.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport drop from 'core-js-pure/full/async-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 asyncIteratorDrop<T>(asyncIterator: AsyncIterator<T>, limit: number): AsyncIterator<T> {\n return drop(asyncIterator, limit);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,kBAAiB;AAWV,SAAS,kBAAqB,eAAiC,OAAiC;AACrG,aAAO,YAAAA,SAAK,eAAe,KAAK;AAClC;","names":["drop"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
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 asyncIteratorEvery<T>(asyncIterator: AsyncIterator<T>, predicate: (value: T, index: number) => Promise<boolean>): Promise<boolean>;
|
|
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 asyncIteratorEvery<T>(iterator: AsyncIterator<T>, predicate: (value: T, index: number) => Promise<unknown>): Promise<boolean>;
|
|
24
|
+
|
|
25
|
+
export { asyncIteratorEvery };
|
|
@@ -0,0 +1,25 @@
|
|
|
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 asyncIteratorEvery<T>(asyncIterator: AsyncIterator<T>, predicate: (value: T, index: number) => Promise<boolean>): Promise<boolean>;
|
|
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 asyncIteratorEvery<T>(iterator: AsyncIterator<T>, predicate: (value: T, index: number) => Promise<unknown>): Promise<boolean>;
|
|
24
|
+
|
|
25
|
+
export { asyncIteratorEvery };
|
|
@@ -0,0 +1,44 @@
|
|
|
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/asyncIteratorEvery.ts
|
|
31
|
+
var asyncIteratorEvery_exports = {};
|
|
32
|
+
__export(asyncIteratorEvery_exports, {
|
|
33
|
+
asyncIteratorEvery: () => asyncIteratorEvery
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(asyncIteratorEvery_exports);
|
|
36
|
+
var import_every = __toESM(require("core-js-pure/full/async-iterator/every"));
|
|
37
|
+
function asyncIteratorEvery(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
|
+
asyncIteratorEvery
|
|
43
|
+
});
|
|
44
|
+
//# sourceMappingURL=iter-fest.asyncIteratorEvery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/asyncIteratorEvery.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport every from 'core-js-pure/full/async-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 asyncIteratorEvery<T>(\n asyncIterator: AsyncIterator<T>,\n predicate: (value: T, index: number) => Promise<boolean>\n): Promise<boolean>;\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 asyncIteratorEvery<T>(\n iterator: AsyncIterator<T>,\n predicate: (value: T, index: number) => Promise<unknown>\n): Promise<boolean>;\n\nexport function asyncIteratorEvery<T>(\n iterator: AsyncIterator<T>,\n predicate: (value: T, index: number) => Promise<unknown>\n): Promise<boolean> {\n return every(iterator, predicate);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAAkB;AAiCX,SAAS,mBACd,UACA,WACkB;AAClB,aAAO,aAAAA,SAAM,UAAU,SAAS;AAClC;","names":["every"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
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 asyncIteratorFilter<T, S extends T>(asyncIterator: AsyncIterator<T>, predicate: (value: T, index: number) => value is S): AsyncIterableIterator<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 asyncIteratorFilter<T>(asyncIterator: AsyncIterator<T>, predicate: (value: T, index: number) => unknown): AsyncIterableIterator<T>;
|
|
17
|
+
|
|
18
|
+
export { asyncIteratorFilter };
|
|
@@ -0,0 +1,18 @@
|
|
|
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 asyncIteratorFilter<T, S extends T>(asyncIterator: AsyncIterator<T>, predicate: (value: T, index: number) => value is S): AsyncIterableIterator<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 asyncIteratorFilter<T>(asyncIterator: AsyncIterator<T>, predicate: (value: T, index: number) => unknown): AsyncIterableIterator<T>;
|
|
17
|
+
|
|
18
|
+
export { asyncIteratorFilter };
|
|
@@ -0,0 +1,44 @@
|
|
|
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/asyncIteratorFilter.ts
|
|
31
|
+
var asyncIteratorFilter_exports = {};
|
|
32
|
+
__export(asyncIteratorFilter_exports, {
|
|
33
|
+
asyncIteratorFilter: () => asyncIteratorFilter
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(asyncIteratorFilter_exports);
|
|
36
|
+
var import_filter = __toESM(require("core-js-pure/full/async-iterator/filter"));
|
|
37
|
+
function asyncIteratorFilter(asyncIterator, predicate) {
|
|
38
|
+
return (0, import_filter.default)(asyncIterator, predicate);
|
|
39
|
+
}
|
|
40
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
41
|
+
0 && (module.exports = {
|
|
42
|
+
asyncIteratorFilter
|
|
43
|
+
});
|
|
44
|
+
//# sourceMappingURL=iter-fest.asyncIteratorFilter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/asyncIteratorFilter.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport filter from 'core-js-pure/full/async-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 asyncIteratorFilter<T, S extends T>(\n asyncIterator: AsyncIterator<T>,\n predicate: (value: T, index: number) => value is S\n): AsyncIterableIterator<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 asyncIteratorFilter<T>(\n asyncIterator: AsyncIterator<T>,\n predicate: (value: T, index: number) => unknown\n): AsyncIterableIterator<T>;\n\nexport function asyncIteratorFilter<T, S extends T>(\n asyncIterator: AsyncIterator<T>,\n predicate: (value: T, index: number) => unknown\n): AsyncIterableIterator<S> {\n return filter(asyncIterator, predicate);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAAmB;AA0BZ,SAAS,oBACd,eACA,WAC0B;AAC1B,aAAO,cAAAA,SAAO,eAAe,SAAS;AACxC;","names":["filter"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|