Skip to main content
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
method EventEmitter.prototype.removeAllListeners
import { EventEmitter } from "https://deno.land/std@0.167.0/node/events.ts";

Removes all listeners, or those of the specified eventName.

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 that calls can be chained.

Parameters

optional
event: string | symbol