1.0.13 • Published 2 years ago
vd-local-storage-object v1.0.13
vd-local-storage-object
Javascript module for handling local storage data as javascript object.
How to use
import LS from 'vd-local-storage-object';
then just instantiate the module:
LS.init('your-unique-localstorage-name');
Methods:
// set new value
LS.set({key: 'value'});
// clear data
LS.clear();
// access data. LS.data is object containing the data set in the local storage
let a = LS.data.key ;
// returns 'value'
You can use nested objects and access it as a normal js object.
Happy coding...