0.0.1 • Published 5 years ago
storagify.js v0.0.1
You don't need to deal with localStorage. Storagify.js automatically save and load localStorage.
How to use
// Storagify(key, defaultVal)
const obj = Storagify('obj', {
a: 1,
b: 2,
c: 3,
});
const arr = Storagify('arr', [1, 2, 3]);
If localStorage has item that has given key, Storagify returns localStorage item. Otherwise Storagify returns given defaultVal;
When you changed obj
or arr
properties, then Storagify saves the changes.
0.0.1
5 years ago