Skip to main content
Module

x/dtils/path.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.0.0/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, } }

Parameters

pattern: string
path: string