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
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Performs the specified action for each element in an iterable.
|
|
3
|
+
*
|
|
4
|
+
* @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the iterable.
|
|
5
|
+
*
|
|
6
|
+
* @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
|
|
7
|
+
*/
|
|
8
|
+
declare function iterableForEach<T>(iterable: Iterable<T>, callbackfn: (value: T, index: number, iterable: Iterable<T>) => void, thisArg?: any): void;
|
|
9
|
+
|
|
10
|
+
export { iterableForEach };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/iterableForEach.ts
|
|
21
|
+
var iterableForEach_exports = {};
|
|
22
|
+
__export(iterableForEach_exports, {
|
|
23
|
+
iterableForEach: () => iterableForEach
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(iterableForEach_exports);
|
|
26
|
+
function iterableForEach(iterable, callbackfn, thisArg) {
|
|
27
|
+
let index = 0;
|
|
28
|
+
if (typeof callbackfn !== "function") {
|
|
29
|
+
throw new TypeError(`${callbackfn} is not a function`);
|
|
30
|
+
}
|
|
31
|
+
const boundCallbackfn = callbackfn.bind(thisArg);
|
|
32
|
+
for (const value of iterable) {
|
|
33
|
+
boundCallbackfn(value, index++, iterable);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
37
|
+
0 && (module.exports = {
|
|
38
|
+
iterableForEach
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=iter-fest.iterableForEach.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/iterableForEach.ts"],"sourcesContent":["/**\n * Performs the specified action for each element in an iterable.\n *\n * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the iterable.\n *\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\n */\nexport function iterableForEach<T>(\n iterable: Iterable<T>,\n callbackfn: (value: T, index: number, iterable: Iterable<T>) => void,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n thisArg?: any\n): void {\n let index = 0;\n\n if (typeof callbackfn !== 'function') {\n throw new TypeError(`${callbackfn} is not a function`);\n }\n\n const boundCallbackfn = callbackfn.bind(thisArg);\n\n for (const value of iterable) {\n boundCallbackfn(value, index++, iterable);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOO,SAAS,gBACd,UACA,YAEA,SACM;AACN,MAAI,QAAQ;AAEZ,MAAI,OAAO,eAAe,YAAY;AACpC,UAAM,IAAI,UAAU,GAAG,UAAU,oBAAoB;AAAA,EACvD;AAEA,QAAM,kBAAkB,WAAW,KAAK,OAAO;AAE/C,aAAW,SAAS,UAAU;AAC5B,oBAAgB,OAAO,SAAS,QAAQ;AAAA,EAC1C;AACF;","names":[]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calls a defined callback function on each element of an array, and returns an array that contains the results.
|
|
3
|
+
* @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.
|
|
4
|
+
* @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
|
|
5
|
+
*/
|
|
6
|
+
declare function iterableMap<T, U>(iterable: Iterable<T>, callbackfn: (value: T, index: number, array: Iterable<T>) => U, thisArg?: any): IterableIterator<U>;
|
|
7
|
+
|
|
8
|
+
export { iterableMap };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calls a defined callback function on each element of an array, and returns an array that contains the results.
|
|
3
|
+
* @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.
|
|
4
|
+
* @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
|
|
5
|
+
*/
|
|
6
|
+
declare function iterableMap<T, U>(iterable: Iterable<T>, callbackfn: (value: T, index: number, array: Iterable<T>) => U, thisArg?: any): IterableIterator<U>;
|
|
7
|
+
|
|
8
|
+
export { iterableMap };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/iterableMap.ts
|
|
21
|
+
var iterableMap_exports = {};
|
|
22
|
+
__export(iterableMap_exports, {
|
|
23
|
+
iterableMap: () => iterableMap
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(iterableMap_exports);
|
|
26
|
+
function* iterableMap(iterable, callbackfn, thisArg) {
|
|
27
|
+
let index = 0;
|
|
28
|
+
if (typeof callbackfn !== "function") {
|
|
29
|
+
throw new TypeError(`${callbackfn} is not a function`);
|
|
30
|
+
}
|
|
31
|
+
for (const value of iterable) {
|
|
32
|
+
yield callbackfn.call(thisArg, value, index++, iterable);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
36
|
+
0 && (module.exports = {
|
|
37
|
+
iterableMap
|
|
38
|
+
});
|
|
39
|
+
//# sourceMappingURL=iter-fest.iterableMap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/iterableMap.ts"],"sourcesContent":["/**\n * Calls a defined callback function on each element of an array, and returns an array that contains the results.\n * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\n */\nexport function* iterableMap<T, U>(\n iterable: Iterable<T>,\n callbackfn: (value: T, index: number, array: Iterable<T>) => U,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n thisArg?: any\n): IterableIterator<U> {\n let index = 0;\n\n if (typeof callbackfn !== 'function') {\n throw new TypeError(`${callbackfn} is not a function`);\n }\n\n for (const value of iterable) {\n yield callbackfn.call(thisArg, value, index++, iterable);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKO,UAAU,YACf,UACA,YAEA,SACqB;AACrB,MAAI,QAAQ;AAEZ,MAAI,OAAO,eAAe,YAAY;AACpC,UAAM,IAAI,UAAU,GAAG,UAAU,oBAAoB;AAAA,EACvD;AAEA,aAAW,SAAS,UAAU;AAC5B,UAAM,WAAW,KAAK,SAAS,OAAO,SAAS,QAAQ;AAAA,EACzD;AACF;","names":[]}
|
|
@@ -1,23 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Calls the specified callback function for all the elements in an
|
|
2
|
+
* Calls the specified callback function for all the elements in an iterable. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
|
|
3
3
|
*
|
|
4
|
-
* @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the
|
|
4
|
+
* @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the iterable.
|
|
5
5
|
*
|
|
6
|
-
* @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an
|
|
7
|
-
*
|
|
8
|
-
* @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md
|
|
6
|
+
* @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an iterable value.
|
|
9
7
|
*/
|
|
10
|
-
declare function
|
|
11
|
-
declare function
|
|
8
|
+
declare function iterableReduce<T>(iterable: Iterable<T>, callbackfn: (previousValue: T, currentValue: T, currentIndex: number, iterable: Iterable<T>) => T): T;
|
|
9
|
+
declare function iterableReduce<T>(iterable: Iterable<T>, callbackfn: (previousValue: T, currentValue: T, currentIndex: number, iterable: Iterable<T>) => T, initialValue: T): T;
|
|
12
10
|
/**
|
|
13
|
-
* Calls the specified callback function for all the elements in an
|
|
11
|
+
* Calls the specified callback function for all the elements in an iterable. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
|
|
14
12
|
*
|
|
15
|
-
* @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the
|
|
13
|
+
* @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the iterable.
|
|
16
14
|
*
|
|
17
15
|
* @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
|
|
18
|
-
*
|
|
19
|
-
* @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md
|
|
20
16
|
*/
|
|
21
|
-
declare function
|
|
17
|
+
declare function iterableReduce<T, U>(iterable: Iterable<T>, callbackfn: (previousValue: U, currentValue: T, currentIndex: number, iterable: Iterable<T>) => U, initialValue: U): U;
|
|
22
18
|
|
|
23
|
-
export {
|
|
19
|
+
export { iterableReduce };
|
|
@@ -1,23 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Calls the specified callback function for all the elements in an
|
|
2
|
+
* Calls the specified callback function for all the elements in an iterable. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
|
|
3
3
|
*
|
|
4
|
-
* @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the
|
|
4
|
+
* @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the iterable.
|
|
5
5
|
*
|
|
6
|
-
* @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an
|
|
7
|
-
*
|
|
8
|
-
* @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md
|
|
6
|
+
* @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an iterable value.
|
|
9
7
|
*/
|
|
10
|
-
declare function
|
|
11
|
-
declare function
|
|
8
|
+
declare function iterableReduce<T>(iterable: Iterable<T>, callbackfn: (previousValue: T, currentValue: T, currentIndex: number, iterable: Iterable<T>) => T): T;
|
|
9
|
+
declare function iterableReduce<T>(iterable: Iterable<T>, callbackfn: (previousValue: T, currentValue: T, currentIndex: number, iterable: Iterable<T>) => T, initialValue: T): T;
|
|
12
10
|
/**
|
|
13
|
-
* Calls the specified callback function for all the elements in an
|
|
11
|
+
* Calls the specified callback function for all the elements in an iterable. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
|
|
14
12
|
*
|
|
15
|
-
* @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the
|
|
13
|
+
* @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the iterable.
|
|
16
14
|
*
|
|
17
15
|
* @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
|
|
18
|
-
*
|
|
19
|
-
* @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md
|
|
20
16
|
*/
|
|
21
|
-
declare function
|
|
17
|
+
declare function iterableReduce<T, U>(iterable: Iterable<T>, callbackfn: (previousValue: U, currentValue: T, currentIndex: number, iterable: Iterable<T>) => U, initialValue: U): U;
|
|
22
18
|
|
|
23
|
-
export {
|
|
19
|
+
export { iterableReduce };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/iterableReduce.ts
|
|
21
|
+
var iterableReduce_exports = {};
|
|
22
|
+
__export(iterableReduce_exports, {
|
|
23
|
+
iterableReduce: () => iterableReduce
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(iterableReduce_exports);
|
|
26
|
+
function iterableReduce(iterable, callbackfn, initialValue) {
|
|
27
|
+
let index = 0;
|
|
28
|
+
let previousValue = initialValue;
|
|
29
|
+
if (typeof callbackfn !== "function") {
|
|
30
|
+
throw new TypeError(`${callbackfn} is not a function`);
|
|
31
|
+
}
|
|
32
|
+
for (const currentValue of iterable) {
|
|
33
|
+
previousValue = callbackfn(previousValue, currentValue, index++, iterable);
|
|
34
|
+
}
|
|
35
|
+
return previousValue;
|
|
36
|
+
}
|
|
37
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
38
|
+
0 && (module.exports = {
|
|
39
|
+
iterableReduce
|
|
40
|
+
});
|
|
41
|
+
//# sourceMappingURL=iter-fest.iterableReduce.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/iterableReduce.ts"],"sourcesContent":["/**\n * Calls the specified callback function for all the elements in an iterable. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.\n *\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the iterable.\n *\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an iterable value.\n */\nexport function iterableReduce<T>(\n iterable: Iterable<T>,\n callbackfn: (previousValue: T, currentValue: T, currentIndex: number, iterable: Iterable<T>) => T\n): T;\n\nexport function iterableReduce<T>(\n iterable: Iterable<T>,\n callbackfn: (previousValue: T, currentValue: T, currentIndex: number, iterable: Iterable<T>) => T,\n initialValue: T\n): T;\n\n/**\n * Calls the specified callback function for all the elements in an iterable. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.\n *\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the iterable.\n *\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.\n */\n\nexport function iterableReduce<T, U>(\n iterable: Iterable<T>,\n callbackfn: (previousValue: U, currentValue: T, currentIndex: number, iterable: Iterable<T>) => U,\n initialValue: U\n): U;\n\nexport function iterableReduce<T, U = undefined>(\n iterable: Iterable<T>,\n callbackfn: (previousValue: U | undefined, currentValue: T, currentIndex: number, iterable: Iterable<T>) => U,\n initialValue?: U\n): U | undefined {\n let index = 0;\n let previousValue: U | undefined = initialValue;\n\n if (typeof callbackfn !== 'function') {\n throw new TypeError(`${callbackfn} is not a function`);\n }\n\n for (const currentValue of iterable) {\n previousValue = callbackfn(previousValue, currentValue, index++, iterable);\n }\n\n return previousValue;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAgCO,SAAS,eACd,UACA,YACA,cACe;AACf,MAAI,QAAQ;AACZ,MAAI,gBAA+B;AAEnC,MAAI,OAAO,eAAe,YAAY;AACpC,UAAM,IAAI,UAAU,GAAG,UAAU,oBAAoB;AAAA,EACvD;AAEA,aAAW,gBAAgB,UAAU;AACnC,oBAAgB,WAAW,eAAe,cAAc,SAAS,QAAQ;AAAA,EAC3E;AAEA,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Determines whether the specified callback function returns true for any element of an iterable.
|
|
3
|
+
*
|
|
4
|
+
* @param predicate
|
|
5
|
+
* A function that accepts up to three arguments. The some method calls the predicate function for each element in the iterable until the predicate returns a value which is coercible to the Boolean value true, or until the end of the iterable.
|
|
6
|
+
*
|
|
7
|
+
* @param thisArg
|
|
8
|
+
* An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
|
|
9
|
+
*/
|
|
10
|
+
declare function iterableSome<T>(iterable: Iterable<T>, predicate: (value: T, index: number, iterable: Iterable<T>) => unknown, thisArg?: any): boolean;
|
|
11
|
+
|
|
12
|
+
export { iterableSome };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Determines whether the specified callback function returns true for any element of an iterable.
|
|
3
|
+
*
|
|
4
|
+
* @param predicate
|
|
5
|
+
* A function that accepts up to three arguments. The some method calls the predicate function for each element in the iterable until the predicate returns a value which is coercible to the Boolean value true, or until the end of the iterable.
|
|
6
|
+
*
|
|
7
|
+
* @param thisArg
|
|
8
|
+
* An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
|
|
9
|
+
*/
|
|
10
|
+
declare function iterableSome<T>(iterable: Iterable<T>, predicate: (value: T, index: number, iterable: Iterable<T>) => unknown, thisArg?: any): boolean;
|
|
11
|
+
|
|
12
|
+
export { iterableSome };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/iterableSome.ts
|
|
21
|
+
var iterableSome_exports = {};
|
|
22
|
+
__export(iterableSome_exports, {
|
|
23
|
+
iterableSome: () => iterableSome
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(iterableSome_exports);
|
|
26
|
+
function iterableSome(iterable, predicate, thisArg = void 0) {
|
|
27
|
+
let index = 0;
|
|
28
|
+
if (typeof predicate !== "function") {
|
|
29
|
+
throw new TypeError(`${predicate} is not a function`);
|
|
30
|
+
}
|
|
31
|
+
const boundPredicate = predicate.bind(thisArg);
|
|
32
|
+
for (const value of iterable) {
|
|
33
|
+
if (boundPredicate(value, index++, iterable)) {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
40
|
+
0 && (module.exports = {
|
|
41
|
+
iterableSome
|
|
42
|
+
});
|
|
43
|
+
//# sourceMappingURL=iter-fest.iterableSome.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/iterableSome.ts"],"sourcesContent":["/**\n * Determines whether the specified callback function returns true for any element of an iterable.\n *\n * @param predicate\n * A function that accepts up to three arguments. The some method calls the predicate function for each element in the iterable until the predicate returns a value which is coercible to the Boolean value true, or until the end of the iterable.\n *\n * @param thisArg\n * An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.\n */\nexport function iterableSome<T>(\n iterable: Iterable<T>,\n predicate: (value: T, index: number, iterable: Iterable<T>) => unknown,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n thisArg: any = undefined\n): boolean {\n let index = 0;\n\n if (typeof predicate !== 'function') {\n throw new TypeError(`${predicate} is not a function`);\n }\n\n const boundPredicate = predicate.bind(thisArg);\n\n for (const value of iterable) {\n if (boundPredicate(value, index++, iterable)) {\n return true;\n }\n }\n\n return false;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AASO,SAAS,aACd,UACA,WAEA,UAAe,QACN;AACT,MAAI,QAAQ;AAEZ,MAAI,OAAO,cAAc,YAAY;AACnC,UAAM,IAAI,UAAU,GAAG,SAAS,oBAAoB;AAAA,EACtD;AAEA,QAAM,iBAAiB,UAAU,KAAK,OAAO;AAE7C,aAAW,SAAS,UAAU;AAC5B,QAAI,eAAe,OAAO,SAAS,QAAQ,GAAG;AAC5C,aAAO;AAAA,IACT;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
|
package/dist/iter-fest.js
CHANGED
|
@@ -9,11 +9,11 @@ var __export = (target, all) => {
|
|
|
9
9
|
for (var name in all)
|
|
10
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
11
|
};
|
|
12
|
-
var __copyProps = (to,
|
|
13
|
-
if (
|
|
14
|
-
for (let key of __getOwnPropNames(
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
15
|
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () =>
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
@@ -39,28 +39,23 @@ __export(src_exports, {
|
|
|
39
39
|
iterableAt: () => iterableAt,
|
|
40
40
|
iterableConcat: () => iterableConcat,
|
|
41
41
|
iterableEntries: () => iterableEntries,
|
|
42
|
+
iterableEvery: () => iterableEvery,
|
|
43
|
+
iterableFilter: () => iterableFilter,
|
|
44
|
+
iterableFind: () => iterableFind,
|
|
42
45
|
iterableFindIndex: () => iterableFindIndex,
|
|
43
46
|
iterableFindLast: () => iterableFindLast,
|
|
44
47
|
iterableFindLastIndex: () => iterableFindLastIndex,
|
|
48
|
+
iterableForEach: () => iterableForEach,
|
|
45
49
|
iterableIncludes: () => iterableIncludes,
|
|
46
50
|
iterableIndexOf: () => iterableIndexOf,
|
|
47
51
|
iterableJoin: () => iterableJoin,
|
|
48
52
|
iterableKeys: () => iterableKeys,
|
|
53
|
+
iterableMap: () => iterableMap,
|
|
54
|
+
iterableReduce: () => iterableReduce,
|
|
49
55
|
iterableSlice: () => iterableSlice,
|
|
56
|
+
iterableSome: () => iterableSome,
|
|
50
57
|
iterableToSpliced: () => iterableToSpliced,
|
|
51
58
|
iterableToString: () => iterableToString,
|
|
52
|
-
iteratorDrop: () => iteratorDrop,
|
|
53
|
-
iteratorEvery: () => iteratorEvery,
|
|
54
|
-
iteratorFilter: () => iteratorFilter,
|
|
55
|
-
iteratorFind: () => iteratorFind,
|
|
56
|
-
iteratorFlatMap: () => iteratorFlatMap,
|
|
57
|
-
iteratorForEach: () => iteratorForEach,
|
|
58
|
-
iteratorFrom: () => iteratorFrom,
|
|
59
|
-
iteratorMap: () => iteratorMap,
|
|
60
|
-
iteratorReduce: () => iteratorReduce,
|
|
61
|
-
iteratorSome: () => iteratorSome,
|
|
62
|
-
iteratorTake: () => iteratorTake,
|
|
63
|
-
iteratorToArray: () => iteratorToArray,
|
|
64
59
|
iteratorToIterable: () => iteratorToIterable,
|
|
65
60
|
observableFromAsync: () => observableFromAsync,
|
|
66
61
|
observableSubscribeAsReadable: () => observableSubscribeAsReadable,
|
|
@@ -216,6 +211,50 @@ function* iterableEntries(iterable) {
|
|
|
216
211
|
}
|
|
217
212
|
}
|
|
218
213
|
|
|
214
|
+
// src/iterableEvery.ts
|
|
215
|
+
function iterableEvery(iterable, predicate, thisArg = void 0) {
|
|
216
|
+
let index = 0;
|
|
217
|
+
if (typeof predicate !== "function") {
|
|
218
|
+
throw new TypeError(`${predicate} is not a function`);
|
|
219
|
+
}
|
|
220
|
+
const boundPredicate = predicate.bind(thisArg);
|
|
221
|
+
for (const value of iterable) {
|
|
222
|
+
if (!boundPredicate(value, index++, iterable)) {
|
|
223
|
+
return false;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
return true;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// src/iterableFilter.ts
|
|
230
|
+
function* iterableFilter(iterable, predicate, thisArg) {
|
|
231
|
+
let index = 0;
|
|
232
|
+
if (typeof predicate !== "function") {
|
|
233
|
+
throw new TypeError(`${predicate} is not a function`);
|
|
234
|
+
}
|
|
235
|
+
const boundPredicate = predicate.bind(thisArg);
|
|
236
|
+
for (const value of iterable) {
|
|
237
|
+
if (boundPredicate(value, index++, iterable)) {
|
|
238
|
+
yield value;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
// src/iterableFind.ts
|
|
244
|
+
function iterableFind(iterable, predicate, thisArg) {
|
|
245
|
+
let index = 0;
|
|
246
|
+
if (typeof predicate !== "function") {
|
|
247
|
+
throw new TypeError(`${predicate} is not a function`);
|
|
248
|
+
}
|
|
249
|
+
const boundPredicate = predicate.bind(thisArg);
|
|
250
|
+
for (const value of iterable) {
|
|
251
|
+
if (boundPredicate(value, index++, iterable)) {
|
|
252
|
+
return value;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
return void 0;
|
|
256
|
+
}
|
|
257
|
+
|
|
219
258
|
// src/iterableFindIndex.ts
|
|
220
259
|
function iterableFindIndex(iterable, predicate, thisArg) {
|
|
221
260
|
let index = 0;
|
|
@@ -265,6 +304,18 @@ function iterableFindLastIndex(iterable, predicate, thisArg) {
|
|
|
265
304
|
return lastIndex;
|
|
266
305
|
}
|
|
267
306
|
|
|
307
|
+
// src/iterableForEach.ts
|
|
308
|
+
function iterableForEach(iterable, callbackfn, thisArg) {
|
|
309
|
+
let index = 0;
|
|
310
|
+
if (typeof callbackfn !== "function") {
|
|
311
|
+
throw new TypeError(`${callbackfn} is not a function`);
|
|
312
|
+
}
|
|
313
|
+
const boundCallbackfn = callbackfn.bind(thisArg);
|
|
314
|
+
for (const value of iterable) {
|
|
315
|
+
boundCallbackfn(value, index++, iterable);
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
|
|
268
319
|
// src/iterableIncludes.ts
|
|
269
320
|
function iterableIncludes(iterable, searchElement, fromIndex = 0) {
|
|
270
321
|
let index = 0;
|
|
@@ -326,6 +377,30 @@ function* iterableKeys(iterable) {
|
|
|
326
377
|
}
|
|
327
378
|
}
|
|
328
379
|
|
|
380
|
+
// src/iterableMap.ts
|
|
381
|
+
function* iterableMap(iterable, callbackfn, thisArg) {
|
|
382
|
+
let index = 0;
|
|
383
|
+
if (typeof callbackfn !== "function") {
|
|
384
|
+
throw new TypeError(`${callbackfn} is not a function`);
|
|
385
|
+
}
|
|
386
|
+
for (const value of iterable) {
|
|
387
|
+
yield callbackfn.call(thisArg, value, index++, iterable);
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
// src/iterableReduce.ts
|
|
392
|
+
function iterableReduce(iterable, callbackfn, initialValue) {
|
|
393
|
+
let index = 0;
|
|
394
|
+
let previousValue = initialValue;
|
|
395
|
+
if (typeof callbackfn !== "function") {
|
|
396
|
+
throw new TypeError(`${callbackfn} is not a function`);
|
|
397
|
+
}
|
|
398
|
+
for (const currentValue of iterable) {
|
|
399
|
+
previousValue = callbackfn(previousValue, currentValue, index++, iterable);
|
|
400
|
+
}
|
|
401
|
+
return previousValue;
|
|
402
|
+
}
|
|
403
|
+
|
|
329
404
|
// src/iterableSlice.ts
|
|
330
405
|
function* iterableSlice(iterable, start = 0, end = Infinity) {
|
|
331
406
|
let index = 0;
|
|
@@ -353,6 +428,21 @@ function* iterableSlice(iterable, start = 0, end = Infinity) {
|
|
|
353
428
|
}
|
|
354
429
|
}
|
|
355
430
|
|
|
431
|
+
// src/iterableSome.ts
|
|
432
|
+
function iterableSome(iterable, predicate, thisArg = void 0) {
|
|
433
|
+
let index = 0;
|
|
434
|
+
if (typeof predicate !== "function") {
|
|
435
|
+
throw new TypeError(`${predicate} is not a function`);
|
|
436
|
+
}
|
|
437
|
+
const boundPredicate = predicate.bind(thisArg);
|
|
438
|
+
for (const value of iterable) {
|
|
439
|
+
if (boundPredicate(value, index++, iterable)) {
|
|
440
|
+
return true;
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
return false;
|
|
444
|
+
}
|
|
445
|
+
|
|
356
446
|
// src/iterableToSpliced.ts
|
|
357
447
|
function* iterableToSpliced(iterable, start = 0, deleteCount = 0, ...items) {
|
|
358
448
|
let index = 0;
|
|
@@ -424,78 +514,6 @@ var IterableWritableStream = class extends WritableStream {
|
|
|
424
514
|
}
|
|
425
515
|
};
|
|
426
516
|
|
|
427
|
-
// src/iteratorDrop.ts
|
|
428
|
-
var import_drop = __toESM(require("core-js-pure/full/iterator/drop"));
|
|
429
|
-
function iteratorDrop(iterator, limit) {
|
|
430
|
-
return (0, import_drop.default)(iterator, limit);
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
// src/iteratorEvery.ts
|
|
434
|
-
var import_every = __toESM(require("core-js-pure/full/iterator/every"));
|
|
435
|
-
function iteratorEvery(iterator, predicate) {
|
|
436
|
-
return (0, import_every.default)(iterator, predicate);
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
// src/iteratorFilter.ts
|
|
440
|
-
var import_filter = __toESM(require("core-js-pure/full/iterator/filter"));
|
|
441
|
-
function iteratorFilter(iterator, predicate) {
|
|
442
|
-
return (0, import_filter.default)(iterator, predicate);
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
// src/iteratorFind.ts
|
|
446
|
-
var import_find = __toESM(require("core-js-pure/full/iterator/find"));
|
|
447
|
-
function iteratorFind(iterator, predicate) {
|
|
448
|
-
return (0, import_find.default)(iterator, predicate);
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
// src/iteratorFlatMap.ts
|
|
452
|
-
var import_flat_map = __toESM(require("core-js-pure/full/iterator/flat-map"));
|
|
453
|
-
function iteratorFlatMap(iterable, mapperFn) {
|
|
454
|
-
return (0, import_flat_map.default)(iterable, mapperFn);
|
|
455
|
-
}
|
|
456
|
-
|
|
457
|
-
// src/iteratorForEach.ts
|
|
458
|
-
var import_for_each = __toESM(require("core-js-pure/full/iterator/for-each"));
|
|
459
|
-
function iteratorForEach(iterator, callbackfn) {
|
|
460
|
-
(0, import_for_each.default)(iterator, callbackfn);
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
// src/iteratorFrom.ts
|
|
464
|
-
var import_from = __toESM(require("core-js-pure/full/iterator/from"));
|
|
465
|
-
function iteratorFrom(iteratorLike) {
|
|
466
|
-
return (0, import_from.default)(iteratorLike);
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
// src/iteratorMap.ts
|
|
470
|
-
var import_map = __toESM(require("core-js-pure/full/iterator/map"));
|
|
471
|
-
function iteratorMap(iterator, callbackfn) {
|
|
472
|
-
return (0, import_map.default)(iterator, callbackfn);
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
// src/iteratorReduce.ts
|
|
476
|
-
var import_reduce = __toESM(require("core-js-pure/full/iterator/reduce"));
|
|
477
|
-
function iteratorReduce(iterator, callbackfn, initialValue) {
|
|
478
|
-
return (0, import_reduce.default)(iterator, callbackfn, initialValue);
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
// src/iteratorSome.ts
|
|
482
|
-
var import_some = __toESM(require("core-js-pure/full/iterator/some"));
|
|
483
|
-
function iteratorSome(iterator, predicate) {
|
|
484
|
-
return (0, import_some.default)(iterator, predicate);
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
// src/iteratorTake.ts
|
|
488
|
-
var import_take = __toESM(require("core-js-pure/full/iterator/take"));
|
|
489
|
-
function iteratorTake(iterator, limit) {
|
|
490
|
-
return (0, import_take.default)(iterator, limit);
|
|
491
|
-
}
|
|
492
|
-
|
|
493
|
-
// src/iteratorToArray.ts
|
|
494
|
-
var import_to_array = __toESM(require("core-js-pure/full/iterator/to-array"));
|
|
495
|
-
function iteratorToArray(iteratorLike) {
|
|
496
|
-
return (0, import_to_array.default)(iteratorLike);
|
|
497
|
-
}
|
|
498
|
-
|
|
499
517
|
// src/iteratorToIterable.ts
|
|
500
518
|
function iteratorToIterable(iterator) {
|
|
501
519
|
const iterableIterator = {
|
|
@@ -602,28 +620,23 @@ function readerValues(reader) {
|
|
|
602
620
|
iterableAt,
|
|
603
621
|
iterableConcat,
|
|
604
622
|
iterableEntries,
|
|
623
|
+
iterableEvery,
|
|
624
|
+
iterableFilter,
|
|
625
|
+
iterableFind,
|
|
605
626
|
iterableFindIndex,
|
|
606
627
|
iterableFindLast,
|
|
607
628
|
iterableFindLastIndex,
|
|
629
|
+
iterableForEach,
|
|
608
630
|
iterableIncludes,
|
|
609
631
|
iterableIndexOf,
|
|
610
632
|
iterableJoin,
|
|
611
633
|
iterableKeys,
|
|
634
|
+
iterableMap,
|
|
635
|
+
iterableReduce,
|
|
612
636
|
iterableSlice,
|
|
637
|
+
iterableSome,
|
|
613
638
|
iterableToSpliced,
|
|
614
639
|
iterableToString,
|
|
615
|
-
iteratorDrop,
|
|
616
|
-
iteratorEvery,
|
|
617
|
-
iteratorFilter,
|
|
618
|
-
iteratorFind,
|
|
619
|
-
iteratorFlatMap,
|
|
620
|
-
iteratorForEach,
|
|
621
|
-
iteratorFrom,
|
|
622
|
-
iteratorMap,
|
|
623
|
-
iteratorReduce,
|
|
624
|
-
iteratorSome,
|
|
625
|
-
iteratorTake,
|
|
626
|
-
iteratorToArray,
|
|
627
640
|
iteratorToIterable,
|
|
628
641
|
observableFromAsync,
|
|
629
642
|
observableSubscribeAsReadable,
|