# pouchdb-replicator

> A PouchDB plug-in that simulates CouchDB's replicator database daemon.

Latest version **4.2.0** (published 2019-09-25) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install pouchdb-replicator
pnpm add pouchdb-replicator
yarn add pouchdb-replicator
bun add pouchdb-replicator
```

## 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 | 4.2.0 |
| Published | 2019-09-25 |
| First published | 2014-07-04 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 341.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 981 |
| Author | Marten de Vries |
| Maintainers | commandoline, daleharvey, garrensmith, nolanlawson |
| Keywords | pouch, pouchdb, couch, couchdb, replication, replicator, replicate |

## Links

- npm: https://www.npmjs.com/package/pouchdb-replicator
- Repository: https://github.com/pouchdb/pouchdb-server
- Homepage: https://github.com/pouchdb/pouchdb-server#readme
- Issues: https://github.com/pouchdb/pouchdb-server/issues
- npm.io page: https://npm.io/package/pouchdb-replicator

## Dependencies (8)

- [equals](https://npm.io/package/equals.md) ^1.0.5
- [extend](https://npm.io/package/extend.md) ^3.0.0
- [promise-nodify](https://npm.io/package/promise-nodify.md) ^1.0.2
- [random-uuid-v4](https://npm.io/package/random-uuid-v4.md) 0.0.8
- [pouchdb-promise](https://npm.io/package/pouchdb-promise.md) ^6.4.1
- [pouchdb-system-db](https://npm.io/package/pouchdb-system-db.md) 4.2.0
- [pouchdb-validation](https://npm.io/package/pouchdb-validation.md) 4.2.0
- [pouchdb-plugin-error](https://npm.io/package/pouchdb-plugin-error.md) 4.2.0

## Recent versions

- 4.2.0 (latest) — 2019-09-25
- 5.0.1-rc1.0 (beta) — 2025-08-27
- 4.1.0 — 2018-08-13
- 4.0.1 — 2018-06-05
- 4.0.0 — 2018-01-27
- 2.3.7 — 2017-05-15
- 2.3.6 — 2017-03-03
- 2.3.5 — 2017-03-02
- 2.1.3 — 2016-02-05
- 2.1.2 — 2015-08-18
- 2.1.1 — 2015-01-09
- 2.1.0 — 2014-12-01
- 2.0.0 — 2014-09-10
- 1.0.1 — 2014-09-02
- 1.0.0 — 2014-09-01
- … 2 more at https://npm.io/package/pouchdb-replicator/versions

## README

pouchdb-replicator
==================

A PouchDB plug-in that simulates CouchDB's replicator database daemon. A
browser version is available.

Version 2.0.0 onward uses prefixed replication fields (_replication_state
instead of replication_state). This requires a version of PouchDB in which
[issue 2442](https://github.com/pouchdb/pouchdb/issues/2442) is solved.

API
---

**NodeJS package name:** `pouchdb-replicator`

**Browser object name:** `window.Replicator`

First, make sure you understand the CouchDB replicator database. A good
starting point is [its documentation](http://docs.couchdb.org/en/latest/replication/replicator.html).

### Replicator.startReplicator([callback])

Starts a CouchDB-like replication 'daemon' which listens on the
current database like CouchDB does on the ``_replicator`` database.

This allows you to persist replications past a page refresh, and
provides an alternative api for :js:func:`PouchDB.replicate` and
friends.

### Replicator.stopReplicator([callback])

Stops the 'daemon' that :js:func:`Replicator.startReplicator`
started.

Source
------

PouchDB Server and its sub-packages are distributed as a [monorepo](https://github.com/babel/babel/blob/master/doc/design/monorepo.md).

For a full list of packages, see [the GitHub source](https://github.com/pouchdb/pouchdb-server/tree/master/packages/node_modules).

License
-------

The Apache 2 License. See [the LICENSE file](https://github.com/pouchdb/pouchdb-server/blob/master/LICENSE) for more information.

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