@whi/cf-routing - v0.8.0
    Preparing search index...

    Function decodeParams

    • Percent-decode route parameter values.

      itty-router matches against the encoded pathname and leaves captured groups encoded. Decoding per-param (after the path is split) keeps an encoded %2F inside its parameter.

      Returns an error instead of throwing so callers can answer 400 through their normal error response path; on failure, params holds the raw values.

      Type Parameters

      Parameters

      • params: P

      Returns { params: P; error?: HttpError }