EventBusJS

Simple but powerful event bus written in ES2015

#EventBusJS > Simple but powerful event bus written in ES2015

npm version Build Status NPM Status devDependency Status

##Installation The recommended and the most suitable way to install is through NPM.

$ npm install --save lin3s-event-bus

Also, you can install through Bower.

$ bower install --save lin3s-event-bus

##Usage

// app.js

import { EventPublisher, DOMReadyEvent } from 'lin3s-event-bus';

(() => {

  document.addEventListener('DOMContentLoaded', () => {
    EventPublisher.publish(
      new DOMReadyEvent()
    );
  });

})();
// your-dom-js-file.js

import { EventPublisher, DOMReadyEventSubscriber } from 'lin3s-event-bus';

function onReady(anEvent) {
    console.log('DOM is ready!');
}

const init = () => {
  EventPublisher.subscribe(
    new DOMReadyEventSubscriber(
      onReady
    )
  );
};

export default init();

##Licensing Options License

Related Repositories

EventBusJS

EventBusJS

Simple but powerful event bus written in ES2015 ...