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

Update event emitter methods #77

Closed
wants to merge 1 commit into from
Closed

Update event emitter methods #77

wants to merge 1 commit into from

Conversation

feross
Copy link
Contributor

@feross feross commented Apr 22, 2017

  • Remove off which does not exist on EventEmitter or process. (This was my bad, as I added this in a PR a few years ago coming from my jQuery background hehe 😏)
  • Add two new methods that are on EventEmitter.

- Remove `off` which does not exist on `EventEmitter` or `process`. (This was my bad, as I added this in a PR a few years ago coming from my jQuery background hehe 😏)
- Add two new methods that are on `EventEmitter`.
@@ -164,10 +164,11 @@ function noop() {}
process.on = noop;
process.addListener = noop;
process.once = noop;
process.off = noop;
Copy link
Collaborator

Choose a reason for hiding this comment

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

this could be argued to be a breaking change

@calvinmetcalf
Copy link
Collaborator

removing off could theoretically break stuff, otherwise 👍

@dadleyy
Copy link

dadleyy commented Apr 25, 2017

are there plans to also add a listeners function? jasmine@2.6 was just released and expects it to be defined in node-like environments.

@calvinmetcalf
Copy link
Collaborator

@dadleyy good call

@calvinmetcalf
Copy link
Collaborator

@feross do you mind updating this if you're able, I can't add to this pull

@feross
Copy link
Contributor Author

feross commented Apr 25, 2017

Ah, sorry I already deleted my fork.

What is the best way to add listeners? Should it always return an empty array? Or should we just make process actually inherit from EventEmitter?

@calvinmetcalf
Copy link
Collaborator

calvinmetcalf commented Apr 25, 2017 via email

@feross
Copy link
Contributor Author

feross commented Apr 25, 2017

Sounds good. Closing this PR then.

@feross feross closed this Apr 25, 2017
@calvinmetcalf calvinmetcalf mentioned this pull request Apr 25, 2017
@calvinmetcalf
Copy link
Collaborator

done published etc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants