mediator-module

0.0.5 • Public • Published

mediator-module NPM version Build Status Dependency Status Coverage percentage

mediator module

Install

$ npm install --save mediator-module

Usage

var MediatorModule = require('mediator-module');

class FirstMediatorModule extends MediatorModule {
  constructor () {
    super();
    this.mediator.subscribe('test', this.aTestFunction);
  }

  *aTestFunction () {
    console.log('a func called');
  }
}

class SecondMediatorModule extends MediatorModule {
  constructor () {
    super();
  }

  testPublish () {
    this.mediator.publish('test');
  }
}

License

MIT © PAIO co.,ltd.

Readme

Keywords

Package Sidebar

Install

npm i mediator-module

Weekly Downloads

0

Version

0.0.5

License

MIT

Last publish

Collaborators

  • paio