Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/velo/deps.ts>EventEmitter#listeners

Performant Cache implementations for Deno. Supports LRU, LFU, ARC and other caching policies.
Go to Latest
method EventEmitter.prototype.listeners
Re-export
import { EventEmitter } from "https://deno.land/x/velo@0.1.5/deps.ts";

Returns a copy of the array of listeners for the event named eventName.

server.on('connection', (stream) => {
  console.log('someone connected!');
});
console.log(util.inspect(server.listeners('connection')));
// Prints: [ [Function] ]

Parameters

eventName: string | symbol

Returns

Function[]