isRedirectStatus

import { isRedirectStatus } from "jsr:@ende/http";

function

function isRedirectStatus(status: number): status is RedirectStatus

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

status: number

The status to assert against.

Returns

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

Example: Usage

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

assert(isRedirectStatus(302));

Source