Skip to main content
Module

x/path_to_regexp/index.ts>TokensToRegexpOptions

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

Properties

optional
sensitive: boolean

When true the regexp will be case sensitive. (default: false)

optional
strict: boolean

When true the regexp won't allow an optional trailing delimiter to match. (default: false)

optional
end: boolean

When true the regexp will match to the end of the string. (default: true)

optional
start: boolean

When true the regexp will match from the beginning of the string. (default: true)

optional
delimiter: string

Sets the final character for non-ending optimistic matches. (default: /)

optional
endsWith: string

List of characters that can also be "end" characters.

optional
encode: (value: string) => string

Encode path tokens for use in the RegExp.