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

x/dtils/devops/deps.ts>dtils.matchPath

The best unofficial library of utilities for Deno applications
Go to Latest
function dtils.matchPath
import { dtils } from "https://deno.land/x/dtils@2.2.1/devops/deps.ts";
const { matchPath } = dtils;

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