Much of the Node.js core API is built around an idiomatic asynchronous event-driven architecture in which certain kinds of objects (called "emitters") periodically emit named events that cause Function objects ("listeners") to be called.
EventEmitter Interface
EventEmitter Interface
EventEmitter Singleton
EventEmitter Singleton
Much of the Node.js core API is built around an idiomatic asynchronous event-driven architecture in which certain kinds of objects (called "emitters") periodically emit named events that cause Function objects ("listeners") to be called.
The EventEmitter class is defined and exposed by the events module
https://nodejs.org/api/events.html