Function routeCapture

  • Extracts captured fragments from the route match.

    • Extracts named captures under their names as keys.
    • Extracts anonymous captures under $N key, there N is capture index.
    • Extracts dirs as string representations of extracted path.
    • Extracts regexp match groups in addition to the match itself under under <capture_name>$<group_index> (for named capture), or <capture_index>$<group_index> for anonymous capture.
    • Extracts named regexp match groups under their names as keys.

    Parameters

    • match: RouteMatch

      A route match to extract capture from, or null/undefined if there is no match.

    Returns Record<string, string>

    A map of string values of named and anonymous captures.

Generated using TypeDoc