Finds a route item that matches the given pathname from the provided routes array.
An array of switch items.
The pathname to match against the route items.
Finds a route item that matches the given pathname from the provided routes array.