-
-
Notifications
You must be signed in to change notification settings - Fork 641
Dexie.delete()
Christopher Hunt edited this page Dec 6, 2016
·
3 revisions
db.delete();
// Static method
Dexie.delete('database_name');
Deletes the database and calls the then()
method of the returned Promise when done. If the database does not exist (db.open()
was never called) this method will also succeed.
db.delete().then(() => {
console.log("Database successfully deleted");
}).catch((err) => {
console.error("Could not delete database");
}).finally(() => {
// Do what should be done next...
});
Dexie.js - minimalistic and bullet proof indexedDB library