-
Notifications
You must be signed in to change notification settings - Fork 62
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
Conversation
- 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; |
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.
this could be argued to be a breaking change
removing off could theoretically break stuff, otherwise 👍 |
are there plans to also add a |
@dadleyy good call |
@feross do you mind updating this if you're able, I can't add to this pull |
Ah, sorry I already deleted my fork. What is the best way to add |
That's OK I'll just create a new one, empty array sounds right as
inheriting is probably a bad idea as it would blow up a lot of code that
used process
…On Tue, Apr 25, 2017, 5:44 PM Feross Aboukhadijeh ***@***.***> wrote:
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?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#77 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABE4n0ZUNweWCAD0zW0sRNluGYt_98mRks5rzmlRgaJpZM4NFPwD>
.
|
Sounds good. Closing this PR then. |
done published etc |
off
which does not exist onEventEmitter
orprocess
. (This was my bad, as I added this in a PR a few years ago coming from my jQuery background hehe 😏)EventEmitter
.