jwallet-web-storage
Web Storage (API) polyfill. Using following storages in order of priority: localStorage -> cookie -> memory
Get Started
npm install jwallet-web-storage
const storage =
API
The (Web Storage API)[https://html.spec.whatwg.org/multipage/webstorage.html] provides mechanisms by which browsers can store key/value pairs.
setItem(key, value)
Adds key
to the storage, or updates that key
's value
if it already exists.
Examples
storage const objectStorageValue = foo: 'bar' storage
getItem(key)
Returns that key
's value.
Examples
storage //> Value JSON //> { foo: 'bar' }
removeItem(key)
Removes key
from the storage.
storagestorage