Skip to content

xameeramir/webStorage-Utilities

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A ready to use npm utility for localStorage and sessionStorage

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published