abe-utils

0.1.0 • Public • Published

abe-utils

A collection of reusable class I'm going to use in my own projects

Mediator/Party

A simple version of the mediator design pattern. The mediator mediates messages between Parties.

Example

class Controller extends Party {
  ...

  tellUser () {
    this.broadcast('MESSAGE_SENT', { message: 'Hello, world!' });
  }

  ...
}

class View extends Party {
  constructor () {
    this.on('MESSAGE_SENT', alert(message));
  }

  ...
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.0
    1
  • 0.0.1
    0

Package Sidebar

Install

npm i abe-utils

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • abejfehr