# into-stream

> Convert a string/promise/array/iterable/asynciterable/buffer/typedarray/arraybuffer/object into a stream

Latest version **9.1.0** (published 2026-02-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install into-stream
pnpm add into-stream
yarn add into-stream
bun add into-stream
```

## Health

**Score 60/100 (C)** — status: stable.

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

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 9.1.0 |
| Published | 2026-02-02 |
| First published | 2015-05-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=20 |
| Dependencies | 0 |
| Unpacked size | 6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 212 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | stream, buffer, string, object, array, iterable, async, asynciterable, promise, promises, from, into, to, transform, convert, readable, pull, gulpfriendly, value |

## Links

- npm: https://www.npmjs.com/package/into-stream
- Repository: https://github.com/sindresorhus/into-stream
- Homepage: https://github.com/sindresorhus/into-stream#readme
- Issues: https://github.com/sindresorhus/into-stream/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/into-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

- 9.1.0 (latest) — 2026-02-02
- 9.0.0 — 2025-09-09
- 8.0.1 — 2023-11-25
- 8.0.0 — 2023-05-26
- 7.0.0 — 2021-04-16
- 6.0.0 — 2020-08-13
- 5.1.1 — 2019-10-04
- 5.1.0 — 2019-04-05
- 5.0.0 — 2019-03-11
- 4.0.0 — 2018-10-12
- 3.1.0 — 2016-11-29
- 3.0.0 — 2016-08-27
- 2.0.1 — 2016-04-28
- 2.0.0 — 2015-06-27
- 1.0.0 — 2015-05-29

## README

# into-stream

> Convert a string/promise/array/iterable/asynciterable/uint8array/typedarray/arraybuffer/readablestream/object into a stream

Correctly handles backpressure.

## Install

```sh
npm install into-stream
```

## Usage

```js
import intoStream from 'into-stream';

intoStream('unicorn').pipe(process.stdout);
//=> 'unicorn'
```

## API

### intoStream(input)

Type: `Uint8Array | TypedArray | ArrayBuffer | string | Iterable<string | Uint8Array | TypedArray> | AsyncIterable<string | Uint8Array | TypedArray> | ReadableStream | Promise`\
Returns: [Readable stream](https://nodejs.org/api/stream.html#class-streamreadable)

### intoStream.object(input)

Type: `object | Iterable<object> | AsyncIterable<object> | Promise`\
Returns: [Readable object stream](https://nodejs.org/api/stream.html#object-mode)

## Limitations

The streams returned by this package cannot be used with the `stdio` option of Node.js [`child_process`](https://nodejs.org/api/child_process.html) methods. Use [`fs.createReadStream()`](https://nodejs.org/api/fs.html#fscreatereadstreampath-options) instead.

## Related

- [to-readable-stream](https://github.com/sindresorhus/to-readable-stream) - Simpler version of this package
- [get-stream](https://github.com/sindresorhus/get-stream) - The opposite of this package

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