RubenVerborgh / AsyncIterator

An asynchronous iterator library for advanced object pipelines in JavaScript
https://rubenverborgh.github.io/AsyncIterator/docs/
Other
48 stars 7 forks source link

Allow wrapping arrays with options #91

Closed RubenVerborgh closed 2 years ago

RubenVerborgh commented 2 years ago

Fixes https://github.com/RubenVerborgh/AsyncIterator/issues/88

jacoscaz commented 2 years ago

Yup, +1 from me!

jeswr commented 2 years ago

@RubenVerborgh - I also think w need to be closing the wrapping iterator here https://github.com/RubenVerborgh/AsyncIterator/blob/915a85734824809cc65b189d3e095c590da1334b/asynciterator.ts#L2031 (otherwise the iterator is permanently open if the promise rejects).

RubenVerborgh commented 2 years ago

@jeswr We probably need a better strategy around error. At the moment, I consider an iterator that has emitted an error as unpredictable and unusable. Perhaps we need a separated errored state. I'd leave that as a todo in https://github.com/RubenVerborgh/AsyncIterator/issues/92

RubenVerborgh commented 2 years ago

Thank you!