0.1.4 • Published 9 years ago

mediatorjs v0.1.4

Weekly downloads
56
License
Apache2
Repository
github
Last release
9 years ago

mediatorjs

Simple mediator pattern written in JS

mediator is a singleton. It is instantiated as soon as you require it and should remain alive as long as your app does. It is derived from marionette's wreqr, but we found a lot of trouble with circular dependencies while it was pre-packaged.

API

var mediator = require('mediatorjs');

// get and set for pseudo dependency injection
mediator.set('hello', 1);
mediator.get('hello'); // results in 1

// trigger
mediator.on('blah', function(data) {});
mediator.trigger('blah', {});
0.1.4

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago