UNPKG

cloudworker-proxy

Version:
21 lines (17 loc) 309 B
/** * Reads a content from given ReadableStream * * @yield {any} * * @api private */ async function* readableStreamIterator(reader) { while (true) { const {done, value} = await reader.read() if (done) { return value } yield value } } module.exports = readableStreamIterator