async-get-set-store
v1.0.2
Published
Async get/set/unset API for one object using localStorage
Downloads
1,625
Readme
async-get-set-store
async get/set/unset API for one object using localStorage
Usage
const LocalStorageStore = require('async-get-set-store')
const store = new LocalStorageStore('cache')
// load state
store.cache.get().then(function (state) {})
// set state
store.cache.set({username: 'pat'}).then(function () {})
// clear state
store.cache.unset().then(function () {})