Skip to content

Commit b8e3a5f

Browse files
sabakugaaraMylesBorins
authored andcommitted
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: #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>
1 parent 463f294 commit b8e3a5f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/api/process.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ too many listeners have been added to an event
290290

291291
```txt
292292
$ node
293-
> event.defaultMaxListeners = 1;
293+
> events.defaultMaxListeners = 1;
294294
> process.on('foo', () => {});
295295
> process.on('foo', () => {});
296296
> (node:38638) Warning: Possible EventEmitter memory leak detected. 2 foo
@@ -303,7 +303,7 @@ adds a custom handler to the `'warning'` event:
303303
```txt
304304
$ node --no-warnings
305305
> var p = process.on('warning', (warning) => console.warn('Do not do that!'));
306-
> event.defaultMaxListeners = 1;
306+
> events.defaultMaxListeners = 1;
307307
> process.on('foo', () => {});
308308
> process.on('foo', () => {});
309309
> Do not do that!

0 commit comments

Comments
 (0)