Libraries v5.2.0
    Preparing search index...

    Function matchEndpointPath

    • Match a pathname against one endpoint and return validated path parameters. Returns undefined for a different route, invalid encoding/parameters or an absolute URL/query/fragment. This does not check HTTP method or authorization. One optional trailing slash is accepted, matching server routing. Parameters may contain slashes when their schema permits them, as in route templates.

      Type Parameters

      • E extends AnyEndpoint

      Parameters

      • endpoint: E
      • pathname: string

      Returns EndpointParams<E> | undefined