Skip to content

Commit 8acba48

Browse files
authored
Add all EventEmitter methods to SYNC_METHODS
I was tripped up by the lack of .off, so I added all of them. These are in the order at https://nodejs.org/api/events.html.
1 parent 7dd2594 commit 8acba48

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

index.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,21 @@ var ASYNC_METHODS = ['publish',
1111
];
1212

1313
var SYNC_METHODS = [
14-
'emit',
1514
'addListener',
15+
'emit',
16+
'eventNames',
17+
'getMaxListeners',
18+
'listenerCount',
19+
'listeners',
20+
'off',
1621
'on',
1722
'once',
18-
'removeListener',
23+
'prependListener',
24+
'prependOnceListener',
1925
'removeAllListeners',
26+
'removeListener',
2027
'setMaxListeners',
21-
'getMaxListeners',
22-
'listeners',
23-
'listenerCount'
28+
'rawListeners'
2429
];
2530

2631
module.exports = {

0 commit comments

Comments
 (0)