# concat-streams

> Concat streams by piping and pass the specified events through to the end.

Latest version **3.0.0** (published 2016-04-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install concat-streams
pnpm add concat-streams
yarn add concat-streams
bun add concat-streams
```

## 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 | 3.0.0 |
| Published | 2016-04-13 |
| First published | 2016-04-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | DavidCai1993 |
| Maintainers | qqqppp9998 |

## Links

- npm: https://www.npmjs.com/package/concat-streams
- Repository: https://github.com/DavidCai1993/concat-streams
- Homepage: https://github.com/DavidCai1993/concat-streams#readme
- Issues: https://github.com/DavidCai1993/concat-streams/issues
- npm.io page: https://npm.io/package/concat-streams

## Recent versions

- 3.0.0 (latest) — 2016-04-13
- 2.0.0 — 2016-04-12
- 1.0.1 — 2016-04-06
- 1.0.0 — 2016-04-06

## README

# concat-streams
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
[![Build Status](https://travis-ci.org/DavidCai1993/concat-streams.svg?branch=master)](https://travis-ci.org/DavidCai1993/concat-streams)
[![Coverage Status](https://coveralls.io/repos/github/DavidCai1993/concat-streams/badge.svg?branch=master)](https://coveralls.io/github/DavidCai1993/concat-streams?branch=master)

Concat streams by piping and pass the specified events through to the end.

## Installation

```sh
npm install concat-streams
```

## Usage

```js
'use strict'
const concatStream = require('concat-streams')

concatStream([stream1, stream2, stream3], 'error').on('error', console.error)
// Equal to:
// stream1.pipe(stream2)
// stream2.pipe(stream3)
// stream1.on('error', (err) => stream2.emit(err))
// stream2.on('error', (err) => stream3.emit(err))
// stream3.on('error', console.error)
```

## API

### concatStream(streams, event)

  - streams: `Array`<`stream`> an array of streams
  - event: `String` || `Array`<`string`> name of the events you want to pipe through, by default it is `'error'`.

Concat all streams in array by `pipe` and once the `event` occurred in one stream, all streams after will get it. Return the last stream in the array.

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