Skip to content

Commit

Permalink
doc: remove extraneous sentence in events.md
Browse files Browse the repository at this point in the history
Since the previous sentence describes `10` as a default, and the
following sentence explains how to modify that default, it is
unnecessary to explain that "Obviously, not all events should be limited
to just 10 listeners."

PR-URL: #32457
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Myles Borins <[email protected]>
  • Loading branch information
Trott authored and targos committed Apr 22, 2020
1 parent 1c84d85 commit 8d27eb9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions doc/api/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -715,10 +715,9 @@ added: v0.3.5

By default `EventEmitter`s will print a warning if more than `10` listeners are
added for a particular event. This is a useful default that helps finding
memory leaks. Obviously, not all events should be limited to just 10 listeners.
The `emitter.setMaxListeners()` method allows the limit to be modified for this
specific `EventEmitter` instance. The value can be set to `Infinity` (or `0`)
to indicate an unlimited number of listeners.
memory leaks. The `emitter.setMaxListeners()` method allows the limit to be
modified for this specific `EventEmitter` instance. The value can be set to
`Infinity` (or `0`) to indicate an unlimited number of listeners.

Returns a reference to the `EventEmitter`, so that calls can be chained.

Expand Down

0 comments on commit 8d27eb9

Please sign in to comment.