Skip to content
This repository was archived by the owner on Jul 29, 2021. It is now read-only.

Commit f516847

Browse files
Fix PouchDB.destroy(), again. 1.3.6
1 parent 84e55a3 commit f516847

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

index.js

+7
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ exports.installStaticWrapperMethods = function (PouchDB, handlers) {
2424
PouchDB.new = PouchDB.new || function (name, options, callback) {
2525
return new PouchDB(name, options, callback);
2626
};
27+
PouchDB.destroy = PouchDB.destroy || function (name, options, callback) {
28+
var args = parseBaseArgs(PouchDB, this, options, callback);
29+
var db = new PouchDB(name, args.options);
30+
var promise = db.destroy();
31+
nodify(promise, args.callback);
32+
return promise;
33+
};
2734

2835
installWrappers(PouchDB, handlers, exports.createStaticWrapperMethod);
2936
};

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pouchdb-wrappers",
3-
"version": "1.3.5",
3+
"version": "1.3.6",
44
"main": "index.js",
55
"description": "Makes wrapping PouchDB functions a lot easier.",
66
"repository": "pouchdb/pouchdb-wrappers",

0 commit comments

Comments
 (0)