question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

next function in single function case

See original GitHub issue

I’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:open
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

7reactions
lukeedcommented, Dec 11, 2018

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

3reactions
lukeedcommented, Mar 1, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found