Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pouchdb-erase

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pouchdb-erase

A replicating db.destroy() alternative for PouchDB

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

pouchdb-erase

Build Status Dependency Status devDependency Status

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.js
var PouchDB = require('pouchdb');
PouchDB.plugin(require('pouchdb-erase'));

var db = new PouchDB('test');
db.erase().then(function (resp) {
	console.log(resp) //{ok: true}
})

Browser usage

<script src='dist/pouchdb-erase.min.js'></script>
<script>
  PouchDB.plugin(Erase);

  new PouchDB('test').erase();
</script>

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.

Keywords

FAQs

Package last updated on 10 May 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc