router-handles-url
v0.0.1
Published
Check if an express router can handle a given url.
Downloads
2
Readme
Check if an express router can handle a given url.
var handlesUrl = require('router-handles-url'),
router = require('express').Router();
router.get('/users/:id(\\d+)', ..);
handlesUrl(router, '/users/123') //true
handlesUrl(router, '/users/bob') //false