to-readable-stream

Convert a value to a ReadableStream

MIT 5 个版本
安装
npm install to-readable-stream
yarn add to-readable-stream
pnpm add to-readable-stream
bun add to-readable-stream
README

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.

版本列表
4.0.0 2022-10-26
3.0.0 2021-04-22
2.1.0 2019-04-05
2.0.0 2019-03-11
1.0.0 2018-05-01