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

x/events/mod.ts>default

EventEmitter for deno
Latest
class default
import { default } from "https://deno.land/x/events@v1.0.0/mod.ts";

Properties

private
events: Map<string | symbol, Array<Function>>
private
optional
maxListeners: number
defaultMaxListeners

Methods

private
onceWrap(eventName: string | symbol, listener: Function): WrappedFunction
addListener(eventName: string | symbol, listener: Function)
emit(eventName: string | symbol, ...args: unknown[])
listenerCount(eventName: string | symbol)
listeners(eventName: string | symbol)
off(eventName: string | symbol, listener: Function)
on(
eventName: string | symbol,
listener: Function,
prepend?: boolean,
): this
once(eventName: string | symbol, listener: Function): this
prependListener(eventName: string | symbol, listener: Function)
prependOnceListener(eventName: string | symbol, listener: Function)
rawListeners(eventName: string | symbol)
removeAllListeners(eventName: string | symbol)
removeListener(eventName: string | symbol, listener: Function)
setMaxListeners(n: number)