support variadic usage (rather than requiring an array)
See original GitHub issuethis is just my ocd, but imo the latter looks much nicer:
app.use(route.get('/foo', compose([ middleware1, middleware2, routeHandler ])))
vs
app.use(route.get('/foo', compose(middleware1, middleware2, routeHandler)))
would you take a pr implementing this in a backward compatible way?
/cc @jonathanong
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Variadic Parameters that Accept Array Inputs - Swift Forums
Variadic parameters should accept Array (and maybe Set ) as a valid inputs, so to make variadic parameters easier to use and more...
Read more >How to use an array as argument to a VARIADIC function in ...
You can do that by specifying VARIADIC in the call: SELECT mleast(VARIADIC ARRAY[10, -1, 5, 4.4]); More details: Select rows such that names ......
Read more >Why can arrays not be used _directly_ when calling a variadic ...
Basically, in Go arrays are secondary. Slices are the way to go. You should have a slice in the first place, which you...
Read more >Modern C++ and Variadic Functions: How to Shoot Yourself in ...
It is possible to declare function with a variable number of arguments, i.e. the number of function arguments can be greater than the...
Read more >Ultimate Guide to Go Variadic Functions | by Inanc Gumus
Learn everything about Golang variadic funcs visually with common usage patterns.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
i would personally like:
@tj @juliangruber @dead-horse @fengmk2 thoughts?
I forgot the PR that added this got reverted and wasted a bunch of time debugging… any chance we’d be up for trying this again?
Also, any news on “the use-case for mutating middleware”?