Function matchSimpleRoute

  • Checks whether the given route matches simple pattern.

    Parameters

    • route: string | URL | PathRoute

      Target route. Can be a string or URL. Uses urlRoute to parse it then.

    • pattern: string | RoutePattern

      Simple pattern to match the route against. Can be as string. Uses simpleRoutePattern to parse it then.

    Returns Record<string, string> | null

    A map of string values of named and anonymous captures, or null is the route does not match the pattern.

    See

    routeCapture For route capture mapping rules.

Generated using TypeDoc