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().
npm install pouchdb pouchdb-erase
//index.jsvar PouchDB = ;PouchDB;var db = 'test';db
the only option in
optionsis at the moment batch_size, it determines how much documents are collected before they are removed all at once in one batch.
callbackis optional, as shown in the example a promise interface is also provided.