koel/resources/assets/js/services/ls.js
2016-03-28 21:38:14 +08:00

17 lines
277 B
JavaScript

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