-
-
Notifications
You must be signed in to change notification settings - Fork 668
Dexie.exists()
David Fahlander edited this page Sep 22, 2015
·
10 revisions
db.exists(dnName)
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