0.4.0 • Published 9 years ago

boa-router v0.4.0

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

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

Circle CI

License

MIT

Author

bouzuya <m@bouzuya.net> (http://bouzuya.net)