Listen in on what event emitters are doing
Listen in on what event emitters are doing.
var// Do somethingvar emitter1 = ;emitter2 = ;var neighbor = callback;neighborpeekemitter1;neighborpeekemitter2;
When you emit an event.
emitter1emit'msg' 'brandon' 'farmer';
callback with be called with 'msg' as event and ['brandon', 'farmer'] as args.
It will also listen to both emitters, so emitting from emitter2 will result in the same outcome.