locache
Simple utility function to get and set data in your localStorage, and sessionStorage
Install
npm install locache
Usage for localStorage cache
;
Set (save) items in localStorage
var tom = name: 'Tom' age: '26' height: 'tall' weight: '74kg' ;
Get items from localStorage
var profile = ;
profile will now equal the following
name: 'Tom' age: '26' height: 'tall' weight: '74kg'
Remove items in localStorage
;
Usage for sessionStorage cache
;
Set (save) items in sessionStorage
var tom = name: 'Tom' age: '26' height: 'tall' weight: '74kg' ;
Get items from sessionStorage
var profile = ;
profile will now equal the following
name: 'Tom' age: '26' height: 'tall' weight: '74kg'
Remove items in sessionStorage
;