Browse Source

doc: fix a typo in api/process.md

Fix a mistyped module name in example REPL sessions found in the
description of the 'warning' event: it should be `events` instead of
`event`.

PR-URL: https://github.com/nodejs/node/pull/11780
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
v7.x
Gaara 8 years ago
committed by Italo A. Casas
parent
commit
e84e33c87c
No known key found for this signature in database GPG Key ID: 23EFEFE93C4CFFFE
  1. 4
      doc/api/process.md

4
doc/api/process.md

@ -298,7 +298,7 @@ too many listeners have been added to an event
```txt
$ node
> event.defaultMaxListeners = 1;
> events.defaultMaxListeners = 1;
> process.on('foo', () => {});
> process.on('foo', () => {});
> (node:38638) Warning: Possible EventEmitter memory leak detected. 2 foo
@ -311,7 +311,7 @@ adds a custom handler to the `'warning'` event:
```txt
$ node --no-warnings
> var p = process.on('warning', (warning) => console.warn('Do not do that!'));
> event.defaultMaxListeners = 1;
> events.defaultMaxListeners = 1;
> process.on('foo', () => {});
> process.on('foo', () => {});
> Do not do that!

Loading…
Cancel
Save