Skip to content
A ready to use npm utility for localStorage and sessionStorage
HTML TypeScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode
src
.gitignore
README.md
index.html
package.json
tsconfig.json
tslint.json

README.md

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

You can’t perform that action at this time.