decanat-router
v0.2.0
Published
Client-side router.
Downloads
3
Readme
decanat-router
Client-side router.
Installation
Using component:
$ component install decanat/router
Using npm for browserify:
$ npm install decanat-router
Usage
var Router = require('router');
var router = Router();
router.route('/blog/:thread/')
.use(function(ctx, next){
console.log(ctx.params.thread); // thread id parsed from url
next()
});
router.listen();
Test
Run unit tests:
$ make test
Forebears
License
The MIT License.