1.0.12 • Published 4 years ago
webstorage-utilities v1.0.12
A ready to use npm utility for localStorage and sessionStorage
Installation
Install in your project using
npm i webstorage-utilities
Available functions / API
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
Contributions welcome!
Open a new PR here on GitHub.
Run locally
- 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
Bugs and Issues
Have a bug or an issue? Open a new issue here on GitHub.
License
Code licensed under MIT. Everything else is CC
Follow us
© nordible