Skip to content
This repository has been archived by the owner on Jan 1, 2023. It is now read-only.

Latest commit

 

History

History
33 lines (22 loc) · 659 Bytes

README.md

File metadata and controls

33 lines (22 loc) · 659 Bytes

storage

The storage is a wrapper for the localStorage and sessionStorage global objects.


Usage

For local storage

//Save data
storage.local.set('item', { my :'item' }); // Save data and return { my:'item' }

//Get data
storage.local.get('item'); // return { my:'item' }

//Delete data
storage.local.remove('item'); // Removes and return { my:'item' }

For session storage

//Save data
storage.session.set('item', { my :'item' }); // Save data and return { my:'item' }

//Get data
storage.session.get('item'); // return { my:'item' }

//Delete data
storage.session.remove('item'); // Removes and return { my:'item' }