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>
process-exit-stdio-flushing
Сковорода Никита Андреевич 9 years ago
committed by James M Snell
parent
commit
c1f2df9782
  1. 4
      doc/api/events.md

4
doc/api/events.md

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

Loading…
Cancel
Save