lib/event-emitter.js
function emit(event /* , args... */) {
  this._events = this._events || {};
  // NOTE: copy array so that removing listeners in listeners (once etc)
  // NOTE: does not affect the iteration
  var list = (this._events[event] || []).slice(0);
  for(var i = 0; i < list.length; i++) {
    list[i].apply(this, Array.prototype.slice.call(arguments, 1))
  }
  return list.length > 0;
}
function emit(event /* , args... */) {
  this._events = this._events || {};
  // NOTE: copy array so that removing listeners in listeners (once etc)
  // NOTE: does not affect the iteration
  var list = (this._events[event] || []).slice(0);
  for(var i = 0; i < list.length; i++) {
    list[i].apply(this, Array.prototype.slice.call(arguments, 1))
  }
  return list.length > 0;
}
function emit ( event /* , args... */ ) { this . _events = this . _events || { } ; // NOTE: copy array so that removing listeners in listeners (once etc) // NOTE: does not affect the iteration var list = ( this . _events [ event ] || [ ] ) . slice ( 0 ) ; for ( var i = 0 ; i < list . length ; i ++ ) { list [ i ] . apply ( this , Array . prototype . slice . call ( arguments , 1 ) ) } return list . length > 0 ; }
Execute each of the listeners in order with the supplied arguments.

Returns true if event had listeners, false otherwise.

@param event The event name.
@param args... The arguments to pass to event listeners.
Execute each of the listeners in order with the supplied arguments .