mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
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>
This commit is contained in:
committed by
James M Snell
parent
4b0dda0dd9
commit
c1f2df9782
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user