1.0.0 • Published 4 years ago

ls-shorthand v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

ls-shorthand

"ls" stands for "localStorage" which is a simple shorthand function for manipulating localStorage API.

Usage

First, install the package:

npm install ls-shorthand

Then, import the function and use it as below:

const lS = require("ls-shorthand");

lS(ACTION, KEY, VALUE);
  • ACTION can be either SET (setItem) or GET (getItem) - Required
  • KEY is key parameter of the methods above - Required
  • VALUE is value of the key parameter above - Optional (getItem) / Required (setItem)

License

MIT