Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup: rename wrappedListeners to rawListeners
  • Loading branch information
apapirovski committed Dec 1, 2017
commit 6e3b199b0304481ff600c19ed54523c7a499ba7a
2 changes: 1 addition & 1 deletion doc/api/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ to indicate an unlimited number of listeners.

Returns a reference to the `EventEmitter`, so that calls can be chained.

### emitter.wrappedListeners(eventName)
### emitter.rawListeners(eventName)
<!-- YAML
added: REPLACEME
-->
Expand Down
2 changes: 1 addition & 1 deletion lib/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ EventEmitter.prototype.listeners = function listeners(type) {
return _listeners(this, type, true);
};

EventEmitter.prototype.wrappedListeners = function wrappedListeners(type) {
EventEmitter.prototype.rawListeners = function rawListeners(type) {
return _listeners(this, type, false);
};

Expand Down
2 changes: 1 addition & 1 deletion lib/vm.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function createScript(code, options) {
// Remove all SIGINT listeners and re-attach them after the wrapped function
// has executed, so that caught SIGINT are handled by the listeners again.
function sigintHandlersWrap(fn, thisArg, argsArray) {
const sigintListeners = process.wrappedListeners('SIGINT');
const sigintListeners = process.rawListeners('SIGINT');

process.removeAllListeners('SIGINT');

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-event-emitter-listeners.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function listener2() {}
const ee = new events.EventEmitter();
ee.on('foo', listener);
ee.once('foo', listener);
const wrappedListeners = ee.wrappedListeners('foo');
const wrappedListeners = ee.rawListeners('foo');
assert.strictEqual(wrappedListeners.length, 2);
assert.strictEqual(wrappedListeners[0], listener);
assert.notStrictEqual(wrappedListeners[1], listener);
Expand Down