Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/dtils/mod.unstable.ts>matchPath

The best unofficial library of utilities for Deno applications
Go to Latest
function matchPath
import { matchPath } from "https://deno.land/x/dtils@2.3.1/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, } }

Parameters

pattern: string
path: string