Nitrate Processed Mincemeat
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

lib-route-matcher

0.0.0 • Public • Published

Routes.js

install

npm install --save lib-route-matcher

usage

var route = require('lib-route-matcher')().New();
 
route.add('/users/:name', HANDLE);
route.match('/users/bob?sort=desc');
// {
//   handle: HANDLE,
//   params: {
//     name: 'bob'
//   },
//   query: {
//     sort: 'desc'
//   }
// }

Where HANDLE can be a function, a token, or anything you like.

Keywords

none

install

npm i lib-route-matcher

Downloadsweekly downloads

3

version

0.0.0

license

MIT

repository

githubgithub

last publish

collaborators

  • avatar