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)

/boajs-router/

    Package Sidebar

    Install

    npm i boajs-router

    Weekly Downloads

    1

    Version

    0.3.0

    License

    MIT

    Last publish

    Collaborators

    • bouzuya