3 ms·
You should look at `for await ... of`[1]. You can get a streaming reader from a `fetch` response and loop if through an async iterator. If you prefer the functi
by runarberg 8y ago
You should look at `for await ... of`[1]. You can get a streaming reader from a `fetch` response and loop if through an async iterator. If you prefer the functional syntax observables, I'm sure you can find a library that wraps async iterators as observables.
[1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...