in Node.js Essentials by

What is EventEmitter in Node.js?

1 Answer

0 votes

All objects that emit events are instances of the EventEmitter class. These objects expose an eventEmitter.on() function that allows one or more functions to be attached to named events emitted by the object.

When the EventEmitter object emits an event, all of the functions attached to that specific event are called synchronously.

Related questions

+1 vote
asked May 31, 2020 in Node.js Essentials by Robindeniel
+1 vote
asked May 30, 2020 in Node.js Essentials by SakshiSharma
0 votes
asked Aug 15, 2021 in APIGEE - API Services by sharadyadav1986