@docomodigital/js-storage
v3.0.3
Published
Storage is the library to save and get data in different ways.
Downloads
25
Readme
js-storage
Storage is the library to save and get data in different ways.
Usage
import Storage from '@docomodigital/js-storage';
// Set an item in the storage
Storage.set('locale', 'en');
// Get a previously setted item from the storage
Storage.get('locale'); // 'en'
// Delete an item from the storage if present
Storage.delete('locale');
// Switch to another Storage (window.localStorage), default is cookie
Storage.setStorage('localstorage');Installation
NPM
npm install --save @docomodigital/js-storageDocumentation
To read documentation, go to:
