summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSakthipriyan Vairamani <thechargingvolcano@gmail.com>2015-08-12 00:01:50 +0530
committerSakthipriyan Vairamani <thechargingvolcano@gmail.com>2015-08-20 03:17:08 +0530
commit8f58fb92fff904a6ca58fd0df9ee5a1816e5b84e (patch)
treea3eb0aea4cfa4d7f3cbb85adefe60ca621901f89 /doc
parentd98eed51f782ea44c3fd7823b2912f7fb30ab185 (diff)
downloadandroid-node-v8-8f58fb92fff904a6ca58fd0df9ee5a1816e5b84e.tar.gz
android-node-v8-8f58fb92fff904a6ca58fd0df9ee5a1816e5b84e.tar.bz2
android-node-v8-8f58fb92fff904a6ca58fd0df9ee5a1816e5b84e.zip
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>
Diffstat (limited to 'doc')
-rw-r--r--doc/api/events.markdown7
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/api/events.markdown b/doc/api/events.markdown
index a51905ab4d..de547a5b8b 100644
--- a/doc/api/events.markdown
+++ b/doc/api/events.markdown
@@ -137,10 +137,17 @@ Execute each of the listeners in order with the supplied arguments.
Returns `true` if event had listeners, `false` otherwise.
+### emitter.listenerCount(type)
+
+* `type` {Value} The type of event
+
+Returns the number of listeners listening to the `type` of event.
+
### Class Method: EventEmitter.listenerCount(emitter, event)
Return the number of listeners for a given event.
+_Note: This is deprecated. Use `emitter.listenerCount` instead._
### Event: 'newListener'