Guest User

Untitled

a guest
Feb 17th, 2019
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. function print (path, layer) {
  2. if (layer.route) {
  3. layer.route.stack.forEach(print.bind(null, path.concat(split(layer.route.path))))
  4. } else if (layer.name === 'router' && layer.handle.stack) {
  5. layer.handle.stack.forEach(print.bind(null, path.concat(split(layer.regexp))))
  6. } else if (layer.method) {
  7. console.log('%s /%s',
  8. layer.method.toUpperCase(),
  9. path.concat(split(layer.regexp)).filter(Boolean).join('/'))
  10. }
  11. }
Add Comment
Please, Sign In to add comment