Skip to content
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

Fix code example in events API docs #2896

Closed
wants to merge 1 commit into from
Closed

Fix code example in events API docs #2896

wants to merge 1 commit into from

Conversation

dgerber
Copy link

@dgerber dgerber commented Sep 16, 2015

No description provided.

@brendanashworth brendanashworth added doc Issues and PRs related to the documentations. events Issues and PRs related to the events subsystem / EventEmitter. labels Sep 16, 2015
@evanlucas
Copy link
Contributor

This was actually one of the changes from 0.10. require('events') now returns an EventEmitter

@@ -23,7 +23,7 @@ attached to.
Use `require('events')` to access the EventEmitter class.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See this line, directly above. This was changed ages ago. :)

@Fishrock123
Copy link
Contributor

Thanks for the contribution though, hopefully you'll find something else to contribute! :)

@dgerber
Copy link
Author

dgerber commented Sep 16, 2015

Sorry, still using v0.10...
Then you may want to change that part of the docs which still reads:

const EventEmitter = require('events').EventEmitter;

@evanlucas
Copy link
Contributor

Yes we probably should. I feel that would be acceptable

@Fishrock123
Copy link
Contributor

@dgerber yes, would you mind to make a PR for that? :)

thefourtheye added a commit to thefourtheye/io.js that referenced this pull request Sep 16, 2015
The `events` module already exports `EventEmitter` constructor function
So, we don't have to use `events.EventEmitter` to access it.

Refer: nodejs#2896
thefourtheye added a commit to thefourtheye/io.js that referenced this pull request Sep 17, 2015
The `events` module already exports `EventEmitter` constructor function
So, we don't have to use `events.EventEmitter` to access it.

Refer: nodejs#2896
thefourtheye added a commit that referenced this pull request Sep 22, 2015
The `events` module already exports `EventEmitter` constructor function
So, we don't have to use `events.EventEmitter` to access it.

Refer: #2896

PR-URL: #2921
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
thefourtheye added a commit that referenced this pull request Sep 22, 2015
The `events` module already exports `EventEmitter` constructor function
So, we don't have to use `events.EventEmitter` to access it.

Refer: #2896

PR-URL: #2921
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
thefourtheye added a commit that referenced this pull request Sep 22, 2015
The `events` module already exports `EventEmitter` constructor function
So, we don't have to use `events.EventEmitter` to access it.

Refer: #2896

PR-URL: #2921
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
thefourtheye added a commit that referenced this pull request Sep 22, 2015
The `events` module already exports `EventEmitter` constructor function
So, we don't have to use `events.EventEmitter` to access it.

Refer: #2896

PR-URL: #2921
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. events Issues and PRs related to the events subsystem / EventEmitter.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants