Convert a string/Buffer/Uint8Array to a readable stream
If you target Node.js 12 or later, you can use
$ npm install to-readable-stream
import toReadableStream from 'to-readable-stream'; toReadableStream('🦄🌈').pipe(process.stdout);
string | Buffer | Uint8Array
Value to convert to a stream.
- into-stream - More advanced version of this module
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.