Skip to content

Commit

Permalink
docs: add cautionary note to emitter.removeAllListeners
Browse files Browse the repository at this point in the history
Signed-off-by: Fedor Indutny <fedor@indutny.com>
  • Loading branch information
othiym23 authored and indutny committed Apr 29, 2014
1 parent 3f3a71e commit 793c76e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion doc/api/events.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit 793c76e

Please sign in to comment.