Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "utils/pathToRegex"

Index

Type aliases

Variables

Functions

Type aliases

Path

Path: string | RegExp | PathArray

PathArray

PathArray: (string | RegExp)[]

Variables

Const MATCHING_GROUP_REGEXP

MATCHING_GROUP_REGEXP: RegExp = /\((?!\?)/g

Match matching groups in a regular expression.

Functions

Private pathToRegexp

  • pathToRegexp(path: Path, keys: any[], options: any): RegExp
  • Normalize the given path string, returning a regular expression.

    An empty array should be passed, which will contain the placeholder key names. For example "/user/:id" will then contain ["id"].

    Parameters

    • path: Path
    • keys: any[]
    • options: any

    Returns RegExp

Generated using TypeDoc