# @strong-roots-capital/stream-array

> Pipe an array through a stream

Latest version **1.0.0** (published 2019-05-14) · ISC license · 0 weekly downloads

## Install

```sh
npm install @strong-roots-capital/stream-array
pnpm add @strong-roots-capital/stream-array
yarn add @strong-roots-capital/stream-array
bun add @strong-roots-capital/stream-array
```

## Health

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

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

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-05-14 |
| First published | 2019-05-14 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 5.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Amchelle Clendenin |
| Maintainers | amchelle, hamroctopus |
| Keywords | stream, array |

## Links

- npm: https://www.npmjs.com/package/@strong-roots-capital/stream-array
- Repository: https://github.com/strong-roots-capital/stream-array
- Issues: https://github.com/strong-roots-capital/stream-array/issues
- npm.io page: https://npm.io/package/@strong-roots-capital/stream-array

## Dependencies (3)

- [ow](https://npm.io/package/ow.md) ^0.13.1
- [readable-stream](https://npm.io/package/readable-stream.md) ^3.3.0
- [@types/readable-stream](https://npm.io/package/@types/readable-stream.md) ^2.3.1

## 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.0.0 (latest) — 2019-05-14

## README

# stream-array [![Build status](https://travis-ci.org/strong-roots-capital/stream-array.svg?branch=master)](https://travis-ci.org/strong-roots-capital/stream-array) [![npm version](https://img.shields.io/npm/v/@strong-roots-capital/stream-array.svg)](https://npmjs.org/package/@strong-roots-capital/stream-array) [![codecov](https://codecov.io/gh/strong-roots-capital/stream-array/branch/master/graph/badge.svg)](https://codecov.io/gh/strong-roots-capital/stream-array)

> Pipe an array through a stream

## Install

```shell
npm install @strong-roots-capital/stream-array
```

## Use

```typescript
import streamArray from '@strong-roots-capital/stream-array'
import { Writable } from 'readable-stream'

const array = [0, 1, 2, 3, 4, 5]

const sink = new Writable({
    objectMode: true,
    write(chunk: number, _: string, callback: (error?: Error | null) => void) {
        console.log(chunk)
        callback()
    }
})

sink.on('finish', () => console.log('fin'))
streamArray(array).pipe(sink)
//=>0
//=>1
//=>2
//=>3
//=>4
//=>5
//=>fin
```

Note that `objectMode` is `true`.

## Related

- [node-stream-array](https://github.com/mimetnet/node-stream-array)

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