Module

x/path_to_regexp/index.ts

Turn a path string such as `/user/:name` into a regular expression
Extremely Popular
Latest
import * as mod from "https://dotland.deno.dev/x/path_to_regexp@v6.2.1/index.ts";

Functions

Compile a string to a template function for the path.

Create path match function from path-to-regexp spec.

Parse a string for the raw tokens.

Normalize the given path string, returning a regular expression.

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

Expose a method for transforming tokens into the path function.

Expose a function for taking tokens and returning a RegExp.

Interfaces

Metadata about a key.

A match result contains data about the path match.

Type Aliases

A match is either false (no match) or a match result.

The match function takes a string and returns whether it matched the path.

Supported path-to-regexp input types.

A token is a string (nothing special) or key metadata (capture group).