Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function print (path, layer) {
- if (layer.route) {
- layer.route.stack.forEach(print.bind(null, path.concat(split(layer.route.path))))
- } else if (layer.name === 'router' && layer.handle.stack) {
- layer.handle.stack.forEach(print.bind(null, path.concat(split(layer.regexp))))
- } else if (layer.method) {
- console.log('%s /%s',
- layer.method.toUpperCase(),
- path.concat(split(layer.regexp)).filter(Boolean).join('/'))
- }
- }
Add Comment
Please, Sign In to add comment