Skip to content

Instantly share code, notes, and snippets.

@bpinedah
Created March 17, 2020 01:34
Show Gist options
  • Save bpinedah/7f3dc7f5b51456b4f5aec2726611490e to your computer and use it in GitHub Desktop.
Save bpinedah/7f3dc7f5b51456b4f5aec2726611490e to your computer and use it in GitHub Desktop.
Routes article
/**
* @description Get a flat array
* @param arr Array to flat
* @private
*/
const _toFlat = arr => [].concat(...arr);
const functions = routesFound.map(i => ([...i.middlewares]));
const fns = _toFlat(functions);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment