import { matchPath } from "https://deno.land/x/dtils@2.6.0/mod.unstable.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