0.4.0 • Published 9 years ago
boa-router v0.4.0
boa-router
A routing library for b-o-a.
Installation
$ npm install boa-router
Usage
import { init } from 'boa-router';
const routes = [
{ path: '/users' },
{ path: '/users/:id' }
];
const router = init(routes);
const matched = router('/users/123');
// { route: { path: '/users/:id' }, params: { id: '123' } }
const notMatched = router('/items');
// null
Badges
License
Author
0.4.0
9 years ago