Skip to content

matchRoute() ​

Call Signature ​

ts
function matchRoute(
   currentPath: string, 
   route: string, 
   exact: boolean
): boolean;

Primitive route matcher. May cause issues. Should receive some love.

Parameters ​

currentPath ​

string

route ​

string

exact ​

boolean

Returns ​

boolean

Call Signature ​

ts
function matchRoute(currentPath: string, route: URLPattern): boolean;

Primitive route matcher. May cause issues. Should receive some love.

Parameters ​

currentPath ​

string

route ​

URLPattern

Returns ​

boolean