Gets all the listeners for a specified event.
The event name.
Removes the listener for a specified event.
The event name.
The callback that corresponds to the event listener.
Listens for a specified event.
When the specified event happens, the SDK triggers the callback that you pass.
The event name.
The callback to trigger.
Listens for a specified event once.
When the specified event happens, the SDK triggers the callback that you pass and then removes the listener.
The event name.
The callback to trigger.
Removes all listeners for a specified event.
The event name. If left empty, all listeners for all events are removed.
The
EventEmitter
class provides a way to define, emit, and handle events.