README
to-readable-stream
Convert a string/Buffer/Uint8Array to a readable stream
If you target Node.js 12 or later, you can use stream.Readable#from()
instead.
Install
$ npm install to-readable-stream
Usage
import toReadableStream from 'to-readable-stream';
toReadableStream('🦄🌈').pipe(process.stdout);
API
toReadableStream(value)
Returns a stream.Readable
.
value
Type: string | Buffer | Uint8Array
Value to convert to a stream.
Related
- into-stream - More advanced version of this module
Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.