-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lib,src,doc: remove usage of events.EventEmitter #2921
lib,src,doc: remove usage of events.EventEmitter #2921
Conversation
The `events` module already exports `EventEmitter` constructor function So, we don't have to use `events.EventEmitter` to access it. Refer: nodejs#2896
@@ -117,7 +117,7 @@ function onServerResponseClose() { | |||
// array. That is, in the example below, b still gets called even though | |||
// it's been removed by a: | |||
// | |||
// var obj = new events.EventEmitter; | |||
// var obj = new events(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe var obj = new EventEmitter();
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@evanlucas I updated this. Thanks :-)
The `events` module already exports `EventEmitter` constructor function So, we don't have to use `events.EventEmitter` to access it. Refer: nodejs#2896
742a9ad
to
705ff31
Compare
Removing the test changes, after a lengthy discussion with @brendanashworth ;-) |
LGTM |
1 similar comment
LGTM |
The 'events' module already exports 'EventEmitter' constructor function - nodejs/node#2921
The
events
module already exportsEventEmitter
constructor functionSo, we don't have to use
events.EventEmitter
to access it.Refer: #2896
cc @silverwind @evanlucas