pinafore/routes/_database/utils.js
2018-03-10 20:24:07 -08:00

8 lines
182 B
JavaScript

export function deleteAll (store, index, keyRange) {
index.getAllKeys(keyRange).onsuccess = e => {
for (let result of e.target.result) {
store.delete(result)
}
}
}