mirror of
https://github.com/koel/koel
synced 2024-12-25 03:53:05 +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);
|
||
|
},
|
||
|
};
|