sort-routes
v1.0.0
Published
sort routes by specificity
Downloads
2,444
Readme
sort-routes
var bySpecificity = require('sort-routes');
var routes = [
'/characters/:id',
'/characters',
'/characters/new',
];
routes.sort(bySpecificity);
[
'/characters',
'/characters/new',
'/characters/:id',
]