Dexie.delete()

Syntax

db.delete();
// Static method
Dexie.delete('database_name');

Return Value

Promise

Description

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.

Sample

db.delete().then(() => {
    console.log("Database successfully deleted");
}).catch((err) => {
    console.error("Could not delete database");
}).finally(() => {
    // Do what should be done next...
});

Table of Contents