Does node.js have an equivalent of jquery's event.type method, i.e. something that gives the name of the event in the form of a string?
I've tried event.type but it hasn't worked for me so far...
You could add a little wrapper function that gives you the name
EventEmitter.prototype.addNamedListener = function(event, handler){
return this.addHandler(function(x){
handler({ event: event, data: x });
});
};