1const EventEmitter = require('events');
2const myEE = new EventEmitter();
3myEE.on('foo', () => {});
4myEE.on('bar', () => {});
5
6const sym = Symbol('symbol');
7myEE.on(sym, () => {});
8
9console.log(myEE.eventNames());
10// Prints: [ 'foo', 'bar', Symbol(symbol) ]