iter-fest 0.2.1-main.3735548 → 0.2.1-main.ef083d9

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 (198) hide show
  1. package/dist/{chunk-LIMQXDFK.mjs → chunk-2BBSIYMU.mjs} +2 -2
  2. package/dist/chunk-2BBSIYMU.mjs.map +1 -0
  3. package/dist/{chunk-BWMXKULC.mjs → chunk-5LYB6HR7.mjs} +2 -2
  4. package/dist/chunk-5LYB6HR7.mjs.map +1 -0
  5. package/dist/{chunk-JVR6BUJA.mjs → chunk-745JDME6.mjs} +2 -2
  6. package/dist/chunk-745JDME6.mjs.map +1 -0
  7. package/dist/{chunk-CNKIGQUS.mjs → chunk-AUWAPRBT.mjs} +2 -2
  8. package/dist/chunk-AUWAPRBT.mjs.map +1 -0
  9. package/dist/{chunk-OJMT4K3R.mjs → chunk-BZKIZ3TX.mjs} +2 -2
  10. package/dist/chunk-BZKIZ3TX.mjs.map +1 -0
  11. package/dist/{chunk-FMIHIL6A.mjs → chunk-DSRJWJF3.mjs} +2 -2
  12. package/dist/chunk-DSRJWJF3.mjs.map +1 -0
  13. package/dist/{chunk-GFJGWVES.mjs → chunk-DYPZDL4O.mjs} +2 -2
  14. package/dist/chunk-DYPZDL4O.mjs.map +1 -0
  15. package/dist/{chunk-R6SXIXMH.mjs → chunk-EES7QVUK.mjs} +2 -2
  16. package/dist/chunk-EES7QVUK.mjs.map +1 -0
  17. package/dist/{chunk-3S6LCGE6.mjs → chunk-EOGNKTFW.mjs} +2 -2
  18. package/dist/chunk-EOGNKTFW.mjs.map +1 -0
  19. package/dist/{chunk-S2LECQKY.mjs → chunk-EXAULUZ6.mjs} +2 -2
  20. package/dist/chunk-EXAULUZ6.mjs.map +1 -0
  21. package/dist/{chunk-4RT2FROS.mjs → chunk-EYUTOVZ3.mjs} +2 -2
  22. package/dist/chunk-EYUTOVZ3.mjs.map +1 -0
  23. package/dist/{chunk-AOZVPHE4.mjs → chunk-HTHDBSFD.mjs} +2 -2
  24. package/dist/chunk-HTHDBSFD.mjs.map +1 -0
  25. package/dist/{chunk-K4RCFPTZ.mjs → chunk-IBEDYMB6.mjs} +2 -2
  26. package/dist/chunk-IBEDYMB6.mjs.map +1 -0
  27. package/dist/{chunk-DC2ZV7KQ.mjs → chunk-II2OQXU4.mjs} +2 -2
  28. package/dist/chunk-II2OQXU4.mjs.map +1 -0
  29. package/dist/{chunk-OWUGLCQB.mjs → chunk-J5OJ3I7A.mjs} +2 -2
  30. package/dist/chunk-J5OJ3I7A.mjs.map +1 -0
  31. package/dist/{chunk-J3FQSENW.mjs → chunk-JS222K7K.mjs} +2 -2
  32. package/dist/chunk-JS222K7K.mjs.map +1 -0
  33. package/dist/{chunk-72AEHTPQ.mjs → chunk-KE7SRYHM.mjs} +2 -2
  34. package/dist/chunk-KE7SRYHM.mjs.map +1 -0
  35. package/dist/{chunk-FBST4AUL.mjs → chunk-KQYVNSKA.mjs} +2 -2
  36. package/dist/chunk-KQYVNSKA.mjs.map +1 -0
  37. package/dist/{chunk-QLVU73KN.mjs → chunk-KXQVMKFK.mjs} +2 -2
  38. package/dist/chunk-KXQVMKFK.mjs.map +1 -0
  39. package/dist/{chunk-TDHR35S7.mjs → chunk-MT3HFVKE.mjs} +2 -2
  40. package/dist/chunk-MT3HFVKE.mjs.map +1 -0
  41. package/dist/{chunk-NLXKATXE.mjs → chunk-OHH4ICOH.mjs} +2 -2
  42. package/dist/chunk-OHH4ICOH.mjs.map +1 -0
  43. package/dist/{chunk-4ZBMXHD6.mjs → chunk-OHOZ4GTV.mjs} +2 -2
  44. package/dist/chunk-OHOZ4GTV.mjs.map +1 -0
  45. package/dist/{chunk-EIIP7YWB.mjs → chunk-OVRHHTSG.mjs} +1 -1
  46. package/dist/chunk-OVRHHTSG.mjs.map +1 -0
  47. package/dist/{chunk-XQDGXAAF.mjs → chunk-P7UI3YKU.mjs} +2 -2
  48. package/dist/chunk-P7UI3YKU.mjs.map +1 -0
  49. package/dist/{chunk-ODPKEUIR.mjs → chunk-RE7BGAPD.mjs} +2 -2
  50. package/dist/chunk-RE7BGAPD.mjs.map +1 -0
  51. package/dist/{chunk-FEOLYD5R.mjs → chunk-RHCU757P.mjs} +2 -2
  52. package/dist/chunk-RHCU757P.mjs.map +1 -0
  53. package/dist/{chunk-VLF6DI2U.mjs → chunk-TSHK7TEP.mjs} +3 -3
  54. package/dist/chunk-TSHK7TEP.mjs.map +1 -0
  55. package/dist/{chunk-WUFMEPOM.mjs → chunk-VP5SFGCE.mjs} +2 -2
  56. package/dist/chunk-VP5SFGCE.mjs.map +1 -0
  57. package/dist/{chunk-VCKLUCOT.mjs → chunk-VPA3WEBS.mjs} +2 -2
  58. package/dist/chunk-VPA3WEBS.mjs.map +1 -0
  59. package/dist/{chunk-VIMGYUMQ.mjs → chunk-XPZYZEW2.mjs} +2 -2
  60. package/dist/chunk-XPZYZEW2.mjs.map +1 -0
  61. package/dist/{chunk-LB3MK3EU.mjs → chunk-YJBQPGDC.mjs} +2 -2
  62. package/dist/chunk-YJBQPGDC.mjs.map +1 -0
  63. package/dist/iter-fest.asyncIteratorDrop.js +1 -1
  64. package/dist/iter-fest.asyncIteratorDrop.js.map +1 -1
  65. package/dist/iter-fest.asyncIteratorDrop.mjs +1 -1
  66. package/dist/iter-fest.asyncIteratorEvery.js +1 -1
  67. package/dist/iter-fest.asyncIteratorEvery.js.map +1 -1
  68. package/dist/iter-fest.asyncIteratorEvery.mjs +1 -1
  69. package/dist/iter-fest.asyncIteratorFilter.js +1 -1
  70. package/dist/iter-fest.asyncIteratorFilter.js.map +1 -1
  71. package/dist/iter-fest.asyncIteratorFilter.mjs +1 -1
  72. package/dist/iter-fest.asyncIteratorFind.js +1 -1
  73. package/dist/iter-fest.asyncIteratorFind.js.map +1 -1
  74. package/dist/iter-fest.asyncIteratorFind.mjs +1 -1
  75. package/dist/iter-fest.asyncIteratorFlatMap.js +1 -1
  76. package/dist/iter-fest.asyncIteratorFlatMap.js.map +1 -1
  77. package/dist/iter-fest.asyncIteratorFlatMap.mjs +1 -1
  78. package/dist/iter-fest.asyncIteratorForEach.js +1 -1
  79. package/dist/iter-fest.asyncIteratorForEach.js.map +1 -1
  80. package/dist/iter-fest.asyncIteratorForEach.mjs +1 -1
  81. package/dist/iter-fest.asyncIteratorFrom.js +1 -1
  82. package/dist/iter-fest.asyncIteratorFrom.js.map +1 -1
  83. package/dist/iter-fest.asyncIteratorFrom.mjs +1 -1
  84. package/dist/iter-fest.asyncIteratorMap.js +1 -1
  85. package/dist/iter-fest.asyncIteratorMap.js.map +1 -1
  86. package/dist/iter-fest.asyncIteratorMap.mjs +1 -1
  87. package/dist/iter-fest.asyncIteratorReduce.js +1 -1
  88. package/dist/iter-fest.asyncIteratorReduce.js.map +1 -1
  89. package/dist/iter-fest.asyncIteratorReduce.mjs +1 -1
  90. package/dist/iter-fest.asyncIteratorSome.js +1 -1
  91. package/dist/iter-fest.asyncIteratorSome.js.map +1 -1
  92. package/dist/iter-fest.asyncIteratorSome.mjs +1 -1
  93. package/dist/iter-fest.asyncIteratorTake.js +1 -1
  94. package/dist/iter-fest.asyncIteratorTake.js.map +1 -1
  95. package/dist/iter-fest.asyncIteratorTake.mjs +1 -1
  96. package/dist/iter-fest.asyncIteratorToArray.js +1 -1
  97. package/dist/iter-fest.asyncIteratorToArray.js.map +1 -1
  98. package/dist/iter-fest.asyncIteratorToArray.mjs +1 -1
  99. package/dist/iter-fest.d.mts +1 -1
  100. package/dist/iter-fest.d.ts +1 -1
  101. package/dist/iter-fest.iterableWritableStream.js +1 -1
  102. package/dist/iter-fest.iterableWritableStream.js.map +1 -1
  103. package/dist/iter-fest.iterableWritableStream.mjs +1 -1
  104. package/dist/iter-fest.iteratorDrop.js +1 -1
  105. package/dist/iter-fest.iteratorDrop.js.map +1 -1
  106. package/dist/iter-fest.iteratorDrop.mjs +1 -1
  107. package/dist/iter-fest.iteratorEvery.js +1 -1
  108. package/dist/iter-fest.iteratorEvery.js.map +1 -1
  109. package/dist/iter-fest.iteratorEvery.mjs +1 -1
  110. package/dist/iter-fest.iteratorFilter.js +1 -1
  111. package/dist/iter-fest.iteratorFilter.js.map +1 -1
  112. package/dist/iter-fest.iteratorFilter.mjs +1 -1
  113. package/dist/iter-fest.iteratorFind.js +1 -1
  114. package/dist/iter-fest.iteratorFind.js.map +1 -1
  115. package/dist/iter-fest.iteratorFind.mjs +1 -1
  116. package/dist/iter-fest.iteratorFlatMap.js +1 -1
  117. package/dist/iter-fest.iteratorFlatMap.js.map +1 -1
  118. package/dist/iter-fest.iteratorFlatMap.mjs +1 -1
  119. package/dist/iter-fest.iteratorForEach.js +1 -1
  120. package/dist/iter-fest.iteratorForEach.js.map +1 -1
  121. package/dist/iter-fest.iteratorForEach.mjs +1 -1
  122. package/dist/iter-fest.iteratorFrom.js +1 -1
  123. package/dist/iter-fest.iteratorFrom.js.map +1 -1
  124. package/dist/iter-fest.iteratorFrom.mjs +1 -1
  125. package/dist/iter-fest.iteratorMap.js +1 -1
  126. package/dist/iter-fest.iteratorMap.js.map +1 -1
  127. package/dist/iter-fest.iteratorMap.mjs +1 -1
  128. package/dist/iter-fest.iteratorReduce.js +1 -1
  129. package/dist/iter-fest.iteratorReduce.js.map +1 -1
  130. package/dist/iter-fest.iteratorReduce.mjs +1 -1
  131. package/dist/iter-fest.iteratorSome.js +1 -1
  132. package/dist/iter-fest.iteratorSome.js.map +1 -1
  133. package/dist/iter-fest.iteratorSome.mjs +1 -1
  134. package/dist/iter-fest.iteratorTake.js +1 -1
  135. package/dist/iter-fest.iteratorTake.js.map +1 -1
  136. package/dist/iter-fest.iteratorTake.mjs +1 -1
  137. package/dist/iter-fest.iteratorToArray.js +1 -1
  138. package/dist/iter-fest.iteratorToArray.js.map +1 -1
  139. package/dist/iter-fest.iteratorToArray.mjs +1 -1
  140. package/dist/iter-fest.iteratorToAsync.js +1 -1
  141. package/dist/iter-fest.iteratorToAsync.js.map +1 -1
  142. package/dist/iter-fest.iteratorToAsync.mjs +1 -1
  143. package/dist/iter-fest.js +28 -28
  144. package/dist/iter-fest.js.map +1 -1
  145. package/dist/iter-fest.mjs +31 -31
  146. package/dist/iter-fest.observable.d.mts +1 -1
  147. package/dist/iter-fest.observable.d.ts +1 -1
  148. package/dist/iter-fest.observable.js +2 -2
  149. package/dist/iter-fest.observable.js.map +1 -1
  150. package/dist/iter-fest.observable.mjs +2 -2
  151. package/dist/iter-fest.observableFromAsync.d.mts +1 -1
  152. package/dist/iter-fest.observableFromAsync.d.ts +1 -1
  153. package/dist/iter-fest.observableFromAsync.js +2 -2
  154. package/dist/iter-fest.observableFromAsync.js.map +1 -1
  155. package/dist/iter-fest.observableFromAsync.mjs +3 -3
  156. package/dist/iter-fest.observableSubscribeAsReadable.d.mts +1 -1
  157. package/dist/iter-fest.observableSubscribeAsReadable.d.ts +1 -1
  158. package/dist/iter-fest.observableSubscribeAsReadable.js.map +1 -1
  159. package/dist/iter-fest.observableSubscribeAsReadable.mjs +1 -1
  160. package/dist/iter-fest.observableValues.d.mts +1 -1
  161. package/dist/iter-fest.observableValues.d.ts +1 -1
  162. package/dist/iter-fest.observableValues.js.map +1 -1
  163. package/dist/iter-fest.observableValues.mjs +2 -2
  164. package/dist/iter-fest.symbolObservable.js +1 -1
  165. package/dist/iter-fest.symbolObservable.js.map +1 -1
  166. package/dist/iter-fest.symbolObservable.mjs +1 -1
  167. package/package.json +10 -10
  168. package/dist/chunk-3S6LCGE6.mjs.map +0 -1
  169. package/dist/chunk-4RT2FROS.mjs.map +0 -1
  170. package/dist/chunk-4ZBMXHD6.mjs.map +0 -1
  171. package/dist/chunk-72AEHTPQ.mjs.map +0 -1
  172. package/dist/chunk-AOZVPHE4.mjs.map +0 -1
  173. package/dist/chunk-BWMXKULC.mjs.map +0 -1
  174. package/dist/chunk-CNKIGQUS.mjs.map +0 -1
  175. package/dist/chunk-DC2ZV7KQ.mjs.map +0 -1
  176. package/dist/chunk-EIIP7YWB.mjs.map +0 -1
  177. package/dist/chunk-FBST4AUL.mjs.map +0 -1
  178. package/dist/chunk-FEOLYD5R.mjs.map +0 -1
  179. package/dist/chunk-FMIHIL6A.mjs.map +0 -1
  180. package/dist/chunk-GFJGWVES.mjs.map +0 -1
  181. package/dist/chunk-J3FQSENW.mjs.map +0 -1
  182. package/dist/chunk-JVR6BUJA.mjs.map +0 -1
  183. package/dist/chunk-K4RCFPTZ.mjs.map +0 -1
  184. package/dist/chunk-LB3MK3EU.mjs.map +0 -1
  185. package/dist/chunk-LIMQXDFK.mjs.map +0 -1
  186. package/dist/chunk-NLXKATXE.mjs.map +0 -1
  187. package/dist/chunk-ODPKEUIR.mjs.map +0 -1
  188. package/dist/chunk-OJMT4K3R.mjs.map +0 -1
  189. package/dist/chunk-OWUGLCQB.mjs.map +0 -1
  190. package/dist/chunk-QLVU73KN.mjs.map +0 -1
  191. package/dist/chunk-R6SXIXMH.mjs.map +0 -1
  192. package/dist/chunk-S2LECQKY.mjs.map +0 -1
  193. package/dist/chunk-TDHR35S7.mjs.map +0 -1
  194. package/dist/chunk-VCKLUCOT.mjs.map +0 -1
  195. package/dist/chunk-VIMGYUMQ.mjs.map +0 -1
  196. package/dist/chunk-VLF6DI2U.mjs.map +0 -1
  197. package/dist/chunk-WUFMEPOM.mjs.map +0 -1
  198. package/dist/chunk-XQDGXAAF.mjs.map +0 -1
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  observableFromAsync
3
- } from "./chunk-FEOLYD5R.mjs";
4
- import "./chunk-VLF6DI2U.mjs";
5
- import "./chunk-OJMT4K3R.mjs";
3
+ } from "./chunk-RHCU757P.mjs";
4
+ import "./chunk-TSHK7TEP.mjs";
5
+ import "./chunk-BZKIZ3TX.mjs";
6
6
  export {
7
7
  observableFromAsync
8
8
  };
@@ -1,5 +1,5 @@
1
1
  import { Observable } from './iter-fest.observable.mjs';
2
- import 'core-js-pure/full/observable';
2
+ import 'core-js-pure/full/observable/index.js';
3
3
  import './iter-fest.symbolObservable.mjs';
4
4
 
5
5
  declare function observableSubscribeAsReadable<T>(observable: Observable<T>): ReadableStream<T>;
@@ -1,5 +1,5 @@
1
1
  import { Observable } from './iter-fest.observable.js';
2
- import 'core-js-pure/full/observable';
2
+ import 'core-js-pure/full/observable/index.js';
3
3
  import './iter-fest.symbolObservable.js';
4
4
 
5
5
  declare function observableSubscribeAsReadable<T>(observable: Observable<T>): ReadableStream<T>;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/observableSubscribeAsReadable.ts"],"sourcesContent":["import type { Observable, Subscription } from './Observable';\n\nexport function observableSubscribeAsReadable<T>(observable: Observable<T>): ReadableStream<T> {\n let subscription: Subscription;\n\n return new ReadableStream<T>({\n cancel() {\n subscription.unsubscribe();\n },\n start(controller) {\n subscription = observable.subscribe({\n complete() {\n controller.close();\n },\n error(err: unknown) {\n controller.error(err);\n },\n next(value) {\n controller.enqueue(value);\n }\n });\n }\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,SAAS,8BAAiC,YAA8C;AAC7F,MAAI;AAEJ,SAAO,IAAI,eAAkB;AAAA,IAC3B,SAAS;AACP,mBAAa,YAAY;AAAA,IAC3B;AAAA,IACA,MAAM,YAAY;AAChB,qBAAe,WAAW,UAAU;AAAA,QAClC,WAAW;AACT,qBAAW,MAAM;AAAA,QACnB;AAAA,QACA,MAAM,KAAc;AAClB,qBAAW,MAAM,GAAG;AAAA,QACtB;AAAA,QACA,KAAK,OAAO;AACV,qBAAW,QAAQ,KAAK;AAAA,QAC1B;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF,CAAC;AACH;","names":[]}
1
+ {"version":3,"sources":["../src/observableSubscribeAsReadable.ts"],"sourcesContent":["import type { Observable, Subscription } from './Observable.js';\n\nexport function observableSubscribeAsReadable<T>(observable: Observable<T>): ReadableStream<T> {\n let subscription: Subscription;\n\n return new ReadableStream<T>({\n cancel() {\n subscription.unsubscribe();\n },\n start(controller) {\n subscription = observable.subscribe({\n complete() {\n controller.close();\n },\n error(err: unknown) {\n controller.error(err);\n },\n next(value) {\n controller.enqueue(value);\n }\n });\n }\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,SAAS,8BAAiC,YAA8C;AAC7F,MAAI;AAEJ,SAAO,IAAI,eAAkB;AAAA,IAC3B,SAAS;AACP,mBAAa,YAAY;AAAA,IAC3B;AAAA,IACA,MAAM,YAAY;AAChB,qBAAe,WAAW,UAAU;AAAA,QAClC,WAAW;AACT,qBAAW,MAAM;AAAA,QACnB;AAAA,QACA,MAAM,KAAc;AAClB,qBAAW,MAAM,GAAG;AAAA,QACtB;AAAA,QACA,KAAK,OAAO;AACV,qBAAW,QAAQ,KAAK;AAAA,QAC1B;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF,CAAC;AACH;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  observableSubscribeAsReadable
3
- } from "./chunk-EIIP7YWB.mjs";
3
+ } from "./chunk-OVRHHTSG.mjs";
4
4
  export {
5
5
  observableSubscribeAsReadable
6
6
  };
@@ -1,5 +1,5 @@
1
1
  import { Observable } from './iter-fest.observable.mjs';
2
- import 'core-js-pure/full/observable';
2
+ import 'core-js-pure/full/observable/index.js';
3
3
  import './iter-fest.symbolObservable.mjs';
4
4
 
5
5
  declare function observableValues<T>(observable: Observable<T>): AsyncIterableIterator<T>;
@@ -1,5 +1,5 @@
1
1
  import { Observable } from './iter-fest.observable.js';
2
- import 'core-js-pure/full/observable';
2
+ import 'core-js-pure/full/observable/index.js';
3
3
  import './iter-fest.symbolObservable.js';
4
4
 
5
5
  declare function observableValues<T>(observable: Observable<T>): AsyncIterableIterator<T>;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/observableValues.ts","../src/observableSubscribeAsReadable.ts","../src/readableStreamValues.ts"],"sourcesContent":["import type { Observable } from './Observable';\nimport { observableSubscribeAsReadable } from './observableSubscribeAsReadable';\nimport { readableStreamValues } from './readableStreamValues';\n\nexport function observableValues<T>(observable: Observable<T>): AsyncIterableIterator<T> {\n const readable = observableSubscribeAsReadable(observable);\n const iterable = readableStreamValues(readable);\n\n const cancellableIterable: AsyncIterableIterator<T> = {\n [Symbol.asyncIterator]() {\n return cancellableIterable;\n },\n next() {\n return iterable.next();\n },\n return() {\n try {\n return iterable.return?.() ?? Promise.resolve({ done: true, value: undefined });\n } finally {\n readable.cancel();\n }\n },\n throw(error) {\n return iterable.throw?.(error) ?? Promise.resolve({ done: true, value: undefined });\n }\n };\n\n return cancellableIterable;\n}\n","import type { Observable, Subscription } from './Observable';\n\nexport function observableSubscribeAsReadable<T>(observable: Observable<T>): ReadableStream<T> {\n let subscription: Subscription;\n\n return new ReadableStream<T>({\n cancel() {\n subscription.unsubscribe();\n },\n start(controller) {\n subscription = observable.subscribe({\n complete() {\n controller.close();\n },\n error(err: unknown) {\n controller.error(err);\n },\n next(value) {\n controller.enqueue(value);\n }\n });\n }\n });\n}\n","export function readableStreamValues<T>(readable: ReadableStream<T>): AsyncIterableIterator<T> {\n const reader = readable.getReader();\n\n const iterable: AsyncIterableIterator<T> = {\n [Symbol.asyncIterator]() {\n return iterable;\n },\n async next(): Promise<IteratorResult<T>> {\n const result = await Promise.race([reader.read(), reader.closed]);\n\n if (!result || result.done) {\n return { done: true, value: undefined };\n }\n\n return { value: result.value };\n },\n async return() {\n // Break/throw inside for-loop will trigger return().\n reader.releaseLock();\n\n return { done: true, value: undefined };\n }\n };\n\n return iterable;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEO,SAAS,8BAAiC,YAA8C;AAC7F,MAAI;AAEJ,SAAO,IAAI,eAAkB;AAAA,IAC3B,SAAS;AACP,mBAAa,YAAY;AAAA,IAC3B;AAAA,IACA,MAAM,YAAY;AAChB,qBAAe,WAAW,UAAU;AAAA,QAClC,WAAW;AACT,qBAAW,MAAM;AAAA,QACnB;AAAA,QACA,MAAM,KAAc;AAClB,qBAAW,MAAM,GAAG;AAAA,QACtB;AAAA,QACA,KAAK,OAAO;AACV,qBAAW,QAAQ,KAAK;AAAA,QAC1B;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF,CAAC;AACH;;;ACvBO,SAAS,qBAAwB,UAAuD;AAC7F,QAAM,SAAS,SAAS,UAAU;AAElC,QAAM,WAAqC;AAAA,IACzC,CAAC,OAAO,aAAa,IAAI;AACvB,aAAO;AAAA,IACT;AAAA,IACA,MAAM,OAAmC;AACvC,YAAM,SAAS,MAAM,QAAQ,KAAK,CAAC,OAAO,KAAK,GAAG,OAAO,MAAM,CAAC;AAEhE,UAAI,CAAC,UAAU,OAAO,MAAM;AAC1B,eAAO,EAAE,MAAM,MAAM,OAAO,OAAU;AAAA,MACxC;AAEA,aAAO,EAAE,OAAO,OAAO,MAAM;AAAA,IAC/B;AAAA,IACA,MAAM,SAAS;AAEb,aAAO,YAAY;AAEnB,aAAO,EAAE,MAAM,MAAM,OAAO,OAAU;AAAA,IACxC;AAAA,EACF;AAEA,SAAO;AACT;;;AFrBO,SAAS,iBAAoB,YAAqD;AACvF,QAAM,WAAW,8BAA8B,UAAU;AACzD,QAAM,WAAW,qBAAqB,QAAQ;AAE9C,QAAM,sBAAgD;AAAA,IACpD,CAAC,OAAO,aAAa,IAAI;AACvB,aAAO;AAAA,IACT;AAAA,IACA,OAAO;AACL,aAAO,SAAS,KAAK;AAAA,IACvB;AAAA,IACA,SAAS;AAfb;AAgBM,UAAI;AACF,iBAAO,cAAS,WAAT,sCAAuB,QAAQ,QAAQ,EAAE,MAAM,MAAM,OAAO,OAAU,CAAC;AAAA,MAChF,UAAE;AACA,iBAAS,OAAO;AAAA,MAClB;AAAA,IACF;AAAA,IACA,MAAM,OAAO;AAtBjB;AAuBM,eAAO,cAAS,UAAT,kCAAiB,WAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,OAAO,OAAU,CAAC;AAAA,IACpF;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
1
+ {"version":3,"sources":["../src/observableValues.ts","../src/observableSubscribeAsReadable.ts","../src/readableStreamValues.ts"],"sourcesContent":["import type { Observable } from './Observable.js';\nimport { observableSubscribeAsReadable } from './observableSubscribeAsReadable.ts';\nimport { readableStreamValues } from './readableStreamValues.ts';\n\nexport function observableValues<T>(observable: Observable<T>): AsyncIterableIterator<T> {\n const readable = observableSubscribeAsReadable(observable);\n const iterable = readableStreamValues(readable);\n\n const cancellableIterable: AsyncIterableIterator<T> = {\n [Symbol.asyncIterator]() {\n return cancellableIterable;\n },\n next() {\n return iterable.next();\n },\n return() {\n try {\n return iterable.return?.() ?? Promise.resolve({ done: true, value: undefined });\n } finally {\n readable.cancel();\n }\n },\n throw(error) {\n return iterable.throw?.(error) ?? Promise.resolve({ done: true, value: undefined });\n }\n };\n\n return cancellableIterable;\n}\n","import type { Observable, Subscription } from './Observable.js';\n\nexport function observableSubscribeAsReadable<T>(observable: Observable<T>): ReadableStream<T> {\n let subscription: Subscription;\n\n return new ReadableStream<T>({\n cancel() {\n subscription.unsubscribe();\n },\n start(controller) {\n subscription = observable.subscribe({\n complete() {\n controller.close();\n },\n error(err: unknown) {\n controller.error(err);\n },\n next(value) {\n controller.enqueue(value);\n }\n });\n }\n });\n}\n","export function readableStreamValues<T>(readable: ReadableStream<T>): AsyncIterableIterator<T> {\n const reader = readable.getReader();\n\n const iterable: AsyncIterableIterator<T> = {\n [Symbol.asyncIterator]() {\n return iterable;\n },\n async next(): Promise<IteratorResult<T>> {\n const result = await Promise.race([reader.read(), reader.closed]);\n\n if (!result || result.done) {\n return { done: true, value: undefined };\n }\n\n return { value: result.value };\n },\n async return() {\n // Break/throw inside for-loop will trigger return().\n reader.releaseLock();\n\n return { done: true, value: undefined };\n }\n };\n\n return iterable;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEO,SAAS,8BAAiC,YAA8C;AAC7F,MAAI;AAEJ,SAAO,IAAI,eAAkB;AAAA,IAC3B,SAAS;AACP,mBAAa,YAAY;AAAA,IAC3B;AAAA,IACA,MAAM,YAAY;AAChB,qBAAe,WAAW,UAAU;AAAA,QAClC,WAAW;AACT,qBAAW,MAAM;AAAA,QACnB;AAAA,QACA,MAAM,KAAc;AAClB,qBAAW,MAAM,GAAG;AAAA,QACtB;AAAA,QACA,KAAK,OAAO;AACV,qBAAW,QAAQ,KAAK;AAAA,QAC1B;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF,CAAC;AACH;;;ACvBO,SAAS,qBAAwB,UAAuD;AAC7F,QAAM,SAAS,SAAS,UAAU;AAElC,QAAM,WAAqC;AAAA,IACzC,CAAC,OAAO,aAAa,IAAI;AACvB,aAAO;AAAA,IACT;AAAA,IACA,MAAM,OAAmC;AACvC,YAAM,SAAS,MAAM,QAAQ,KAAK,CAAC,OAAO,KAAK,GAAG,OAAO,MAAM,CAAC;AAEhE,UAAI,CAAC,UAAU,OAAO,MAAM;AAC1B,eAAO,EAAE,MAAM,MAAM,OAAO,OAAU;AAAA,MACxC;AAEA,aAAO,EAAE,OAAO,OAAO,MAAM;AAAA,IAC/B;AAAA,IACA,MAAM,SAAS;AAEb,aAAO,YAAY;AAEnB,aAAO,EAAE,MAAM,MAAM,OAAO,OAAU;AAAA,IACxC;AAAA,EACF;AAEA,SAAO;AACT;;;AFrBO,SAAS,iBAAoB,YAAqD;AACvF,QAAM,WAAW,8BAA8B,UAAU;AACzD,QAAM,WAAW,qBAAqB,QAAQ;AAE9C,QAAM,sBAAgD;AAAA,IACpD,CAAC,OAAO,aAAa,IAAI;AACvB,aAAO;AAAA,IACT;AAAA,IACA,OAAO;AACL,aAAO,SAAS,KAAK;AAAA,IACvB;AAAA,IACA,SAAS;AAfb;AAgBM,UAAI;AACF,iBAAO,cAAS,WAAT,sCAAuB,QAAQ,QAAQ,EAAE,MAAM,MAAM,OAAO,OAAU,CAAC;AAAA,MAChF,UAAE;AACA,iBAAS,OAAO;AAAA,MAClB;AAAA,IACF;AAAA,IACA,MAAM,OAAO;AAtBjB;AAuBM,eAAO,cAAS,UAAT,kCAAiB,WAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,OAAO,OAAU,CAAC;AAAA,IACpF;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  observableValues
3
- } from "./chunk-72AEHTPQ.mjs";
3
+ } from "./chunk-KE7SRYHM.mjs";
4
4
  import "./chunk-RVIERPEV.mjs";
5
- import "./chunk-EIIP7YWB.mjs";
5
+ import "./chunk-OVRHHTSG.mjs";
6
6
  export {
7
7
  observableValues
8
8
  };
@@ -33,7 +33,7 @@ __export(SymbolObservable_exports, {
33
33
  SymbolObservable: () => SymbolObservable
34
34
  });
35
35
  module.exports = __toCommonJS(SymbolObservable_exports);
36
- var import_observable = __toESM(require("core-js-pure/features/symbol/observable"));
36
+ var import_observable = __toESM(require("core-js-pure/features/symbol/observable.js"));
37
37
  var SymbolObservable = import_observable.default;
38
38
  // Annotate the CommonJS export names for ESM import in node:
39
39
  0 && (module.exports = {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/SymbolObservable.ts"],"sourcesContent":["// @ts-expect-error core-js is not typed.\nimport CoreJSSymbolObservable from 'core-js-pure/features/symbol/observable';\n\nconst SymbolObservable: unique symbol = CoreJSSymbolObservable;\n\nexport { SymbolObservable };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,wBAAmC;AAEnC,IAAM,mBAAkC,kBAAAA;","names":["CoreJSSymbolObservable"]}
1
+ {"version":3,"sources":["../src/SymbolObservable.ts"],"sourcesContent":["// @ts-expect-error core-js is not typed.\nimport CoreJSSymbolObservable from 'core-js-pure/features/symbol/observable.js';\n\nconst SymbolObservable: unique symbol = CoreJSSymbolObservable;\n\nexport { SymbolObservable };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,wBAAmC;AAEnC,IAAM,mBAAkC,kBAAAA;","names":["CoreJSSymbolObservable"]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  SymbolObservable
3
- } from "./chunk-OJMT4K3R.mjs";
3
+ } from "./chunk-BZKIZ3TX.mjs";
4
4
  export {
5
5
  SymbolObservable
6
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iter-fest",
3
- "version": "0.2.1-main.3735548",
3
+ "version": "0.2.1-main.ef083d9",
4
4
  "description": "A collection of utilities for iterations.",
5
5
  "files": [
6
6
  "./dist/"
@@ -552,22 +552,22 @@
552
552
  "core-js-pure": "^3.37.1"
553
553
  },
554
554
  "devDependencies": {
555
- "@babel/preset-env": "^7.24.6",
556
- "@babel/preset-typescript": "^7.24.6",
557
- "@testing-library/react": "^15.0.7",
555
+ "@babel/preset-env": "^7.24.7",
556
+ "@babel/preset-typescript": "^7.24.7",
557
+ "@testing-library/react": "^16.0.0",
558
558
  "@tsconfig/recommended": "^1.0.6",
559
559
  "@tsconfig/strictest": "^2.0.5",
560
560
  "@types/jest": "^29.5.12",
561
- "@types/node": "^20.12.13",
561
+ "@types/node": "^20.14.9",
562
562
  "core-js-pure": "^3.37.1",
563
- "esbuild": "^0.21.4",
563
+ "esbuild": "^0.21.5",
564
564
  "jest": "^29.7.0",
565
565
  "jest-environment-jsdom": "^29.7.0",
566
- "prettier": "^3.2.5",
567
- "tsup": "^8.0.2",
568
- "typescript": "^5.4.5"
566
+ "prettier": "^3.3.2",
567
+ "tsup": "^8.1.0",
568
+ "typescript": "^5.5.2"
569
569
  },
570
570
  "dependencies": {
571
- "iter-fest": "^0.2.1-main.3735548"
571
+ "iter-fest": "^0.2.1-main.ef083d9"
572
572
  }
573
573
  }
@@ -1 +0,0 @@
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":";AACA,OAAO,UAAU;AASV,SAAS,aAAgB,UAAuB,WAA0D;AAC/G,SAAO,KAAK,UAAU,SAAS;AACjC;","names":[]}
@@ -1 +0,0 @@
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":[]}
@@ -1 +0,0 @@
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":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/observableValues.ts"],"sourcesContent":["import type { Observable } from './Observable';\nimport { observableSubscribeAsReadable } from './observableSubscribeAsReadable';\nimport { readableStreamValues } from './readableStreamValues';\n\nexport function observableValues<T>(observable: Observable<T>): AsyncIterableIterator<T> {\n const readable = observableSubscribeAsReadable(observable);\n const iterable = readableStreamValues(readable);\n\n const cancellableIterable: AsyncIterableIterator<T> = {\n [Symbol.asyncIterator]() {\n return cancellableIterable;\n },\n next() {\n return iterable.next();\n },\n return() {\n try {\n return iterable.return?.() ?? Promise.resolve({ done: true, value: undefined });\n } finally {\n readable.cancel();\n }\n },\n throw(error) {\n return iterable.throw?.(error) ?? Promise.resolve({ done: true, value: undefined });\n }\n };\n\n return cancellableIterable;\n}\n"],"mappings":";;;;;;;;AAIO,SAAS,iBAAoB,YAAqD;AACvF,QAAM,WAAW,8BAA8B,UAAU;AACzD,QAAM,WAAW,qBAAqB,QAAQ;AAE9C,QAAM,sBAAgD;AAAA,IACpD,CAAC,OAAO,aAAa,IAAI;AACvB,aAAO;AAAA,IACT;AAAA,IACA,OAAO;AACL,aAAO,SAAS,KAAK;AAAA,IACvB;AAAA,IACA,SAAS;AAfb;AAgBM,UAAI;AACF,iBAAO,cAAS,WAAT,sCAAuB,QAAQ,QAAQ,EAAE,MAAM,MAAM,OAAO,OAAU,CAAC;AAAA,MAChF,UAAE;AACA,iBAAS,OAAO;AAAA,MAClB;AAAA,IACF;AAAA,IACA,MAAM,OAAO;AAtBjB;AAuBM,eAAO,cAAS,UAAT,kCAAiB,WAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,OAAO,OAAU,CAAC;AAAA,IACpF;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
@@ -1 +0,0 @@
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":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/private/withResolvers.ts","../src/iterableWritableStream.ts"],"sourcesContent":["// @ts-expect-error \"core-js\" is not typed.\nimport coreJSPromiseWithResolvers from 'core-js-pure/full/promise/with-resolvers';\n\nexport default function withResolvers<T>(): PromiseWithResolvers<T> {\n return coreJSPromiseWithResolvers();\n}\n","import withResolvers from './private/withResolvers';\n\nconst CLOSE = Symbol();\n\nexport class IterableWritableStream<T> extends WritableStream<T> {\n constructor() {\n super({\n close: () => {\n this.#buffer.push(CLOSE);\n this.#writeResolvers.resolve();\n },\n write: (chunk: T) => {\n this.#buffer.push(chunk);\n this.#writeResolvers.resolve();\n this.#writeResolvers = withResolvers();\n }\n });\n }\n\n #buffer: (T | typeof CLOSE)[] = [];\n #writeResolvers: PromiseWithResolvers<void> = withResolvers();\n\n [Symbol.asyncIterator](): AsyncIterator<T> {\n return {\n next: async () => {\n while (!this.#buffer.length) {\n await this.#writeResolvers.promise;\n }\n\n const value = this.#buffer[0] as T | typeof CLOSE;\n\n if (value === CLOSE) {\n return { done: true, value: undefined };\n }\n\n // If it is not CLOSE, remove it from the queue.\n this.#buffer.shift();\n\n // Idle here so concurrent iteration has a chance to pick up the next value in a round robin fashion.\n await undefined;\n\n return { done: false, value };\n }\n };\n }\n}\n"],"mappings":";AACA,OAAO,gCAAgC;AAExB,SAAR,gBAA6D;AAClE,SAAO,2BAA2B;AACpC;;;ACHA,IAAM,QAAQ,OAAO;AAEd,IAAM,yBAAN,cAAwC,eAAkB;AAAA,EAC/D,cAAc;AACZ,UAAM;AAAA,MACJ,OAAO,MAAM;AACX,aAAK,QAAQ,KAAK,KAAK;AACvB,aAAK,gBAAgB,QAAQ;AAAA,MAC/B;AAAA,MACA,OAAO,CAAC,UAAa;AACnB,aAAK,QAAQ,KAAK,KAAK;AACvB,aAAK,gBAAgB,QAAQ;AAC7B,aAAK,kBAAkB,cAAc;AAAA,MACvC;AAAA,IACF,CAAC;AAAA,EACH;AAAA,EAEA,UAAgC,CAAC;AAAA,EACjC,kBAA8C,cAAc;AAAA,EAE5D,CAAC,OAAO,aAAa,IAAsB;AACzC,WAAO;AAAA,MACL,MAAM,YAAY;AAChB,eAAO,CAAC,KAAK,QAAQ,QAAQ;AAC3B,gBAAM,KAAK,gBAAgB;AAAA,QAC7B;AAEA,cAAM,QAAQ,KAAK,QAAQ,CAAC;AAE5B,YAAI,UAAU,OAAO;AACnB,iBAAO,EAAE,MAAM,MAAM,OAAO,OAAU;AAAA,QACxC;AAGA,aAAK,QAAQ,MAAM;AAGnB,cAAM;AAEN,eAAO,EAAE,MAAM,OAAO,MAAM;AAAA,MAC9B;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
@@ -1 +0,0 @@
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":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/iteratorFrom.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport from from 'core-js-pure/full/iterator/from';\n\n/**\n * `.from` is a static method (unlike the others listed above) which takes an object as an argument. This method allows wrapping \"iterator-like\" objects with an iterator.\n *\n * @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: Pick<Iterator<T>, 'next'>): Iterator<T> {\n return from(iteratorLike);\n}\n"],"mappings":";AACA,OAAO,UAAU;AASV,SAAS,aAAgB,cAAsD;AACpF,SAAO,KAAK,YAAY;AAC1B;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/observableSubscribeAsReadable.ts"],"sourcesContent":["import type { Observable, Subscription } from './Observable';\n\nexport function observableSubscribeAsReadable<T>(observable: Observable<T>): ReadableStream<T> {\n let subscription: Subscription;\n\n return new ReadableStream<T>({\n cancel() {\n subscription.unsubscribe();\n },\n start(controller) {\n subscription = observable.subscribe({\n complete() {\n controller.close();\n },\n error(err: unknown) {\n controller.error(err);\n },\n next(value) {\n controller.enqueue(value);\n }\n });\n }\n });\n}\n"],"mappings":";AAEO,SAAS,8BAAiC,YAA8C;AAC7F,MAAI;AAEJ,SAAO,IAAI,eAAkB;AAAA,IAC3B,SAAS;AACP,mBAAa,YAAY;AAAA,IAC3B;AAAA,IACA,MAAM,YAAY;AAChB,qBAAe,WAAW,UAAU;AAAA,QAClC,WAAW;AACT,qBAAW,MAAM;AAAA,QACnB;AAAA,QACA,MAAM,KAAc;AAClB,qBAAW,MAAM,GAAG;AAAA,QACtB;AAAA,QACA,KAAK,OAAO;AACV,qBAAW,QAAQ,KAAK;AAAA,QAC1B;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF,CAAC;AACH;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/iteratorFind.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport find from 'core-js-pure/full/iterator/find';\n\n/**\n * Returns the value of the first element in the iterator where predicate is true, and undefined\n * otherwise.\n *\n * @param predicate find calls predicate once for each element of the iterator, in ascending\n * order, until it finds one where predicate returns true. If such an element is found, find\n * immediately returns that element value. Otherwise, find returns undefined.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorFind<T, S extends T>(\n iterator: Iterator<T>,\n predicate: (value: T, index: number) => value is S\n): S | undefined;\n\nexport function iteratorFind<T>(iterator: Iterator<T>, predicate: (value: T, index: number) => unknown): T | undefined;\n\nexport function iteratorFind<T, S extends T>(\n iterator: Iterator<T>,\n predicate: (value: T, index: number) => unknown\n): S | undefined {\n return find(iterator, predicate);\n}\n"],"mappings":";AACA,OAAO,UAAU;AAmBV,SAAS,aACd,UACA,WACe;AACf,SAAO,KAAK,UAAU,SAAS;AACjC;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/observableFromAsync.ts"],"sourcesContent":["import { Observable } from './Observable';\n\nexport function observableFromAsync<T>(iterable: AsyncIterable<T>): Observable<T> {\n return new Observable(subscriber => {\n let closed = false;\n\n (async function () {\n try {\n for await (const value of iterable) {\n if (closed) {\n break;\n }\n\n subscriber.next(value);\n }\n\n subscriber.complete();\n } catch (error) {\n subscriber.error(error);\n }\n })();\n\n return () => {\n closed = true;\n };\n });\n}\n"],"mappings":";;;;;AAEO,SAAS,oBAAuB,UAA2C;AAChF,SAAO,IAAI,WAAW,gBAAc;AAClC,QAAI,SAAS;AAEb,KAAC,iBAAkB;AACjB,UAAI;AACF,yBAAiB,SAAS,UAAU;AAClC,cAAI,QAAQ;AACV;AAAA,UACF;AAEA,qBAAW,KAAK,KAAK;AAAA,QACvB;AAEA,mBAAW,SAAS;AAAA,MACtB,SAAS,OAAO;AACd,mBAAW,MAAM,KAAK;AAAA,MACxB;AAAA,IACF,GAAG;AAEH,WAAO,MAAM;AACX,eAAS;AAAA,IACX;AAAA,EACF,CAAC;AACH;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/iteratorForEach.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport forEach from 'core-js-pure/full/iterator/for-each';\n\n/**\n * Performs the specified action for each element in an iterator.\n *\n * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the iterator.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorForEach<T>(iterator: Iterator<T>, callbackfn: (value: T, index: number) => void): void {\n forEach(iterator, callbackfn);\n}\n"],"mappings":";AACA,OAAO,aAAa;AASb,SAAS,gBAAmB,UAAuB,YAAqD;AAC7G,UAAQ,UAAU,UAAU;AAC9B;","names":[]}
@@ -1 +0,0 @@
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":[]}
@@ -1 +0,0 @@
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":[]}
@@ -1 +0,0 @@
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\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 * @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: Pick<AsyncIterator<T>, 'next'>): Promise<T[]> {\n return toArray(asyncIteratorLike);\n}\n"],"mappings":";AACA,OAAO,aAAa;AASb,SAAS,qBAAwB,mBAAiE;AACvG,SAAO,QAAQ,iBAAiB;AAClC;","names":[]}
@@ -1 +0,0 @@
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":[]}
@@ -1 +0,0 @@
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":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/iteratorReduce.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport reduce from 'core-js-pure/full/iterator/reduce';\n\n/**\n * Calls the specified callback function for all the elements in an iterator. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.\n *\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the iterator.\n *\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an iterator value.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorReduce<T>(\n iterator: Iterator<T>,\n callbackfn: (previousValue: T, currentValue: T, currentIndex: number) => T\n): T;\n\nexport function iteratorReduce<T>(\n iterator: Iterator<T>,\n callbackfn: (previousValue: T, currentValue: T, currentIndex: number) => T,\n initialValue: T\n): T;\n\n/**\n * Calls the specified callback function for all the elements in an iterator. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.\n *\n * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the iterator.\n *\n * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorReduce<T, U>(\n iterator: Iterator<T>,\n callbackfn: (previousValue: U, currentValue: T, currentIndex: number) => U,\n initialValue: U\n): U;\n\nexport function iteratorReduce<T, U = undefined>(\n iterator: Iterator<T>,\n callbackfn: (previousValue: U | undefined, currentValue: T, currentIndex: number) => U,\n initialValue?: U\n): U | undefined {\n return reduce(iterator, callbackfn, initialValue);\n}\n"],"mappings":";AACA,OAAO,YAAY;AAqCZ,SAAS,eACd,UACA,YACA,cACe;AACf,SAAO,OAAO,UAAU,YAAY,YAAY;AAClD;","names":[]}
@@ -1 +0,0 @@
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":[]}
@@ -1 +0,0 @@
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":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/SymbolObservable.ts"],"sourcesContent":["// @ts-expect-error core-js is not typed.\nimport CoreJSSymbolObservable from 'core-js-pure/features/symbol/observable';\n\nconst SymbolObservable: unique symbol = CoreJSSymbolObservable;\n\nexport { SymbolObservable };\n"],"mappings":";AACA,OAAO,4BAA4B;AAEnC,IAAM,mBAAkC;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/iteratorEvery.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport every from 'core-js-pure/full/iterator/every';\n\n/**\n * Determines whether all the members of an iterator satisfy the specified test.\n *\n * @param predicate A function that accepts up to three arguments. The every method calls\n * the predicate function for each element in the iterator until the predicate returns a value\n * which is coercible to the Boolean value false, or until the end of the iterator.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorEvery<T, S extends T>(\n iterator: Iterator<T>,\n predicate: (value: T, index: number) => value is S\n): iterator is Iterator<S>;\n\n/**\n * Determines whether all the members of an iterator satisfy the specified test.\n *\n * @param predicate A function that accepts up to three arguments. The every method calls\n * the predicate function for each element in the iterator until the predicate returns a value\n * which is coercible to the Boolean value false, or until the end of the iterator.\n *\n * @param thisArg An object to which the this keyword can refer in the predicate function.\n * If thisArg is omitted, undefined is used as the this value.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorEvery<T>(iterator: Iterator<T>, predicate: (value: T, index: number) => unknown): boolean;\n\nexport function iteratorEvery<T>(iterator: Iterator<T>, predicate: (value: T, index: number) => unknown): boolean {\n return every(iterator, predicate);\n}\n"],"mappings":";AACA,OAAO,WAAW;AA8BX,SAAS,cAAiB,UAAuB,WAA0D;AAChH,SAAO,MAAM,UAAU,SAAS;AAClC;","names":[]}
@@ -1 +0,0 @@
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":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/iteratorDrop.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport drop from 'core-js-pure/full/iterator/drop';\n\n/**\n * `drop` takes an integer as an argument. It skips the given number of elements produced by the underlying iterator before itself producing any remaining elements.\n *\n * @param limit\n *\n * @return Returns an iterator of items after the limit.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorDrop<T>(iterator: Iterator<T>, limit: number): Iterator<T> {\n return drop(iterator, limit);\n}\n"],"mappings":";AACA,OAAO,UAAU;AAWV,SAAS,aAAgB,UAAuB,OAA4B;AACjF,SAAO,KAAK,UAAU,KAAK;AAC7B;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/iteratorToArray.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport toArray from 'core-js-pure/full/iterator/to-array';\n\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 * @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: Pick<Iterator<T>, 'next'>): T[] {\n return toArray(iteratorLike);\n}\n"],"mappings":";AACA,OAAO,aAAa;AASb,SAAS,gBAAmB,cAA8C;AAC/E,SAAO,QAAQ,YAAY;AAC7B;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/iteratorFilter.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport filter from 'core-js-pure/full/iterator/filter';\n\n/**\n * Returns the elements of an iterator that meet the condition specified in a callback function.\n *\n * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the iterator.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorFilter<T, S extends T>(\n iterator: Iterator<T>,\n predicate: (value: T, index: number) => value is S\n): IterableIterator<S>;\n\n/**\n * Returns the elements of an iterator that meet the condition specified in a callback function.\n *\n * @param predicate A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the iterator.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorFilter<T>(\n iterator: Iterator<T>,\n predicate: (value: T, index: number) => unknown\n): IterableIterator<T>;\n\nexport function iteratorFilter<T, S extends T>(\n iterator: Iterator<T>,\n predicate: (value: T, index: number) => unknown\n): IterableIterator<S> {\n return filter(iterator, predicate);\n}\n"],"mappings":";AACA,OAAO,YAAY;AA0BZ,SAAS,eACd,UACA,WACqB;AACrB,SAAO,OAAO,UAAU,SAAS;AACnC;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/iteratorTake.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport take from 'core-js-pure/full/iterator/take';\n\n/**\n * `take` takes an integer as an argument. It returns an iterator that produces, at most, the given number of elements produced by the underlying iterator.\n *\n * @param limit\n *\n * @return Returns an iterator with items from the original iterator from 0 until the limit.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorTake<T>(iterator: Iterator<T>, limit: number): Iterator<T> {\n return take(iterator, limit);\n}\n"],"mappings":";AACA,OAAO,UAAU;AAWV,SAAS,aAAgB,UAAuB,OAA4B;AACjF,SAAO,KAAK,UAAU,KAAK;AAC7B;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/iteratorFlatMap.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport flatMap from 'core-js-pure/full/iterator/flat-map';\n\n/**\n * `.flatMap` takes a mapping function as an argument. It returns an iterator that produces all elements of the iterators produced by applying the mapping function to the elements produced by the underlying iterator.\n *\n * @param mapperFn\n *\n * @return Returns an iterator of flat values.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorFlatMap<T, U>(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":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/Observable.ts"],"sourcesContent":["// @ts-expect-error core-js is not typed.\nimport CoreJSObservable from 'core-js-pure/full/observable';\n\nimport { SymbolObservable } from './SymbolObservable';\n\nexport interface SubscriptionObserver<T> {\n /** Sends the next value in the sequence */\n next(value: T): void;\n\n /** Sends the sequence error */\n error(errorValue: unknown): void;\n\n /** Sends the completion notification */\n complete(): void;\n\n /** A boolean value indicating whether the subscription is closed */\n get closed(): boolean;\n}\n\nexport interface Subscription {\n /** Cancels the subscription */\n unsubscribe(): void;\n\n /** A boolean value indicating whether the subscription is closed */\n get closed(): boolean;\n}\n\nexport type SubscriberFunction<T> = (observer: SubscriptionObserver<T>) => (() => void) | Subscription | void;\n\nexport type CompleteFunction = () => void;\nexport type ErrorFunction = (errorValue: unknown) => void;\nexport type NextFunction<T> = (value: T) => void;\nexport type StartFunction = (subscription: Subscription) => void;\n\nexport interface Observer<T> {\n /** Receives a completion notification */\n complete?(): void;\n\n /** Receives the sequence error */\n error?(errorValue: unknown): void;\n\n /** Receives the next value in the sequence */\n next?(value: T): void;\n\n /** Receives the subscription object when `subscribe` is called */\n start?(subscription: Subscription): void;\n}\n\nexport class Observable<T> extends CoreJSObservable {\n constructor(subscriber: SubscriberFunction<T>) {\n super(subscriber);\n }\n\n /** Subscribes to the sequence with an observer */\n subscribe(observer: Observer<T>): Subscription;\n\n /** Subscribes to the sequence with callbacks */\n subscribe(\n onNext: NextFunction<T>,\n onError?: ErrorFunction | undefined,\n onComplete?: CompleteFunction | undefined\n ): Subscription;\n\n subscribe(\n observerOrOnNext: Observer<T> | NextFunction<T>,\n onError?: ErrorFunction | undefined,\n onComplete?: CompleteFunction | undefined\n ): Subscription {\n return super.subscribe(observerOrOnNext, onError, onComplete);\n }\n\n /** Returns itself */\n [SymbolObservable](): Observable<T> {\n return this;\n }\n\n /** Converts items to an Observable */\n static of<T>(...items: T[]): Observable<T> {\n return CoreJSObservable.of(...items);\n }\n\n /** Converts an iterable to an Observable */\n static from<T>(iterable: Iterable<T>): Observable<T>;\n\n /** Converts an observable to an Observable */\n static from<T>(observable: Observable<T>): Observable<T>;\n\n static from<T>(iterableOrObservable: Iterable<T> | Observable<T>): Observable<T> {\n return CoreJSObservable.from(iterableOrObservable);\n }\n}\n"],"mappings":";;;;;AACA,OAAO,sBAAsB;AA+CtB,IAAM,aAAN,cAA4B,iBAAiB;AAAA,EAClD,YAAY,YAAmC;AAC7C,UAAM,UAAU;AAAA,EAClB;AAAA,EAYA,UACE,kBACA,SACA,YACc;AACd,WAAO,MAAM,UAAU,kBAAkB,SAAS,UAAU;AAAA,EAC9D;AAAA;AAAA,EAGA,CAAC,gBAAgB,IAAmB;AAClC,WAAO;AAAA,EACT;AAAA;AAAA,EAGA,OAAO,MAAS,OAA2B;AACzC,WAAO,iBAAiB,GAAG,GAAG,KAAK;AAAA,EACrC;AAAA,EAQA,OAAO,KAAQ,sBAAkE;AAC/E,WAAO,iBAAiB,KAAK,oBAAoB;AAAA,EACnD;AACF;","names":[]}
@@ -1 +0,0 @@
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":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/iteratorMap.ts"],"sourcesContent":["// @ts-expect-error core-js-pure is not typed.\nimport map from 'core-js-pure/full/iterator/map';\n\n/**\n * Calls a defined callback function on each element of an array, and returns an array that contains the results.\n *\n * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.\n *\n * @link https://github.com/tc39/proposal-iterator-helpers/blob/main/README.md\n */\nexport function iteratorMap<T, U>(\n iterator: Iterator<T>,\n callbackfn: (value: T, index: number) => U\n): IterableIterator<U> {\n return map(iterator, callbackfn);\n}\n"],"mappings":";AACA,OAAO,SAAS;AAST,SAAS,YACd,UACA,YACqB;AACrB,SAAO,IAAI,UAAU,UAAU;AACjC;","names":[]}