Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (i === -1) {
throw new Error("Not an authentication database.");
}
utils.dbData.dbs.splice(i, 1);
var info = utils.dbData.dataByDBIdx.splice(i, 1)[0];
for (var name in api) {
/* istanbul ignore else */
if (api.hasOwnProperty(name)) {
delete db[name];
}
}
if (!info.isOnlineAuthDB) {
systemDB.uninstallSystemDBProtection(db);
wrappers.uninstallWrapperMethods(db, writeWrappers);
}
Validation.uninstallValidationMethods.call(db);
};