eventemitter.removeAllListeners()

emitter.removeAllListeners([eventName])

Removes all listeners, or those of the specified eventName.

Note that it is bad practice to remove listeners added elsewhere in the code, particularly when the EventEmitter instance was created by some other component or module (e.g. sockets or file streams).

Returns a reference to the EventEmitter so calls can be chained.

doc_Nodejs
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.