mirror of
https://github.com/koel/koel
synced 2025-01-08 02:38:45 +00:00
17 lines
275 B
JavaScript
17 lines
275 B
JavaScript
import localStore from 'local-storage'
|
|
|
|
export const ls = {
|
|
get (key, defaultVal = null) {
|
|
const val = localStore(key)
|
|
|
|
return val || defaultVal
|
|
},
|
|
|
|
set (key, val) {
|
|
return localStore(key, val)
|
|
},
|
|
|
|
remove (key) {
|
|
return localStore.remove(key)
|
|
}
|
|
}
|