3 ms·
Here is 90% of all the wrapping you'll ever need over localStorage: function ls_get(k) { JSON.parse(localStorage.getItem(k)) } function ls
by capableweb 4y ago
Here is 90% of all the wrapping you'll ever need over localStorage:
function ls_get(k) {
JSON.parse(localStorage.getItem(k))
}
function ls_set(k, v) {
localStorage.setItem(k, JSON.stringify(v))
}