A minimal local storage wrapper which stores in-memory in case localStorage is not available.
var store = require('store')(); // defaults to prefix "publicclass/store/"
store.set('user', {name: 'bob', id: 1, friends: []}); // = object
store.get('user'); // = object
Create a new Store instance.
Returns the value stored at that key (if any).
Store the value to the corresponding key. And returns the unmodified set value.
note: it stores as json so it won't accept any circular references in objects
Removes the stored key and returns true
or false
depending if it existed.
The current number of keys stored in the instance.