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();
hub factory function is the only exported variable by the browser
var myEventHub = hub();