0.1.1 • Published 4 years ago
json-storage-factory v0.1.1
json-storage-factory
Usage
import jsonStorageFactory from 'json-storage-factory'
const storage = jsonStorageFactory(() => localStorage)
function save(id, user) {
storage.setItem(id, user)
}
function load(id) {
storage.getItem(id)
}
function remove(id) {
storage.removeItem(id)
}