-
-
Notifications
You must be signed in to change notification settings - Fork 17
update to support chaining & incorporate short-circuit as a return flag #41
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 to support chaining & incorporate short-circuit as a return flag #41
Conversation
changes to recursive design forked to nodejs#41
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.
Thanks for doing this. I know this is “my” proposal so if you want me to take it from here just let me know and I’ll try to find the time, otherwise I’m happy for you to keep improving it.
}); | ||
} | ||
``` | ||
</details> |
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.
We should probably have an example of shortCircuit: true
in either the resolve or load chains. Like maybe for load
it could be ordered so that https
always runs, and then either CoffeeScript or Babel: CoffeeScript if we have CoffeeScript to process, and then short-circuit; or Babel otherwise, and then short-circuit.
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.
Mm, agreed. I thiiink the mock-loader example I was planning to (subsequently?) add would have a shortCircuit
in resolve.
@GeoffreyBooth whichever 🙂 If I do keep it, I also don't mind if you make updates (rather than wait for me to do it). |
@JakobJingleheimer I did a quick pass to resolve my notes other than the “we should add a short circuit example” one. |
705b3de
to
52aba4f
Compare
52aba4f
to
068f343
Compare
I think the name for this pattern is the “middleware” pattern: https://muniftanjim.dev/blog/basic-middleware-pattern-in-javascript/ Perhaps we should call it that rather than recursive? There’s not actually any recursion going on, it’s one function calling another that calls another. |
Forked from #32