mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
doc: remove extraneous sentence in events.md
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: https://github.com/nodejs/node/pull/32457 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com>
This commit is contained in:
1 parent
6168bd5951
commit
40a9289e53
1 file changed
+3
-4
+3
-4
@@ -740,10 +740,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.
|
||||
|
||||
|
||||
Reference in new issue
Block a user