1.0.0 • Published 4 years ago
ls-shorthand v1.0.0
ls-shorthand
"ls" stands for "localStorage" which is a simple shorthand function for manipulating localStorage API.
Usage
First, install the package:
npm install ls-shorthandThen, import the function and use it as below:
const lS = require("ls-shorthand");
lS(ACTION, KEY, VALUE);ACTIONcan be eitherSET(setItem) orGET(getItem) - RequiredKEYis key parameter of the methods above - RequiredVALUEis value of the key parameter above - Optional (getItem) / Required (setItem)
License
1.0.0
4 years ago