Skip to content

Instantly share code, notes, and snippets.

@ncb000gt
Created September 15, 2010 15:17
Show Gist options
  • Save ncb000gt/580873 to your computer and use it in GitHub Desktop.
Save ncb000gt/580873 to your computer and use it in GitHub Desktop.
var sys = require('sys')
,events = require('events')
function Eventer() {
events.EventEmitter.call(this);
}
sys.inherits(Eventer, events.EventEmitter);
var eventer = new Eventer();
eventer.on('new', function() {
sys.debug('test');
});
eventer.emit('new');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment