micro-client-model

0.1.0 • Public • Published

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();

/micro-client-model/

    Package Sidebar

    Install

    npm i micro-client-model

    Weekly Downloads

    2

    Version

    0.1.0

    License

    MIT

    Last publish

    Collaborators

    • khirayama