import { matchPath } from "https://deno.land/x/dtils@2.3.1/path.ts";
Examples
matchPath('/user/{id}/method/{action}/request', '/user/23/method/create/request?timeout=40&hurry')
// ->
{
params: {
id: 23,
action: 'create'
},
query: {
timeout: 40,
hurry: true,
}
}
matchPath('/user/{id}/method/{action}/request', '/user/23/method/create/request?timeout=40&hurry') // -> { params: { id: 23, action: 'create' }, query: { timeout: 40, hurry: true, } }
Returns
MatchPathResult | null