0.5.3 • Published 2 years ago
storage-lite v0.5.3
storage-lite Libs
this is a lite storage lib with get Object and time exprise.
it's support all morden browser and support set or get a js object value.
simple use
- save a object value
import Storage from 'storage-lite'
const storage = new Storage('tiny');
const testVal = {say: 'hello world!'}
// set to localstorage
storage.setItem('test', testVal);
// you will save this value
- get a value
import Storage from 'storage-lite'
const storage = new Storage('tiny');
// set to localstorage
const val = storage.getItem('test');
console.log(val);
// => {say: 'hello world!'}
// that's so cool!
- remove a Value