rtd-core
A minimalistic route parser for rtd
powered by path-to-regexp
.
Features
- Tiny
- Fast
- Really easy to use
Install
$ npm install rtd-core
Usage
const rtdCore = ; const route = ;const match = ; if match == false // no match else const id = matchid;
API
rtdCore(route)
route
Type: string
The route to match.
match(url)
Return false
if there was no match or an object with the params if the routes matched.
url
Type: string
The url to match with the route