Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

std/node/_events.mjs>once

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
function once
import { once } from "https://deno.land/std@0.168.0/node/_events.mjs";

Creates a Promise that is fulfilled when the emitter emits the given event.

Parameters

emitter
name
optional
options = [UNSUPPORTED]