Returns a copy of the array of listeners for the event named eventName.
eventName
server.on('connection', (stream) => { console.log('someone connected!');});console.log(util.inspect(server.listeners('connection')));// Prints: [ [Function] ] Copy
server.on('connection', (stream) => { console.log('someone connected!');});console.log(util.inspect(server.listeners('connection')));// Prints: [ [Function] ]
v0.1.26
Returns a copy of the array of listeners for the event named
eventName
.