Fork hub.js on GitHub

An advanced JavaScript event emitter for Node.js and the browser. Supports wildcard subscriptions, callbacks and filter chains.

Install for Node with npm

npm install hubjs

Download for browsers

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();