:hamster: Bloat free and flexible interface for data store and database access.
Store allows now update on data:
store.set({
nickname: 'olivier',
lastname: 'wietrich'
});
and provides path middleware.
Store now support local storage fallback
store.local('mystore'); //reset with localstorage
...
store.local('mystore', true); //save in localstorage
and can be extended through its middleware engine.
store.use(function(obj) {
obj.save = function(){
//save in server
};
});
This version of store allows to work on objects (model) or arrays (collection). It provides basic features such as get, set, del or reset. Store is an emitter and emit change
or delete
events for each of these features.
In the future, Store could be synchronized with localstore or remote database (may be through a middleware engine).