A ready to use npm utility for localStorage and sessionStorage
- Install in your project using
npm i webstorage-utilities
get() get the value from the web storage
- @param
key
the key to fetch from the web storage specified by storagetype - @param
expectedType
the type of result expected e.g. string/object/array/boolean etc - @param
storageType
1 - sessionStorage, 0 - localStorage (default 0) - @param
enableLogging
flag for enabling/disabling logging
set set the value in the web storage
- @param
key
the key to set in the web storage specified by storagetype - @param
value
the value be set in the web storage specified by storagetype - @param
storageType
1 - sessionStorage, 0 - localStorage (default 0) - @param
enableLogging
enableLogging flag for enabling/disabling logging
Open a new PR here on GitHub.
- Run
git clone https://github.com/nordible/webStorage-Utilities.git
this project - Run
cd webStorage-Utilities/
to this project - Run
npm run dev
to start the project on local machine
Have a bug or an issue? Open a new issue here on GitHub.
Code licensed under MIT. Everything else is CC
© nordible