@meniga/storage
Storage is a utility library for saving information in local and session storage and uses the store2 library.
The default store used is Storage.session, but you can specify to use Session.local by default if you prefer.
The getItem, setItem, removeItem and clearStorage methods work with the store set as default, while getLocalItem and getSessionItem (et al) work on specific stores.
Exports
Storage
The Storage object contains the following methods:
- setDefaultStore ()
- useLocalStorageByDefault ()
- useSessionStorageByDefault ()
- getItem ( key )
- getLocalItem ( key )
- getSessionItem ( key )
- setItem ( key, value )
- setLocalItem ( key, value )
- setSessionItem ( key, value )
- removeItem ( key )
- removeLocalItem ( key )
- removeSessionItem ( key )
- broadCastClearStorage ()
- clearStorage ()
- clearLocalStorage ()
- clearSessionStorage ()