to-readable-stream
October 26, 2022 ยท View on GitHub
Convert a value to a
ReadableStream
Not to be confused with Node.js stream.Readable, in which case, stream.Readable#from() should be used instead.
Install
npm install to-readable-stream
Usage
import toReadableStream from 'to-readable-stream';
toReadableStream('๐ฆ๐');
//=> ReadableStream<'๐ฆ๐'>
API
toReadableStream(value)
Returns a ReadableStream.
value
The value to convert to a stream.
Related
- into-stream - More advanced version of this package
- get-stream - The opposite of this package