# stream-array

> Pipe an Array through Node.js streams

Latest version **1.1.2** (published 2016-04-30) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2016-04-30 |
| First published | 2013-05-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/stream-array) |
| Module format | CommonJS |
| Node | >= 0.8 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 42 |
| Author | Matthew I. Metnetsky |
| Maintainers | mimetnet |
| Keywords | array, readable, stream, pipe |

## Links

- npm: https://www.npmjs.com/package/stream-array
- Repository: https://github.com/mimetnet/node-stream-array
- Issues: https://github.com/mimetnet/node-stream-array/issues
- npm.io page: https://npm.io/package/stream-array

## Dependencies (1)

- [readable-stream](https://npm.io/package/readable-stream.md) ~2.1.0

## 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

- 1.1.2 (latest) — 2016-04-30
- 1.1.1 — 2015-08-27
- 1.1.0 — 2015-04-19
- 1.0.2 — 2015-04-16
- 1.0.1 — 2014-11-09
- 1.0.0 — 2014-11-02
- 0.1.3 — 2013-08-28
- 0.1.2 — 2013-06-03
- 0.1.1 — 2013-06-03
- 0.1.0 — 2013-05-20

## README

# stream-array

Pipe an Array through Node.js [Streams][12]. This is rather useful for testing
other streams.

[![npm version][1]][2]
[![build status][3]][4]
[![dependencies][5]][6]
[![devDependencies][7]][8]
[![Inch CI][16]][17]

[//]: [![testling][9]][10]


## Usage

```js
var streamify = require('stream-array'),
    os = require('os');

streamify(['1', '2', '3', os.EOL]).pipe(process.stdout);
```


## API

#### streamify(Array)
The result of [require][13] is a 'function()' that when invoked, will return a
[Readable][11] [Stream][12].

```
var streamify = require('stream-array');
```

The source array can contain any type as it is assumed that the receiving
stream can handle it. Each element in the array will be [pushed][14] into the
[piped][15] stream, **without** modifying the source array.

```
var readable = streamify(['Hello', new Buffer('World')]);
```

This [Stream][12] will [push][14] each element of the source array into the
[piped][15] array.

```
readable(['1', '2', '3', os.EOL]).pipe(process.stdout);
```

```
123\n
```

## Install

```sh
npm install stream-array
```

  [1]: https://badge.fury.io/js/stream-array.svg
  [2]: https://badge.fury.io/js/stream-array
  [3]: https://api.travis-ci.org/mimetnet/node-stream-array.svg
  [4]: https://travis-ci.org/mimetnet/node-stream-array
  [5]: https://david-dm.org/mimetnet/node-stream-array.svg
  [6]: https://david-dm.org/mimetnet/node-stream-array
  [7]: https://david-dm.org/mimetnet/node-stream-array/dev-status.svg?#info=devDependencies
  [8]: https://david-dm.org/mimetnet/node-stream-array/#info=devDependencies
  [//]: https://ci.testling.com/mimetnet/node-stream-array.png
  [//]: https://ci.testling.com/mimetnet/node-stream-array
  [11]: http://nodejs.org/api/stream.html#stream_class_stream_readable
  [12]: http://nodejs.org/api/stream.html#stream_stream
  [13]: http://nodejs.org/api/globals.html#globals_require
  [14]: https://nodejs.org/api/stream.html#stream_readable_push_chunk_encoding
  [15]: https://nodejs.org/api/stream.html#stream_readable_pipe_destination_options
  [16]: https://inch-ci.org/github/mimetnet/node-stream-array.svg?branch=master
  [17]: http://inch-ci.org/github/mimetnet/node-stream-array

## License

[MIT License](https://github.com/mimetnet/node-stream-array/blob/master/LICENSE)

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