listenercount
backwards compatible version of builtin events.listenercount
A polyfill of Node.js 0.12+'s events.listenerCount function for Node.js 0.10. Uses the builtin if present, otherwise uses polyfill implementation.
usage
var listenerCount = var EventEmitter = EventEmitter var ee = ee // => 1 // => 0
api
listenerCount(ee : EventEmitter, eventName : String) => Number
Returns the number of listeners for a given eventName
on an EventEmitter.
installation
$ npm install listenercount
running the tests
From package root:
$ npm install
$ npm test
contributors
- jden jason@denizac.org
license
ISC. (c) MMXVI jden jason@denizac.org. See LICENSE.md