Skip to main content
Module

x/path_to_regexp/index.ts>regexpToFunction

Turn a path string such as `/user/:name` into a regular expression
Go to Latest
function regexpToFunction
import { regexpToFunction } from "https://deno.land/x/path_to_regexp@v6.2.1/index.ts";

Create a path match function from path-to-regexp output.

Type Parameters

optional
P extends object = object

Parameters

re: RegExp
keys: Key[]
optional
options: RegexpToFunctionOptions = [UNSUPPORTED]

Returns

MatchFunction<P>