# streamsink

> pipe to a buffer, then create readable streams from it

Latest version **1.2.0** (published 2014-10-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install streamsink
pnpm add streamsink
yarn add streamsink
bun add streamsink
```

## 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.2.0 |
| Published | 2014-10-09 |
| First published | 2014-03-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Andrew Kelley |
| Maintainers | superjoe |

## Links

- npm: https://www.npmjs.com/package/streamsink
- Repository: https://github.com/andrewrk/node-streamsink
- Issues: https://github.com/andrewrk/node-streamsink/issues
- npm.io page: https://npm.io/package/streamsink

## Recent versions

- 1.2.0 (latest) — 2014-10-09
- 1.1.1 — 2014-10-09
- 1.1.0 — 2014-10-09
- 1.0.1 — 2014-03-18
- 1.0.0 — 2014-03-04

## README

# node-streamsink

Pipe a stream to a `StreamSink`, and then you can create a `ReadableStream`,
`String`, or `Buffer` from the `StreamSink`.

## Usage

```js
var StreamSink = require('streamsink');

var sink = new StreamSink();

fs.createReadStream("foo.txt").pipe(sink);
sink.on('finish', function() {
  // sink has now buffered foo.txt
  sink.createReadStream().pipe(someDestination);

  // or use toString([encoding], [start], [end])
  console.log(sink.toString('utf8'));

  // or use toBuffer()
  sink.toBuffer();
});

// you can also create instances from a list of buffers
var sink = StreamSink.fromBufferList([new Buffer("aoeu"), new Buffer("foo")]);
```

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