Skip to content

Commit 4048b62

Browse files
committed
Add remove function
1 parent 8f762a5 commit 4048b62

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/js/ConfigStorage.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,11 @@ const ConfigStorage = {
3737
tmpObj[element] = input[element];
3838
window.localStorage.setItem(element, JSON.stringify(tmpObj));
3939
});
40+
},
41+
remove: function(item, callback) {
42+
window.localStorage.removeItem(item);
43+
if (callback) {
44+
callback();
45+
}
4046
}
4147
};

0 commit comments

Comments
 (0)