You are reading 12.5.0. See this page in 13.4.1.
events
A Node.js-compatible implementation of the core events module
Titanium provides a number of shims and ports of core Node.js module functionality.
This module is intended to provide a Node-compatible port of the events.
More details on the Node.js API can be found in their events module documentation
Properties 2
defaultMaxListeners
NumberThe default number of maximum listeners for all EventEmitters
Default: 10
The EventEmitter class is defined and exposed by the events module:
const EventEmitter = require('events');
All EventEmitters emit the event 'newListener' when new listeners are added and 'removeListener' when existing listeners are removed.
Methods 1
A class method that returns the number of listeners for the given eventName registered on the given emitter.
| Parameters | Type | Description |
|---|---|---|
| emitter | EventEmitter | The emitter to query |
| eventName | String | The event name |