Skip to content

Instantly share code, notes, and snippets.

@bpinedah
Created March 17, 2020 05:38
Show Gist options
  • Save bpinedah/d697617569aaf75b84470d5c9b2d1ead to your computer and use it in GitHub Desktop.
Save bpinedah/d697617569aaf75b84470d5c9b2d1ead to your computer and use it in GitHub Desktop.
Routes article
**
* @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