Documentation
    Preparing search index...
    • The parameter's value as one URL path segment: its text URI-encoded, or "null" when the value is nullish.

      . and .. are refused. encodeURIComponent leaves them as they are, and the URL parser that fetch and new URL() share resolves them as dot segments, so the request would reach the parent path instead of the route, with the value gone. Their percent-encoded form is a dot segment by the same standard, so no spelling carries them.

      Parameters

      • name: string

        Name of the parameter, for the error

      • value: unknown

        Value of the parameter

      Returns string

      The URI-encoded segment

      Error when the value is . or ..