Function: matchPath()
ts
function matchPath(matcher, pathname): boolean;Defined in: packages/next/src/matcher.ts:65
true if the pathname matches the pattern (or any of the patterns). Both the raw and the percent-decoded pathname are tried, so /%61dmin is protected by a rule for /admin.
Parameters
| Parameter | Type |
|---|---|
matcher | PathMatcher |
pathname | string |
Returns
boolean
