# pull-many

> combine many pull-stream sources into one

Latest version **1.0.9** (published 2019-06-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install pull-many
pnpm add pull-many
yarn add pull-many
bun add pull-many
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.9 |
| Published | 2019-06-15 |
| First published | 2014-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 11.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 13 |
| Author | Dominic Tarr |
| Maintainers | dominictarr |

## Links

- npm: https://www.npmjs.com/package/pull-many
- Repository: https://github.com/dominictarr/pull-many
- Issues: https://github.com/dominictarr/pull-many/issues
- npm.io page: https://npm.io/package/pull-many

## Dependencies (1)

- [pull-stream](https://npm.io/package/pull-stream.md) ^3.4.5

## Recent versions

- 1.0.9 (latest) — 2019-06-15
- 1.0.8 — 2016-10-14
- 1.0.7 — 2016-10-12
- 1.0.6 — 2015-06-15
- 1.0.5 — 2014-09-17
- 1.0.4 — 2014-06-09
- 1.0.3 — 2014-06-04
- 1.0.2 — 2014-06-02
- 1.0.0 — 2014-05-17

## README

# pull-many

Combine many streams into one stream, as they come, while respecting back pressure.

A chunk is read from each stream,
and the next available chunk is
selected in a round-robbin.

If a any stream errors, then all the remaining streams are aborted,
and then the sink is passed the error. If you want instead to drop the
erroring stream, and continue reading from the other streams, you should
pipe each stream through a stream that handles the error(ignores, logs, whatever)
and then ends normally.

## Example

``` js

var pull = require('pull-stream')
var many = require('pull-many')

pull(
  many([
    pull.values([1,2,3]),
    pull.values([1,3,5]),
    pull.values([2,4,6])
  ]),
  pull.collect(function (err, ary) {
    if(err) throw err
    console.log(ary)
    //=> [1, 1, 2, 2, 3, 4, 3, 5, 6]
  })
)

// add streams later too
var m = many()

pull(
  m,
  pull.collect(function (err, ary) {
    if(err) throw err
    console.log(ary)
    //=> [1,2,3,4,5,6]
  })
)

m.add(pull.values([1,2,3]))
m.add(pull.values([4,5,6]))
```

## License

MIT

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