store-collection
Installation
<script src="store.js"></script>
npm i store-collection
API
import Store from 'store-collection'
const VhStorage = new Store('vhall-')
const Obj = {
a: 1,
b: [1,2,3],
c: {
a: 5,
b: 6
},
d: null,
e: undefined,
f: '',
g: 'string 123',
h: true,
i: false,
j: function () {
console.log(1)
}
}
VhStorage.set(Object.keys(Obj), Object.values(Obj))
VhStorage.set(Object.keys(Obj), Object.values(Obj), true)
VhStorage.get(Object.keys(Obj))
VhStorage.remove(key, isSession)
VhStorage.removeAll()
Store.checkStorage(type)
Store.clearSession()
Store.clearLocal()
Store.clearAll()