events: deprecate static listenerCount function
authorSakthipriyan Vairamani <thechargingvolcano@gmail.com>
Tue, 11 Aug 2015 18:31:50 +0000 (00:01 +0530)
committerSakthipriyan Vairamani <thechargingvolcano@gmail.com>
Wed, 19 Aug 2015 21:47:08 +0000 (03:17 +0530)
commit8f58fb92fff904a6ca58fd0df9ee5a1816e5b84e
treea3eb0aea4cfa4d7f3cbb85adefe60ca621901f89
parentd98eed51f782ea44c3fd7823b2912f7fb30ab185
events: deprecate static listenerCount function

As per the discussion in #734, this patch deprecates the usage of
`EventEmitter.listenerCount` static function in the docs, and introduces
the `listenerCount` function in the prototype of `EventEmitter` itself.

PR-URL: https://github.com/nodejs/node/pull/2349
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
13 files changed:
benchmark/events/ee-listener-count-on-prototype.js [moved from benchmark/events/ee-listener-count.js with 80% similarity]
doc/api/events.markdown
lib/_http_client.js
lib/_http_server.js
lib/_stream_readable.js
lib/_tls_wrap.js
lib/events.js
lib/fs.js
lib/readline.js
lib/stream.js
src/node.js
test/parallel/test-event-emitter-listener-count.js [new file with mode: 0644]
test/parallel/test-event-emitter-subclass.js