1.1.1 • Published 4 years ago
local-utils v1.1.1
local-utils
A simple, lightweight package for handling localstorage.
Installation
NPM
$ npm i local-utilsHow to import
import {setLocal, getLocal, deleteLocal, deleteLocalArrayElement, clearLocal} from "local-utils"How to use
Set an item in localstorage
setLocal(key, value)Get an item from localstorage
getLocal(key)Delete any key value from the localstorage
deleteLocal(key)Delete a perticular index value from localstorage key value
- Note: only applicable if the value is an Array.
deleteLocalArrayElement(key, index)Delete all the key value from the localstorage.
clearLocal()