koel/resources/assets/js/services/ls.js
2016-03-16 11:51:07 +08:00

17 lines
275 B
JavaScript

import ls from 'local-storage';
export default {
get(key, defaultVal = null) {
let val = ls(key);
return val ? val : defaultVal;
},
set(key, val) {
return ls(key, val);
},
remove(key) {
return ls.remove(key);
},
};