mirror of
https://github.com/koel/koel
synced 2024-12-30 14:33:06 +00:00
18 lines
275 B
JavaScript
18 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);
|
||
|
},
|
||
|
};
|