docs: add cautionary note to emitter.removeAllListeners

Signed-off-by: Fedor Indutny <fedor@indutny.com>
pull/24998/head
Forrest L Norvell 2014-04-28 12:38:06 -07:00 committed by Fedor Indutny
parent 3f3a71e61e
commit 793c76e5c6
1 changed files with 3 additions and 1 deletions

View File

@ -69,7 +69,9 @@ Returns emitter, so calls can be chained.
### emitter.removeAllListeners([event])
Removes all listeners, or those of the specified event.
Removes all listeners, or those of the specified event. It's not a good idea to
remove listeners that were added elsewhere in the code, especially when it's on
an emitter that you didn't create (e.g. sockets or file streams).
Returns emitter, so calls can be chained.