An advanced JavaScript event emitter for Node.js and the browser. Supports wildcard subscriptions, callbacks and filter chains.
npm install hubjs
Standalone browser packages can be downloaded here.
Or use Browserify to bundle it with your application.
To create a new hub instance, use the exported factory function.
var hub = require('hubjs');
var myEventHub = hub();
The hub
factory function is the only exported variable by the browser
packages:
var myEventHub = hub();