Skip to main content
Module

std/node/events.ts>default#once

Deno standard library
Go to Latest
method default.prototype.once
import { default } from "https://deno.land/std@0.34.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: Function