This package has been deprecated

Author message:

use boa-router

boajs-router
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

boajs-router

A routing library for bouzuya/b-o-a.

Installation

$ npm install boajs-router

Usage

import { init } from 'boajs-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)

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Published

Version History

  • Version
    Downloads (Last 7 Days)
    • Published

Package Sidebar

Install

npm i boajs-router

Weekly Downloads

0

Version

0.3.0

License

MIT

Last publish

Collaborators

  • bouzuya