@abarchibody/cookie
v1.0.0
Published
Cookie is plugin that help to store data in the browser cookie, or retrieve data
Downloads
3
Maintainers
Readme
cookie is used to read, write to the localstorage.
to install
##$ npm i @abarchibody/cookie
Usage
const data = [1, 2, 3, 4]
import cookie from '@abarchibody/cookie'
Write to localstorage
cookie.set('data', data);
Read to localstorage
const myData = cookie.get('data')
console.log(myData)
// [1, 2, 3, 4]
Delete data to localstorage
cookie.remove('data');