deleter.js
function (options, callback) {
  var Deleter = {}
  // Delete all docs with the IDs found in deleteBatch
  Deleter.deleteBatch = function (deleteBatch, APICallback) {
    tryDeleteBatch(options, deleteBatch, function (err) {
      return APICallback(err)
    })
  }
  // Flush the db (delete all entries)
  Deleter.flush = function (APICallback) {
    flush(options, function (err) {
      return APICallback(err)
    })
  }
  return callback(null, Deleter)
}
function (options, callback) {
  var Deleter = {}
  // Delete all docs with the IDs found in deleteBatch
  Deleter.deleteBatch = function (deleteBatch, APICallback) {
    tryDeleteBatch(options, deleteBatch, function (err) {
      return APICallback(err)
    })
  }
  // Flush the db (delete all entries)
  Deleter.flush = function (APICallback) {
    flush(options, function (err) {
      return APICallback(err)
    })
  }
  return callback(null, Deleter)
}
function ( options , callback ) { var Deleter = { } // Delete all docs with the IDs found in deleteBatch Deleter . deleteBatch = function ( deleteBatch , APICallback ) { tryDeleteBatch ( options , deleteBatch , function ( err ) { return APICallback ( err ) } ) } // Flush the db (delete all entries) Deleter . flush = function ( APICallback ) { flush ( options , function ( err ) { return APICallback ( err ) } ) } return callback ( null , Deleter ) }
Define API calls
Define API calls