Skip to content
 
 

Repository files navigation

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


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.

About

Convert a string/Buffer/Uint8Array to a readable stream

Resources

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages