ai-from-stream
create an async iterable from a stream
This module convert an instance of readable node Stream into an async iterable.
Usage
Write content of a file in a for loop:
;; const stream = ;for await const chunk of console;
This will output the content of file.txt
file
API
aiFromStream
Create an async iterable from a stream
Parameters
stream
ReadableStream the stream to transform
Returns AsyncIterable converted iterator
Install
With npm installed, run
npm install --save ai-from-stream
See Also
License
MIT