A non-currying variant of withStreamAdapter. Takes a ReadableStream as an input and returns an async iterable that generates values from the stream.
An AsyncIterable of T generated from the ReadableStream.
const stream = new ReadableStream({ start(controller) { controller.enqueue('Hello'); controller.close(); },});const streamIterable = streamAdapter<string>(stream);(async () => { for await (const value of streamIterable) { console.log(value); // Logs "Hello" }})();
The type of data contained in the ReadableStream.
The ReadableStream to adapt into an async iterable.
Generated using TypeDoc
A non-currying variant of withStreamAdapter. Takes a ReadableStream as an input and returns an async iterable that generates values from the stream.
Returns
An AsyncIterable of T generated from the ReadableStream.
Example