Skip to main content

matchPath

matchPath<ParamKey,Path>(pattern: Path | PathPattern<Path>,pathname: string): PathMatch<ParamKey> | null

Performs pattern matching on a URL pathname and returns information about
the match.

Properties

(Mandatory properties are in bold)
PropertiesTypeDescription
pathnamestring
patternPath | PathPattern<Path>