SHARE
TWEET

Untitled

a guest Feb 17th, 2019 114 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.   }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top