@abarchibody/storage

Storage is plugin that help to store data in the local storage, or retrieve data

Usage no npm install needed!

<script type="module">
  import abarchibodyStorage from 'https://cdn.skypack.dev/@abarchibody/storage';
</script>

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');