Created
March 17, 2020 05:38
-
-
Save bpinedah/d697617569aaf75b84470d5c9b2d1ead to your computer and use it in GitHub Desktop.
Routes article
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
** | |
* @description Function to send to the next middleware function | |
* @param idx Current function index | |
* @param length Total of middlewares functions | |
* @private | |
*/ | |
const _next = (idx, length) => e => | |
Promise.resolve(idx === length - 1 && length > 2 ? e : [e]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment