You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
338 B
23 lines
338 B
2 years ago
|
/*!
|
||
|
* depd
|
||
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
||
|
* MIT Licensed
|
||
|
*/
|
||
|
|
||
|
'use strict'
|
||
|
|
||
|
/**
|
||
|
* Module exports.
|
||
|
* @public
|
||
|
*/
|
||
|
|
||
|
module.exports = eventListenerCount
|
||
|
|
||
|
/**
|
||
|
* Get the count of listeners on an event emitter of a specific type.
|
||
|
*/
|
||
|
|
||
|
function eventListenerCount (emitter, type) {
|
||
|
return emitter.listeners(type).length
|
||
|
}
|