Browse Source

doc: fix EventEmitter#eventNames() example

Replace myErr with myEE in one place.
Fix the expected output to have the actual formatting.

PR-URL: https://github.com/nodejs/node/pull/6417
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
v6.x
Сковорода Никита Андреевич 9 years ago
committed by Jeremiah Senkpiel
parent
commit
4068d64f4f
  1. 4
      doc/api/events.md

4
doc/api/events.md

@ -310,8 +310,8 @@ myEE.on('bar', () => {});
const sym = Symbol('symbol');
myEE.on(sym, () => {});
console.log(myErr.eventNames());
// Prints ['foo', 'bar', Symbol('symbol')]
console.log(myEE.eventNames());
// Prints [ 'foo', 'bar', Symbol(symbol) ]
```
### emitter.getMaxListeners()

Loading…
Cancel
Save