pouchdb-erase
A replicating db.destroy() alternative for PouchDB. Works by iterating over all documents in the database and deleting them. Uses batches and changes() internally. It's a drop-in replacement for db.destroy().
Example
npm install pouchdb pouchdb-erase
//index.jsvar PouchDB = ;PouchDB; var db = 'test';db
Browser usage
API
-
db.erase([options[, callback]])
the only option in
options
is at the moment batch_size, it determines how much documents are collected before they are removed all at once in one batch.callback
is optional, as shown in the example a promise interface is also provided.