Go to Latest
method EventEmitter.prototype.once
import { EventEmitter } from "https://dotland.deno.dev/std@0.110.0/node/events.ts";

Adds a one-time listener function for the event named eventName. The next time eventName is triggered, this listener is removed and then invoked.

Parameters

eventName: string | symbol
listener: GenericFunction