0.3.6 • Published 1 year ago
url-route v0.3.6
Simple Url Route(r)
- GIT
- NPM
How to use?
const router = new Router();
router.addRoute("/xxx*", ()=>{});
router.addRoute("/yyy*", ()=>{});
let match = router.match("/xxx/foo");
if (match) {
match.fn()
} else if (match.next) {
match = match.next("/xxx/foo");
}