daleharvey/pouchdb — pull request #1071 by garbados (2013-12-02 00:55:06+00:00)
Title: (#838) - added pouch.sync, db.sync, and tests

Addresses https://github.com/daleharvey/pouchdb/issues/838. Use it like this:

db.sync(target, options)

Which is equivalent to:

db.replicate.to(target, options);
db.replicate.from(target, options);

Also works at the global level:

PouchDB.sync(db1, db2, options);

...is equivalent to...

PouchDB.replicate(db1, db2, options);
PouchDB.replicate(db2, db1, options);

What do you think?