iter-fest 0.1.1-main.d88474c → 0.1.1-main.dd552c2

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.
Files changed (177) hide show
  1. package/README.md +43 -18
  2. package/dist/chunk-3S6LCGE6.mjs +10 -0
  3. package/dist/chunk-3S6LCGE6.mjs.map +1 -0
  4. package/dist/chunk-BWMXKULC.mjs +46 -0
  5. package/dist/chunk-BWMXKULC.mjs.map +1 -0
  6. package/dist/chunk-FBST4AUL.mjs +10 -0
  7. package/dist/chunk-FBST4AUL.mjs.map +1 -0
  8. package/dist/chunk-FMIHIL6A.mjs +10 -0
  9. package/dist/chunk-FMIHIL6A.mjs.map +1 -0
  10. package/dist/chunk-KYMTQJIJ.mjs +10 -0
  11. package/dist/chunk-KYMTQJIJ.mjs.map +1 -0
  12. package/dist/chunk-LIMQXDFK.mjs +10 -0
  13. package/dist/chunk-LIMQXDFK.mjs.map +1 -0
  14. package/dist/chunk-OWUGLCQB.mjs +10 -0
  15. package/dist/chunk-OWUGLCQB.mjs.map +1 -0
  16. package/dist/chunk-QX6EMOSQ.mjs +10 -0
  17. package/dist/chunk-QX6EMOSQ.mjs.map +1 -0
  18. package/dist/chunk-R6SXIXMH.mjs +10 -0
  19. package/dist/chunk-R6SXIXMH.mjs.map +1 -0
  20. package/dist/chunk-TDHR35S7.mjs +10 -0
  21. package/dist/chunk-TDHR35S7.mjs.map +1 -0
  22. package/dist/chunk-VCKLUCOT.mjs +10 -0
  23. package/dist/chunk-VCKLUCOT.mjs.map +1 -0
  24. package/dist/chunk-XQDGXAAF.mjs +10 -0
  25. package/dist/chunk-XQDGXAAF.mjs.map +1 -0
  26. package/dist/{chunk-MOBXUTO5.mjs → chunk-YJSIVBF7.mjs} +5 -5
  27. package/dist/chunk-YJSIVBF7.mjs.map +1 -0
  28. package/dist/chunk-YLERARWI.mjs +10 -0
  29. package/dist/chunk-YLERARWI.mjs.map +1 -0
  30. package/dist/iter-fest.d.mts +14 -9
  31. package/dist/iter-fest.d.ts +14 -9
  32. package/dist/iter-fest.iterableWritableStream.d.mts +7 -0
  33. package/dist/iter-fest.iterableWritableStream.d.ts +7 -0
  34. package/dist/{iter-fest.pushAsyncIterableIterator.js → iter-fest.iterableWritableStream.js} +39 -30
  35. package/dist/iter-fest.iterableWritableStream.js.map +1 -0
  36. package/dist/iter-fest.iterableWritableStream.mjs +7 -0
  37. package/dist/iter-fest.iteratorDrop.d.mts +12 -0
  38. package/dist/iter-fest.iteratorDrop.d.ts +12 -0
  39. package/dist/iter-fest.iteratorDrop.js +44 -0
  40. package/dist/iter-fest.iteratorDrop.js.map +1 -0
  41. package/dist/iter-fest.iteratorDrop.mjs +7 -0
  42. package/dist/iter-fest.iteratorEvery.d.mts +25 -0
  43. package/dist/iter-fest.iteratorEvery.d.ts +25 -0
  44. package/dist/iter-fest.iteratorEvery.js +44 -0
  45. package/dist/iter-fest.iteratorEvery.js.map +1 -0
  46. package/dist/iter-fest.iteratorEvery.mjs +7 -0
  47. package/dist/iter-fest.iteratorFilter.d.mts +18 -0
  48. package/dist/iter-fest.iteratorFilter.d.ts +18 -0
  49. package/dist/iter-fest.iteratorFilter.js +44 -0
  50. package/dist/iter-fest.iteratorFilter.js.map +1 -0
  51. package/dist/iter-fest.iteratorFilter.mjs +7 -0
  52. package/dist/iter-fest.iteratorFind.d.mts +14 -0
  53. package/dist/iter-fest.iteratorFind.d.ts +14 -0
  54. package/dist/iter-fest.iteratorFind.js +44 -0
  55. package/dist/iter-fest.iteratorFind.js.map +1 -0
  56. package/dist/iter-fest.iteratorFind.mjs +7 -0
  57. package/dist/iter-fest.iteratorFlatMap.d.mts +12 -0
  58. package/dist/iter-fest.iteratorFlatMap.d.ts +12 -0
  59. package/dist/iter-fest.iteratorFlatMap.js +44 -0
  60. package/dist/iter-fest.iteratorFlatMap.js.map +1 -0
  61. package/dist/iter-fest.iteratorFlatMap.mjs +7 -0
  62. package/dist/iter-fest.iteratorForEach.d.mts +10 -0
  63. package/dist/iter-fest.iteratorForEach.d.ts +10 -0
  64. package/dist/iter-fest.iteratorForEach.js +44 -0
  65. package/dist/iter-fest.iteratorForEach.js.map +1 -0
  66. package/dist/iter-fest.iteratorForEach.mjs +7 -0
  67. package/dist/iter-fest.iteratorFrom.d.mts +12 -0
  68. package/dist/iter-fest.iteratorFrom.d.ts +12 -0
  69. package/dist/iter-fest.iteratorFrom.js +44 -0
  70. package/dist/iter-fest.iteratorFrom.js.map +1 -0
  71. package/dist/iter-fest.iteratorFrom.mjs +7 -0
  72. package/dist/iter-fest.iteratorMap.d.mts +10 -0
  73. package/dist/iter-fest.iteratorMap.d.ts +10 -0
  74. package/dist/iter-fest.iteratorMap.js +44 -0
  75. package/dist/iter-fest.iteratorMap.js.map +1 -0
  76. package/dist/iter-fest.iteratorMap.mjs +7 -0
  77. package/dist/{iter-fest.iterableReduce.d.mts → iter-fest.iteratorReduce.d.mts} +13 -9
  78. package/dist/{iter-fest.iterableReduce.d.ts → iter-fest.iteratorReduce.d.ts} +13 -9
  79. package/dist/iter-fest.iteratorReduce.js +44 -0
  80. package/dist/iter-fest.iteratorReduce.js.map +1 -0
  81. package/dist/iter-fest.iteratorReduce.mjs +7 -0
  82. package/dist/iter-fest.iteratorReduce.mjs.map +1 -0
  83. package/dist/iter-fest.iteratorSome.d.mts +10 -0
  84. package/dist/iter-fest.iteratorSome.d.ts +10 -0
  85. package/dist/iter-fest.iteratorSome.js +44 -0
  86. package/dist/iter-fest.iteratorSome.js.map +1 -0
  87. package/dist/iter-fest.iteratorSome.mjs +7 -0
  88. package/dist/iter-fest.iteratorSome.mjs.map +1 -0
  89. package/dist/iter-fest.iteratorTake.d.mts +12 -0
  90. package/dist/iter-fest.iteratorTake.d.ts +12 -0
  91. package/dist/iter-fest.iteratorTake.js +44 -0
  92. package/dist/iter-fest.iteratorTake.js.map +1 -0
  93. package/dist/iter-fest.iteratorTake.mjs +7 -0
  94. package/dist/iter-fest.iteratorTake.mjs.map +1 -0
  95. package/dist/iter-fest.iteratorToArray.d.mts +13 -0
  96. package/dist/iter-fest.iteratorToArray.d.ts +13 -0
  97. package/dist/iter-fest.iteratorToArray.js +44 -0
  98. package/dist/iter-fest.iteratorToArray.js.map +1 -0
  99. package/dist/iter-fest.iteratorToArray.mjs +7 -0
  100. package/dist/iter-fest.iteratorToArray.mjs.map +1 -0
  101. package/dist/iter-fest.js +164 -168
  102. package/dist/iter-fest.js.map +1 -1
  103. package/dist/iter-fest.mjs +72 -52
  104. package/dist/iter-fest.readableStreamFrom.d.mts +3 -0
  105. package/dist/iter-fest.readableStreamFrom.d.ts +3 -0
  106. package/dist/{iter-fest.iterableGetReadable.js → iter-fest.readableStreamFrom.js} +9 -9
  107. package/dist/iter-fest.readableStreamFrom.js.map +1 -0
  108. package/dist/iter-fest.readableStreamFrom.mjs +7 -0
  109. package/dist/iter-fest.readableStreamFrom.mjs.map +1 -0
  110. package/package.json +137 -87
  111. package/dist/chunk-5CRMPYKD.mjs +0 -19
  112. package/dist/chunk-5CRMPYKD.mjs.map +0 -1
  113. package/dist/chunk-6C3P4TNK.mjs +0 -19
  114. package/dist/chunk-6C3P4TNK.mjs.map +0 -1
  115. package/dist/chunk-EZC33HE6.mjs +0 -15
  116. package/dist/chunk-EZC33HE6.mjs.map +0 -1
  117. package/dist/chunk-JU353VSE.mjs +0 -16
  118. package/dist/chunk-JU353VSE.mjs.map +0 -1
  119. package/dist/chunk-MNLOWKTC.mjs +0 -19
  120. package/dist/chunk-MNLOWKTC.mjs.map +0 -1
  121. package/dist/chunk-MOBXUTO5.mjs.map +0 -1
  122. package/dist/chunk-O5SQJUKB.mjs +0 -37
  123. package/dist/chunk-O5SQJUKB.mjs.map +0 -1
  124. package/dist/chunk-XW34KZRY.mjs +0 -17
  125. package/dist/chunk-XW34KZRY.mjs.map +0 -1
  126. package/dist/chunk-ZUBHGSCW.mjs +0 -18
  127. package/dist/chunk-ZUBHGSCW.mjs.map +0 -1
  128. package/dist/iter-fest.iterableEvery.d.mts +0 -24
  129. package/dist/iter-fest.iterableEvery.d.ts +0 -24
  130. package/dist/iter-fest.iterableEvery.js +0 -43
  131. package/dist/iter-fest.iterableEvery.js.map +0 -1
  132. package/dist/iter-fest.iterableEvery.mjs +0 -7
  133. package/dist/iter-fest.iterableFilter.d.mts +0 -16
  134. package/dist/iter-fest.iterableFilter.d.ts +0 -16
  135. package/dist/iter-fest.iterableFilter.js +0 -42
  136. package/dist/iter-fest.iterableFilter.js.map +0 -1
  137. package/dist/iter-fest.iterableFilter.mjs +0 -7
  138. package/dist/iter-fest.iterableFind.d.mts +0 -15
  139. package/dist/iter-fest.iterableFind.d.ts +0 -15
  140. package/dist/iter-fest.iterableFind.js +0 -43
  141. package/dist/iter-fest.iterableFind.js.map +0 -1
  142. package/dist/iter-fest.iterableFind.mjs +0 -7
  143. package/dist/iter-fest.iterableForEach.d.mts +0 -10
  144. package/dist/iter-fest.iterableForEach.d.ts +0 -10
  145. package/dist/iter-fest.iterableForEach.js +0 -40
  146. package/dist/iter-fest.iterableForEach.js.map +0 -1
  147. package/dist/iter-fest.iterableForEach.mjs +0 -7
  148. package/dist/iter-fest.iterableGetReadable.d.mts +0 -3
  149. package/dist/iter-fest.iterableGetReadable.d.ts +0 -3
  150. package/dist/iter-fest.iterableGetReadable.js.map +0 -1
  151. package/dist/iter-fest.iterableGetReadable.mjs +0 -7
  152. package/dist/iter-fest.iterableMap.d.mts +0 -8
  153. package/dist/iter-fest.iterableMap.d.ts +0 -8
  154. package/dist/iter-fest.iterableMap.js +0 -39
  155. package/dist/iter-fest.iterableMap.js.map +0 -1
  156. package/dist/iter-fest.iterableMap.mjs +0 -7
  157. package/dist/iter-fest.iterableReduce.js +0 -41
  158. package/dist/iter-fest.iterableReduce.js.map +0 -1
  159. package/dist/iter-fest.iterableReduce.mjs +0 -7
  160. package/dist/iter-fest.iterableSome.d.mts +0 -12
  161. package/dist/iter-fest.iterableSome.d.ts +0 -12
  162. package/dist/iter-fest.iterableSome.js +0 -43
  163. package/dist/iter-fest.iterableSome.js.map +0 -1
  164. package/dist/iter-fest.iterableSome.mjs +0 -7
  165. package/dist/iter-fest.pushAsyncIterableIterator.d.mts +0 -9
  166. package/dist/iter-fest.pushAsyncIterableIterator.d.ts +0 -9
  167. package/dist/iter-fest.pushAsyncIterableIterator.js.map +0 -1
  168. package/dist/iter-fest.pushAsyncIterableIterator.mjs +0 -7
  169. /package/dist/{iter-fest.iterableEvery.mjs.map → iter-fest.iterableWritableStream.mjs.map} +0 -0
  170. /package/dist/{iter-fest.iterableFilter.mjs.map → iter-fest.iteratorDrop.mjs.map} +0 -0
  171. /package/dist/{iter-fest.iterableFind.mjs.map → iter-fest.iteratorEvery.mjs.map} +0 -0
  172. /package/dist/{iter-fest.iterableForEach.mjs.map → iter-fest.iteratorFilter.mjs.map} +0 -0
  173. /package/dist/{iter-fest.iterableGetReadable.mjs.map → iter-fest.iteratorFind.mjs.map} +0 -0
  174. /package/dist/{iter-fest.iterableMap.mjs.map → iter-fest.iteratorFlatMap.mjs.map} +0 -0
  175. /package/dist/{iter-fest.iterableReduce.mjs.map → iter-fest.iteratorForEach.mjs.map} +0 -0
  176. /package/dist/{iter-fest.iterableSome.mjs.map → iter-fest.iteratorFrom.mjs.map} +0 -0
  177. /package/dist/{iter-fest.pushAsyncIterableIterator.mjs.map → iter-fest.iteratorMap.mjs.map} +0 -0
@@ -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 * @param limit\n *\n * @return Returns the object if it is already an iterator, returns a wrapping iterator if the passed object implements a callable @@iterator property.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorFrom<T>(iteratorLike: Iterator<T>): Iterator<T> {\n return from(iteratorLike);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,kBAAiB;AAWV,SAAS,aAAgB,cAAwC;AACtE,aAAO,YAAAA,SAAK,YAAY;AAC1B;","names":["from"]}
@@ -0,0 +1,7 @@
1
+ import {
2
+ iteratorFrom
3
+ } from "./chunk-KYMTQJIJ.mjs";
4
+ export {
5
+ iteratorFrom
6
+ };
7
+ //# sourceMappingURL=iter-fest.iteratorFrom.mjs.map
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Calls a defined callback function on each element of an array, and returns an array that contains the results.
3
+ *
4
+ * @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.
5
+ *
6
+ * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md
7
+ */
8
+ declare function iteratorMap<T, U>(iterator: Iterator<T>, callbackfn: (value: T, index: number) => U): IterableIterator<U>;
9
+
10
+ export { iteratorMap };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Calls a defined callback function on each element of an array, and returns an array that contains the results.
3
+ *
4
+ * @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.
5
+ *
6
+ * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md
7
+ */
8
+ declare function iteratorMap<T, U>(iterator: Iterator<T>, callbackfn: (value: T, index: number) => U): IterableIterator<U>;
9
+
10
+ export { iteratorMap };
@@ -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/iteratorMap.ts
31
+ var iteratorMap_exports = {};
32
+ __export(iteratorMap_exports, {
33
+ iteratorMap: () => iteratorMap
34
+ });
35
+ module.exports = __toCommonJS(iteratorMap_exports);
36
+ var import_map = __toESM(require("core-js-pure/full/iterator/map"));
37
+ function iteratorMap(iterator, callbackfn) {
38
+ return (0, import_map.default)(iterator, callbackfn);
39
+ }
40
+ // Annotate the CommonJS export names for ESM import in node:
41
+ 0 && (module.exports = {
42
+ iteratorMap
43
+ });
44
+ //# sourceMappingURL=iter-fest.iteratorMap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/iteratorMap.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport map from 'core-js-pure/full/iterator/map';\n\n/**\n * Calls a defined callback function on each element of an array, and returns an array that contains the results.\n *\n * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorMap<T, U>(\n iterator: Iterator<T>,\n callbackfn: (value: T, index: number) => U\n): IterableIterator<U> {\n return map(iterator, callbackfn);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,iBAAgB;AAST,SAAS,YACd,UACA,YACqB;AACrB,aAAO,WAAAA,SAAI,UAAU,UAAU;AACjC;","names":["map"]}
@@ -0,0 +1,7 @@
1
+ import {
2
+ iteratorMap
3
+ } from "./chunk-XQDGXAAF.mjs";
4
+ export {
5
+ iteratorMap
6
+ };
7
+ //# sourceMappingURL=iter-fest.iteratorMap.mjs.map
@@ -1,19 +1,23 @@
1
1
  /**
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.
2
+ * 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.
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 iterable.
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 iterator.
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 iterable value.
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 iterator value.
7
+ *
8
+ * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md
7
9
  */
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;
10
+ declare function iteratorReduce<T>(iterator: Iterator<T>, callbackfn: (previousValue: T, currentValue: T, currentIndex: number) => T): T;
11
+ declare function iteratorReduce<T>(iterator: Iterator<T>, callbackfn: (previousValue: T, currentValue: T, currentIndex: number) => T, initialValue: T): T;
10
12
  /**
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.
13
+ * 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.
12
14
  *
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.
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 iterator.
14
16
  *
15
17
  * @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
16
20
  */
17
- declare function iterableReduce<T, U>(iterable: Iterable<T>, callbackfn: (previousValue: U, currentValue: T, currentIndex: number, iterable: Iterable<T>) => U, initialValue: U): U;
21
+ declare function iteratorReduce<T, U>(iterator: Iterator<T>, callbackfn: (previousValue: U, currentValue: T, currentIndex: number) => U, initialValue: U): U;
18
22
 
19
- export { iterableReduce };
23
+ export { iteratorReduce };
@@ -1,19 +1,23 @@
1
1
  /**
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.
2
+ * 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.
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 iterable.
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 iterator.
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 iterable value.
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 iterator value.
7
+ *
8
+ * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md
7
9
  */
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;
10
+ declare function iteratorReduce<T>(iterator: Iterator<T>, callbackfn: (previousValue: T, currentValue: T, currentIndex: number) => T): T;
11
+ declare function iteratorReduce<T>(iterator: Iterator<T>, callbackfn: (previousValue: T, currentValue: T, currentIndex: number) => T, initialValue: T): T;
10
12
  /**
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.
13
+ * 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.
12
14
  *
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.
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 iterator.
14
16
  *
15
17
  * @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
16
20
  */
17
- declare function iterableReduce<T, U>(iterable: Iterable<T>, callbackfn: (previousValue: U, currentValue: T, currentIndex: number, iterable: Iterable<T>) => U, initialValue: U): U;
21
+ declare function iteratorReduce<T, U>(iterator: Iterator<T>, callbackfn: (previousValue: U, currentValue: T, currentIndex: number) => U, initialValue: U): U;
18
22
 
19
- export { iterableReduce };
23
+ export { iteratorReduce };
@@ -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/iteratorReduce.ts
31
+ var iteratorReduce_exports = {};
32
+ __export(iteratorReduce_exports, {
33
+ iteratorReduce: () => iteratorReduce
34
+ });
35
+ module.exports = __toCommonJS(iteratorReduce_exports);
36
+ var import_reduce = __toESM(require("core-js-pure/full/iterator/reduce"));
37
+ function iteratorReduce(iterator, callbackfn, initialValue) {
38
+ return (0, import_reduce.default)(iterator, callbackfn, initialValue);
39
+ }
40
+ // Annotate the CommonJS export names for ESM import in node:
41
+ 0 && (module.exports = {
42
+ iteratorReduce
43
+ });
44
+ //# sourceMappingURL=iter-fest.iteratorReduce.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/iteratorReduce.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport reduce from 'core-js-pure/full/iterator/reduce';\n\n/**\n * Calls the specified callback function for all the elements in an iterator. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.\n *\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the iterator.\n *\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an iterator value.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorReduce<T>(\n iterator: Iterator<T>,\n callbackfn: (previousValue: T, currentValue: T, currentIndex: number) => T\n): T;\n\nexport function iteratorReduce<T>(\n iterator: Iterator<T>,\n callbackfn: (previousValue: T, currentValue: T, currentIndex: number) => T,\n initialValue: T\n): T;\n\n/**\n * Calls the specified callback function for all the elements in an iterator. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.\n *\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the iterator.\n *\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorReduce<T, U>(\n iterator: Iterator<T>,\n callbackfn: (previousValue: U, currentValue: T, currentIndex: number) => U,\n initialValue: U\n): U;\n\nexport function iteratorReduce<T, U = undefined>(\n iterator: Iterator<T>,\n callbackfn: (previousValue: U | undefined, currentValue: T, currentIndex: number) => U,\n initialValue?: U\n): U | undefined {\n return reduce(iterator, callbackfn, initialValue);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAAmB;AAqCZ,SAAS,eACd,UACA,YACA,cACe;AACf,aAAO,cAAAA,SAAO,UAAU,YAAY,YAAY;AAClD;","names":["reduce"]}
@@ -0,0 +1,7 @@
1
+ import {
2
+ iteratorReduce
3
+ } from "./chunk-LIMQXDFK.mjs";
4
+ export {
5
+ iteratorReduce
6
+ };
7
+ //# sourceMappingURL=iter-fest.iteratorReduce.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Determines whether the specified callback function returns true for any element of an iterable.
3
+ *
4
+ * @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.
5
+ *
6
+ * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md
7
+ */
8
+ declare function iteratorSome<T>(iterator: Iterator<T>, predicate: (value: T, index: number) => unknown): boolean;
9
+
10
+ export { iteratorSome };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Determines whether the specified callback function returns true for any element of an iterable.
3
+ *
4
+ * @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.
5
+ *
6
+ * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md
7
+ */
8
+ declare function iteratorSome<T>(iterator: Iterator<T>, predicate: (value: T, index: number) => unknown): boolean;
9
+
10
+ export { iteratorSome };
@@ -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/iteratorSome.ts
31
+ var iteratorSome_exports = {};
32
+ __export(iteratorSome_exports, {
33
+ iteratorSome: () => iteratorSome
34
+ });
35
+ module.exports = __toCommonJS(iteratorSome_exports);
36
+ var import_some = __toESM(require("core-js-pure/full/iterator/some"));
37
+ function iteratorSome(iterator, predicate) {
38
+ return (0, import_some.default)(iterator, predicate);
39
+ }
40
+ // Annotate the CommonJS export names for ESM import in node:
41
+ 0 && (module.exports = {
42
+ iteratorSome
43
+ });
44
+ //# sourceMappingURL=iter-fest.iteratorSome.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/iteratorSome.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport some from 'core-js-pure/full/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 iteratorSome<T>(iterator: Iterator<T>, predicate: (value: T, index: number) => unknown): boolean {\n return some(iterator, predicate);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,kBAAiB;AASV,SAAS,aAAgB,UAAuB,WAA0D;AAC/G,aAAO,YAAAA,SAAK,UAAU,SAAS;AACjC;","names":["some"]}
@@ -0,0 +1,7 @@
1
+ import {
2
+ iteratorSome
3
+ } from "./chunk-3S6LCGE6.mjs";
4
+ export {
5
+ iteratorSome
6
+ };
7
+ //# sourceMappingURL=iter-fest.iteratorSome.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * `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.
3
+ *
4
+ * @param limit
5
+ *
6
+ * @return Returns an iterator with items from the original iterator from 0 until the limit.
7
+ *
8
+ * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md
9
+ */
10
+ declare function iteratorTake<T>(iterator: Iterator<T>, limit: number): Iterator<T>;
11
+
12
+ export { iteratorTake };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * `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.
3
+ *
4
+ * @param limit
5
+ *
6
+ * @return Returns an iterator with items from the original iterator from 0 until the limit.
7
+ *
8
+ * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md
9
+ */
10
+ declare function iteratorTake<T>(iterator: Iterator<T>, limit: number): Iterator<T>;
11
+
12
+ export { iteratorTake };
@@ -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/iteratorTake.ts
31
+ var iteratorTake_exports = {};
32
+ __export(iteratorTake_exports, {
33
+ iteratorTake: () => iteratorTake
34
+ });
35
+ module.exports = __toCommonJS(iteratorTake_exports);
36
+ var import_take = __toESM(require("core-js-pure/full/iterator/take"));
37
+ function iteratorTake(iterator, limit) {
38
+ return (0, import_take.default)(iterator, limit);
39
+ }
40
+ // Annotate the CommonJS export names for ESM import in node:
41
+ 0 && (module.exports = {
42
+ iteratorTake
43
+ });
44
+ //# sourceMappingURL=iter-fest.iteratorTake.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/iteratorTake.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport take from 'core-js-pure/full/iterator/take';\n\n/**\n * `take` takes an integer as an argument. It returns an iterator that produces, at most, the given number of elements produced by the underlying iterator.\n *\n * @param limit\n *\n * @return Returns an iterator with items from the original iterator from 0 until the limit.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorTake<T>(iterator: Iterator<T>, limit: number): Iterator<T> {\n return take(iterator, limit);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,kBAAiB;AAWV,SAAS,aAAgB,UAAuB,OAA4B;AACjF,aAAO,YAAAA,SAAK,UAAU,KAAK;AAC7B;","names":["take"]}
@@ -0,0 +1,7 @@
1
+ import {
2
+ iteratorTake
3
+ } from "./chunk-VCKLUCOT.mjs";
4
+ export {
5
+ iteratorTake
6
+ };
7
+ //# sourceMappingURL=iter-fest.iteratorTake.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,13 @@
1
+ type IteratorLike<T> = Pick<Iterator<T>, 'next'>;
2
+ /**
3
+ * When you have a non-infinite iterator which you wish to transform into an array, you can do so with the builtin toArray method.
4
+ *
5
+ * @param limit
6
+ *
7
+ * @return Returns an Array containing the values from the iterator.
8
+ *
9
+ * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md
10
+ */
11
+ declare function iteratorToArray<T>(iteratorLike: IteratorLike<T>): T[];
12
+
13
+ export { iteratorToArray };
@@ -0,0 +1,13 @@
1
+ type IteratorLike<T> = Pick<Iterator<T>, 'next'>;
2
+ /**
3
+ * When you have a non-infinite iterator which you wish to transform into an array, you can do so with the builtin toArray method.
4
+ *
5
+ * @param limit
6
+ *
7
+ * @return Returns an Array containing the values from the iterator.
8
+ *
9
+ * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md
10
+ */
11
+ declare function iteratorToArray<T>(iteratorLike: IteratorLike<T>): T[];
12
+
13
+ export { iteratorToArray };
@@ -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/iteratorToArray.ts
31
+ var iteratorToArray_exports = {};
32
+ __export(iteratorToArray_exports, {
33
+ iteratorToArray: () => iteratorToArray
34
+ });
35
+ module.exports = __toCommonJS(iteratorToArray_exports);
36
+ var import_to_array = __toESM(require("core-js-pure/full/iterator/to-array"));
37
+ function iteratorToArray(iteratorLike) {
38
+ return (0, import_to_array.default)(iteratorLike);
39
+ }
40
+ // Annotate the CommonJS export names for ESM import in node:
41
+ 0 && (module.exports = {
42
+ iteratorToArray
43
+ });
44
+ //# sourceMappingURL=iter-fest.iteratorToArray.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/iteratorToArray.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport toArray from 'core-js-pure/full/iterator/to-array';\n\ntype IteratorLike<T> = Pick<Iterator<T>, 'next'>;\n\n/**\n * When you have a non-infinite iterator which you wish to transform into an array, you can do so with the builtin toArray method.\n *\n * @param limit\n *\n * @return Returns an Array containing the values from the iterator.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorToArray<T>(iteratorLike: IteratorLike<T>): T[] {\n return toArray(iteratorLike);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,sBAAoB;AAab,SAAS,gBAAmB,cAAoC;AACrE,aAAO,gBAAAA,SAAQ,YAAY;AAC7B;","names":["toArray"]}
@@ -0,0 +1,7 @@
1
+ import {
2
+ iteratorToArray
3
+ } from "./chunk-YLERARWI.mjs";
4
+ export {
5
+ iteratorToArray
6
+ };
7
+ //# sourceMappingURL=iter-fest.iteratorToArray.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}