ls-shorthand
v1.0.0
Published
A shorthand for localStorage API
Downloads
3
Maintainers
Readme
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 eitherSET
(setItem) orGET
(getItem) - RequiredKEY
is key parameter of the methods above - RequiredVALUE
is value of the key parameter above - Optional (getItem) / Required (setItem)