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

x/path_to_regexp/index.ts>CompileOptions

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

Properties

optional
sensitive: boolean

Regexp will be case sensitive. (default: false)

optional
loose: boolean

Allow the delimiter to be arbitrarily repeated. (default: true)

optional
strict: boolean

Verify patterns are valid and safe to use. (default: false)

optional
validate: boolean

Verifies the function is producing a valid path. (default: true)

optional
encode: Encode | false

Function for encoding input strings for output into the path, or false to disable entirely. (default: encodeURIComponent)