1.1.1 • Published 2 years ago
local-utils v1.1.1
local-utils
A simple, lightweight package for handling localstorage.
Installation
NPM
$ npm i local-utils
How 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()