src code

instance method EventEmitter#emit

EventEmitter#emit(eventName, args) → this
  • eventName (String) – The name of the event to emit.
  • args (Array) – Optional. An array of arguments for the listeners of the event.

Fires event eventName on the EventEmitter instance. If a second argument is passed, it will be the contents of arguments inside the listener functions.