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

Should the "*" event handlers be fired last? #26

Closed
tkh44 opened this issue Jan 20, 2017 · 5 comments · Fixed by #19
Closed

Should the "*" event handlers be fired last? #26

tkh44 opened this issue Jan 20, 2017 · 5 comments · Fixed by #19

Comments

@tkh44
Copy link

tkh44 commented Jan 20, 2017

This would be useful when you want to run some cleanup function or 'catch all' after all of your matching event handlers have been called.

@tkh44 tkh44 changed the title Should the "* Should the "*" event handlers be fired last? Jan 20, 2017
@developit
Copy link
Owner

Next version will do this, I agree.

@tunnckoCore
Copy link
Collaborator

I also been thinking this. And I'm still not sure. For me it make sense to be first, haha.

@developit
Copy link
Owner

developit commented Jan 22, 2017

I think the only real difference from my perspective would be what each option enables. The only thing I can think of is that firing * first would allow one to register a single-time-use handler for type which would act as an "after" hook. Not really ideal though.

Thought: we should do whatever WildEmitter does, they were one of the first to do a * event.

@tunnckoCore
Copy link
Collaborator

Yea, it seems that they fire wildcards after. Checked. :) So yea current master is wrong.

@developit
Copy link
Owner

kk, I think I'm good with after in order to keep things matchy-matchy. I know that's a little arbitrary, but I feel like they probably already had lots of discussion around the ordering, project is over 2 years old last I checked.

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 a pull request may close this issue.

3 participants