by wefarrell · 4y ago · 0 comments
const result = await asyncIterator.map(doSomethingAsync).reduce(asyncAggregatorFn)
Without ever having to load all of your data into memory.https://github.com/ReactiveX/IxJS
RxJS is for observables. IxJS is for iterables. Or, a bit more accurately, as explained in the readme:
IxJS unifies both synchronous and asynchronous pull-based collections, just as RxJS unified the world of push-based collections. RxJS is great for event-based workflows where the data can be pushed at the rate of the producer, however, IxJS is great at I/O operations where you as the consumer can pull the data when you are ready.- https://github.com/preludejs/async-generator
- https://github.com/preludejs/generator
...and example usage https://observablehq.com/@mirek/project-euler