Takes an async iterator and turns it into a browser readable stream
npm install it-to-browser-readablestream

> Takes an async iterator and turns it into a browser readable stream
Turns an (async)iterable into a W3C ReadbleStream.
``javascript
import toBrowserReadableStream from 'it-to-browser-readablestream'
// This can also be an iterator, async iterator, generator, etc
const values = [Buffer.from([0, 1]), Buffer.from([2, 3])]
const stream = await toBrowserReadableStream(values)
for await (const buf of stream) {
console.info(buf) // Buffer[0, 1]
}
`
`console`
$ npm i it-to-browser-readablestream
-
Licensed under either of
- Apache 2.0, (LICENSE-APACHE /
- MIT (LICENSE-MIT /
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.