next function in single function case
See original GitHub issueI’m not sure, was such issue raised before or not, I tried search, but did not found.
Why next
function is not provided if route have only 1 function?
https://github.com/lukeed/polka/blob/e7aa451fe311dae1915d043ee95a2dd1a75343ff/packages/polka/index.js#L92
Is not right code will be:
if (len === i && num === 1) return fns[0](req, res, err => err && this.onError(err, req, res, next));
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Switch statement for multiple cases in JavaScript
You can give an indication of what the multiple cases are by using a suitable name inside your find function. switch (varName) {...
Read more >switch - JavaScript - MDN Web Docs - Mozilla
The switch statement evaluates an expression, matching the expression's value against a series of case clauses, and executes statements ...
Read more >4. More Control Flow Tools — Python 3.11.1 documentation
The statements that form the body of the function start at the next line, and must be indented. The first statement of the...
Read more >SQL CASE | Intermediate SQL - Mode Analytics
This SQL tutorial for data analysis covers using if/then logic with the SQL CASE statement. CASE can include multiple conditions and be used...
Read more >CASE function - IBM
The CASE function must have at least one WHEN clause. The ELSE expression is optional. The default ELSE expression is NULL. A CASE...
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
No problem~ 1.0 will be released early January. I’ll be polishing it up over the holidays. The code is not public yet as it exists/has been developed within personal projects
The core for 1.0 is complete. I’m now just working on supporting packages / middleware. The biggest of them, for illustration, is attaching view engine(s) to your application on command. Express has it built-in, so this will be one of the few remaining differences.
I hope to do a very short
next
release cycle once all these decisions have been made. Since things are changing a lot on an organizational level (package re-arrangement, names, etc) I haven’t been keen on publishing new versions/tags since it’d just add confusion.