-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Added onUsed and wrapper support #707
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
Conversation
738cd59 to
810643b
Compare
|
@jonathanong Pros:
Cons:
|
Current coverage is 54.27%@@ v2.x #707 diff @@
=======================================
Files 4 4
Lines 414 339 -75
Methods 80 0 -80
Branches 99 96 -3
=======================================
- Hits 414 184 -230
- Misses 0 153 +153
- Partials 0 2 +2
|
|
@jonathanong I added tests for nested middleware, look good? |
|
I've rebased this to v2.x, but actual server tests will still fail until koajs/compose#53 is merged. |
|
would really love more people to express their opinion :) |
|
I'll just close this as it has little relevance today IMO. Maybe there's still a need for wrappers but I doubt it personally and the same functionality can be approached in user land. Also, over the years I haven't really seen any requests for wrappers. If I remember correctly, this was brought to light due to TJ's original issue to simplify mw profiling, though today this can be solved with async_hooks which seems more like native approach Koa should aim towards. Please reopen if I'm wrong :) |
Yet another wrapper implementation. Created this to play with the idea. Requires koajs/compose#53 to work.