Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
api._close = function (callback) {
/* istanbul ignore if */
if (db.isClosed()) {
return callback(pouchdbErrors.createError(pouchdbErrors.NOT_OPEN));
}
db.close(function (err) {
/* istanbul ignore if */
if (err) {
callback(err);
} else {
dbStore.delete(name);
callback();
}
});
};
api._close = function (callback) {
/* istanbul ignore if */
if (db.isClosed()) {
return callback(pouchdbErrors.createError(pouchdbErrors.NOT_OPEN));
}
db.close(function (err) {
/* istanbul ignore if */
if (err) {
callback(err);
} else {
dbStore.delete(name);
callback();
}
});
};