-
-
Notifications
You must be signed in to change notification settings - Fork 668
Dexie.exists()
David Fahlander edited this page Apr 4, 2016
·
10 revisions
Since v1.2
Dexie.exists(dbName)
Checks whether a database with the given name exists or not. Returns a Promise that resolves with true or false.
Dexie.exists("myDatabase")
.then(function(exists) {
if (exists)
console.log("Database exists");
else
console.log("Database doesnt exist");
}).catch(function (error) {
console.error("Oops, an error occurred when trying to check database existance");
});
Dexie.js - minimalistic and bullet proof indexedDB library