Skip to content

Instantly share code, notes, and snippets.

@marcusbesjes marcusbesjes/hub.js
Created May 8, 2014

Embed
What would you like to do?
var Hub = module.exports = function(options) {
this.options = options;
this.view.init(this);
};
require('./view');
require('./log');
var Hub = require('./hub');
var hub = new Hub({
logging: true
});
hub.log()
var Hub = require('./hub');
Hub.prototype.log = function() {
console.log('I am a Hub!\n', this);
};
var Hub = require('./hub');
Hub.prototype.view = {
init: function(H) {
H.view = {
id: Math.random()
};
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.