-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
LIFO instead of FIFO #18
Comments
This is a duplicate of #17 . This module will only run in the same order as even listeners, mainly because we are attaching event listeners. That internal array is just so if you use this module a lot on the same object, you won't get the too many event listeners warning. Ultimately, the order is only that of event listeners. You're welcome to publish your own module that goes in reverse, of course. I don't see why there cannot be a LIFO module and a FIFO module. At the very least, I wrote everything around the order this module works, so changing it is just not negotiable, I'm sorry. If you publish another module,I can link to it in the readme as an alternative. |
I've submitted a PR for optional LIFO ordering in #28. |
It would be great if the calling order was LIFO (same as stack unwinding) instead of, how it is now, FIFO.
It could easily be accomplished by replacing
push
withunshift
.The text was updated successfully, but these errors were encountered: