semaphore/routes/_database/utils.js

8 lines
182 B
JavaScript
Raw Normal View History

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