Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/velo/deps.ts>EventEmitter#listeners

A high-performance caching library for Deno. Supports LRU, LFU, ARC, and TinyLFU.
Latest
method EventEmitter.prototype.listeners
import { EventEmitter } from "https://deno.land/x/velo@1.0.0/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[]