# pouch-stream

> Experimental streaming version of PouchDB

Latest version **0.4.1** (published 2015-03-30) · MIT license · 0 weekly downloads

## Install

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

## 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.4.1 |
| Published | 2015-03-30 |
| First published | 2014-04-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 21 |
| Author | Calvin Metcalf |
| Maintainers | cwmma |
| Keywords | pouch, stream, couch, db |

## Links

- npm: https://www.npmjs.com/package/pouch-stream
- Repository: git@github.com:calvinmetcalf/PouchStream
- Homepage: https://github.com/calvinmetcalf/PouchStream
- Issues: https://github.com/calvinmetcalf/PouchStream/issues
- npm.io page: https://npm.io/package/pouch-stream

## Dependencies (2)

- [inherits](https://npm.io/package/inherits.md) ^2.0.1
- [readable-stream](https://npm.io/package/readable-stream.md) ^1.0.27-1

## Alternatives

- [angular-pipes](https://npm.io/package/angular-pipes.md) — 5.6K weekly downloads
- [@ng-web-apis/midi](https://npm.io/package/@ng-web-apis/midi.md) — 2.6K weekly downloads
- [happn-3](https://npm.io/package/happn-3.md) — 1.6K weekly downloads
- [@opensip-cli/lang-go](https://npm.io/package/@opensip-cli/lang-go.md) — 1.2K weekly downloads
- [mongoose-typescript](https://npm.io/package/mongoose-typescript.md) — 85 weekly downloads

## Recent versions

- 0.4.1 (latest) — 2015-03-30
- 0.4.0 — 2014-08-20
- 0.3.1 — 2014-06-18
- 0.3.0 — 2014-05-02
- 0.2.0 — 2014-05-02
- 0.1.1 — 2014-04-25

## README

Pouch Stream
====

Streaming plugin for PouchDB

```bash
npm install pouch-stream
```

```js
PouchDB.plugin(require('pouch-stream'));
```

Writable
---

note: the docs you give it can have _ids's or not and it will do post or put depending, you can also pass an array for bulk docs, it also takes an option object which will be passed verbatem to bulkDocs, put, or post.

```js
var stream = db.createWriteStream();
stream.write({
  foo: 'bar',
  _id: 'testDoc'
}, function () {
  // chunk is flushed
});
```

but wait there is more, the database itself is a write streem though you can't close it, you can do


```js
var random = require("random-document-stream");
random(100).pipe(db);
```

Readable
---

```js
var db = new PouchDB('foo');
var stream = db.createReadStream();
stream.on('data', function (d) {
  // deal with data
});
```

you can also set `since` 

var stream = db.createReadStream({since:19});
stream.on('data', function (d) {
  // deal with data after seq 19
});

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