Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function clearBranch(branch) {
- if (typeof branch === 'undefined' || branch === null)
- branch = '';
- branch = String(branch);
- var options = {
- onEnd: function() {
- console.log('branch "' + branch + '" cleared');
- },
- writeAccess: true
- };
- if (branch !== '') {
- options.keyRange = idbStore.makeKeyRange({
- lower: branch + '.', // charCode 46
- upper: branch + '/', // charCode 47
- excludeUpper: true
- });
- }
- idbStore.iterate(function(item, cursor) {
- cursor.delete();
- }, options);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement