# to-readable-stream

> Convert a value to a ReadableStream

Latest version **4.0.0** (published 2022-10-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install to-readable-stream
pnpm add to-readable-stream
yarn add to-readable-stream
bun add to-readable-stream
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.0 |
| Published | 2022-10-26 |
| First published | 2018-05-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=18 |
| Dependencies | 0 |
| Unpacked size | 3.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | stream, readablestream, string, buffer, uint8array, from, into, to, transform, convert, readable, pull |

## Links

- npm: https://www.npmjs.com/package/to-readable-stream
- Repository: https://github.com/sindresorhus/to-readable-stream
- Homepage: https://github.com/sindresorhus/to-readable-stream#readme
- Issues: https://github.com/sindresorhus/to-readable-stream/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/to-readable-stream

## Alternatives

- [byte-size](https://npm.io/package/byte-size.md) — 2.1M weekly downloads
- [speed-limiter](https://npm.io/package/speed-limiter.md) — 16.0K weekly downloads
- [@powersync/node](https://npm.io/package/@powersync/node.md) — 10.9K weekly downloads
- [@ledgerhq/coin-cardano](https://npm.io/package/@ledgerhq/coin-cardano.md) — 1.0K weekly downloads
- [@jayesol/jayeson.lib.streamfinder](https://npm.io/package/@jayesol/jayeson.lib.streamfinder.md) — 1.0K weekly downloads

## Recent versions

- 4.0.0 (latest) — 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

## README

# to-readable-stream

> Convert a value to a [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream)

Not to be confused with [Node.js `stream.Readable`](https://nodejs.org/api/stream.html#stream_class_stream_readable), in which case, [`stream.Readable#from()`](https://nodejs.org/api/stream.html#stream_stream_readable_from_iterable_options) should be used instead.

## Install

```sh
npm install to-readable-stream
```

## Usage

```js
import toReadableStream from 'to-readable-stream';

toReadableStream('🦄🌈');
//=> ReadableStream<'🦄🌈'>
```

## API

### toReadableStream(value)

Returns a [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream).

#### value

The value to convert to a stream.

## Related

- [into-stream](https://github.com/sindresorhus/into-stream) - More advanced version of this package
- [get-stream](https://github.com/sindresorhus/get-stream) - The opposite of this package

---
_Source: https://npm.io/package/to-readable-stream · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
