to-readable-stream
TypeScript icon, indicating that this package has built-in type declarations

4.0.0 • Public • Published

to-readable-stream

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

Package Sidebar

Install

npm i to-readable-stream

Weekly Downloads

6,148,460

Version

4.0.0

License

MIT

Unpacked Size

3.51 kB

Total Files

5

Last publish

Collaborators

  • sindresorhus