Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

pouchdb-replicator

pouchdb9.4kApache-2.04.2.0

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

pouch, pouchdb, couch, couchdb, replication, replicator, replicate

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 (replicationstate instead of replication_state). This requires a version of PouchDB in which issue 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.

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.

For a full list of packages, see the GitHub source.

License

The Apache 2 License. See the LICENSE file for more information.