-
Notifications
You must be signed in to change notification settings - Fork 74
Retrieving value which are not set by Lockr #57
Copy link
Copy link
Open
Description
Thanks for this super tiny package that elegantly handles the localStorage 🙂
I can see that Lockr is not designed to retrieve data that are not set by itself. Can we make it to retreive the data that are not set by Lockr with the help of options argument ?
like,
window.localStorage.setItem('nameObj', JSON.stringify({first: 'Gokul', last: 'Kathirvel'}));
Lockr.get('nameObj');
// undefined
Lockr.get('nameObj', null, { processRaw: true });
// {first: 'Gokul', last: 'Kathirvel'}or if the fetched value from storage is not abiding the structure (.data), then we can return the actual fetched value itself like this
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels