# async-concat-stream

> Asynchronous concat-stream. Writable stream that concatenates string or binary data and returns a promise that resolves with the result.

Latest version **1.0.0** (published 2016-01-19) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

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

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2016-01-19 |
| First published | 2016-01-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Sean Genabe |
| Maintainers | s4g6 |
| Keywords | async, promise, stream, buffer |

## Links

- npm: https://www.npmjs.com/package/async-concat-stream
- Repository: https://github.com/seangenabe/async-concat-stream
- Issues: https://github.com/seangenabe/async-concat-stream/issues
- npm.io page: https://npm.io/package/async-concat-stream

## Dependencies (1)

- [concat-stream](https://npm.io/package/concat-stream.md) ^1.5.1

## Alternatives

- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads
- [fa](https://npm.io/package/fa.md) — 185 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2016-01-19

## README

# async-concat-stream

Asynchronous [concat-stream]. Writable stream that concatenates string or binary data and returns a promise that resolves with the result.

[![npm](https://img.shields.io/npm/v/async-concat-stream.svg?style=flat-square)](https://www.npmjs.com/package/async-concat-stream)
[![Build Status](https://img.shields.io/travis/seangenabe/async-concat-stream/master.svg?style=flat-square)](https://travis-ci.org/seangenabe/async-concat-stream)
[![devDependency Status](https://img.shields.io/david/dev/seangenabe/async-concat-stream.svg?style=flat-square)](https://david-dm.org/seangenabe/async-concat-stream#info=devDependencies)
[![node](https://img.shields.io/node/v/async-concat-stream.svg?style=flat-square)](https://nodejs.org/en/download/)

## Usage

```javascript
const concat = require('async-concat-stream')
```

### concat(opts = {})

Creates a writable [concat-stream]. The `promise` property of the returned stream will be resolved when all of the data has been written to the stream.

Parameters:
* `opts` - concat-stream options

Returns: `Writable` - writable stream from concat-stream with `promise` property

Usage:
```javascript
let writable = concat()
readable.pipe(writable)
let data = await writable.promise // via ES7 async
```

### concat.from(readable, opts = {})

Convenience method to read from the specified readable stream. Also handles errors from the readable stream.

Parameters:
* `readable` - `Readable`, The readable stream
* `opts` - concat-stream options
Returns: `Promise` - resolves with the data from concat-stream

Usage:
```javascript
let data = await concat.from(readable) // via ES7 async
```

## Why make this when there are ~2 others?

I like to avoid promise modules and unnecessarily adding stuff to and hybridizing promises.

## License

MIT

[concat-stream]: https://github.com/maxogden/concat-stream

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