koel/resources/assets/js/services/ls.js
2015-12-13 12:42:28 +08:00

17 lines
275 B
JavaScript

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