Returns an array listing the events for which the emitter has registered listeners.
Note: Listeners order not guaranteed
Optional
nsAsArray: booleanReturns the current max listener value for the EventEmitter which is either set by emitter.setMaxListeners(n) or defaults to EventEmitter2.defaultMaxListeners
Checks whether emitter has any listeners.
Optional
event: NameReturns an array of listeners for the specified event. This array can be manipulated, e.g. to remove listeners.
Optional
event: NameReturns an array of listeners that are listening for any event that is specified. This array can be manipulated, e.g. to remove listeners.
Optional
options: ListenToOptionsOptional
options: ListenToOptionsOptional
options: ListenToOptionsAdds a listener that will execute n times for the event before being removed. The listener is invoked only the first n times the event is fired, after which it is removed.
Adds a listener that will execute n times for the event before being removed. The listener is invoked only the first n times the event is fired, after which it is removed.
Remove a listener from the listener array for the specified event. Caution: Calling this method changes the array indices in the listener array behind the listener.
Removes the listener that will be fired when any event is emitted.'
Adds a listener that will be fired when any event is emitted. The event name is passed as the first argument to the callback.
Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.
Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.
Adds a listener that will be fired when any event is emitted. The event name is passed as the first argument to the callback. The listener is added to the beginning of the listeners array
Adds a listener that will execute n times for the event before being removed. The listener is invoked only the first n times the event is fired, after which it is removed. The listener is added to the beginning of the listeners array.
Adds a listener that will execute n times for the event before being removed. The listener is invoked only the first n times the event is fired, after which it is removed. The listener is added to the beginning of the listeners array.
Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed. The listener is added to the beginning of the listeners array
Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed. The listener is added to the beginning of the listeners array
Removes all listeners, or those of the specified event.
Optional
event: NameRemove a listener from the listener array for the specified event. Caution: Calling this method changes the array indices in the listener array behind the listener.
By default EventEmitters will print a warning if more than 10 listeners are added to it. This is a useful default which helps finding memory leaks. Obviously not all Emitters should be limited to 10. This function allows that to be increased. Set to zero for unlimited.
Optional
target: GeneralEventEmitterOptional
event: string | symbol | event[]Static
onceOptional
options: OnceOptions
Adds a listener to the end of the listeners array for the specified event.