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

x/path_to_regexp/index.ts

Turn a path string such as `/user/:name` into a regular expression
Latest
import * as pathToRegexp from "https://deno.land/x/path_to_regexp@v8.2.0/index.ts";

Classes

Tokenized path instance.

Functions

Compile a string to a template function for the path.

Transform a path into a match function.

Parse a string for the raw tokens.

Stringify token data into a path string.

Interfaces

A set of possible tokens to expand when matching.

A match result contains data about the path match.

A parameter designed to match arbitrary text within a segment.

Plain text.

A wildcard parameter designed to match multiple segments.

Type Aliases

Decode a string into another string.

Encode a string into another string.

A token that corresponds with a regexp capture.

A sequence of path-to-regexp keys that match capturing groups.

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 types.

A sequence of path match characters.