micro-client-model
v0.1.0
Published
micro model in es6 for client.
Downloads
2
Maintainers
Readme
MicroClientModel
micro model in es6 for client.
Getting Started
$ npm install micro-client-model
import MicroClientModel from 'micro-client-model';
API
- defaults
- set
- get
- dispatchChange
- addChangeListener
- removeChangeListener
Options
let options = {
defaults: {},
localStorage: ture, // bool(default: true)
};
new SomeModel(options);
Example
import MicroClientModel from 'micro-client-model';
class SomeModel extends MicroClientModel {
constructor() {
super({
defaults: { message: 'Hello MicroModel!' },
});
}
}
export default new SomeModel();