# add-stream

> Append the contents of one stream onto another.

Latest version **1.0.0** (published 2014-12-06) · MIT license · 0 weekly downloads

## Install

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

## 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.0 |
| Published | 2014-12-06 |
| First published | 2014-12-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Majid Burney |
| Maintainers | wilsonjackson |
| Keywords | stream, append, add, concat, gulpfriendly |

## Links

- npm: https://www.npmjs.com/package/add-stream
- Repository: https://github.com/wilsonjackson/add-stream
- Issues: https://github.com/wilsonjackson/add-stream/issues
- npm.io page: https://npm.io/package/add-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

- 1.0.0 (latest) — 2014-12-06

## README

# add-stream [![Build Status](https://travis-ci.org/wilsonjackson/add-stream.svg?branch=master)](https://travis-ci.org/wilsonjackson/add-stream)

> Append the contents of one stream onto another.

## Usage

```js
var fs = require('fs');
var es = require('event-stream');
var addStream = require('add-stream');

// Append strings/buffers
fs.createReadStream('1.txt') // 1.txt contains: number1
	.pipe(addStream(fs.createReadStream('2.txt'))) // 2.txt contains: number2
	.pipe(fs.createWriteStream('appended.txt')); // appended.txt contains: number1number2

// Append object streams
es.readArray([1, 2, 3])
	.pipe(addStream.obj(es.readArray([4, 5, 6])))
	.pipe(es.writeArray(function (err, array) {
		console.log(array); // [ 1, 2, 3, 4, 5, 6 ]
	}));
```

## API

### var transformStream = addStream(stream, opts = {})

Create a transform stream that appends the contents of `stream` onto whatever
is piped into it. Options are passed to the transform stream's constructor.

### var transformStream = addStream.obj(stream, opts = {})

A convenient shortcut for `addStream(stream, {objectMode: true})`.

## License

MIT

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