Created
March 10, 2018 15:13
-
-
Save jloscos/2e34ddb82072b12b4d71c0ed619328b9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function initDB(db: IDBDatabase) { | |
if (!db.objectStoreNames.contains("blog")) { | |
const store = db.createObjectStore("blog", { keyPath: "title" }); | |
store.createIndex("AuthorIndex", "author", { unique: false }); | |
store.createIndex("PublishDateIndex", "publishDate", { unique: false }); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment