Function isRedirectStatus

  • A type guard that determines if the status code is a redirection.

    Parameters

    • status: number

      The status to assert against.

    Returns status is RedirectStatus

    Whether or not the provided status is a redirect status code.

    import { isRedirectStatus } from "@std/http/status";
    import { assert } from "@std/assert";

    assert(isRedirectStatus(302));