# concat-stream-promise

> concat-stream but with promises

Latest version **0.1.1** (published 2014-07-22) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2014-07-22 |
| First published | 2014-07-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | rschaosid |
| Maintainers | rschaosid |
| Keywords | concatenate, stream, promise |

## Links

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

## Dependencies (1)

- [promise](https://npm.io/package/promise.md) ^5.0.0

## 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

- 0.1.1 (latest) — 2014-07-22
- 0.1.0 — 2014-07-22

## README

concat-stream-promise
=====================

promise version of [concat-stream](https://www.npmjs.org/package/concat-stream).

usage
-----

```js
var concat = require('concat-stream-promise');
var foo = require('fs').createReadStream('foo');

foo.pipe(concat()).then(function(buffer) {
  console.log(buffer.toString('utf8'));
}).done();
```

`concat()` returns a [promise](https://www.npmjs.org/package/promise) that is also a Writable Stream. When the stream ends, the promise is resolved with a buffer.

'encoding' stuff
----------------

Don't write strings to it. It won't encode them; it'll just throw.

options
-------

This space intentionally left blank.

No, seriously, there aren't any.

contributing
------------

This is about as simple as a module can get, but there are some things missing:
* Tests (I got started with [vows](https://www.npmjs.org/package/vows))
* Testing in non-0.10 Node
* A better way of doing multiple inheritance between Promise and Writable: currently we have to use `__proto__`, so it won't work in the browser.

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