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