MCPcopy Create free account
hub / github.com/denoland/std / isStatus

Function isStatus

http/status.ts:332–334  ·  view source on GitHub ↗
(status: number)

Source from the content-addressed store, hash-verified

330 * @returns Whether or not the provided status is a valid status code.
331 */
332export function isStatus(status: number): status is StatusCode {
333 return Object.values(STATUS_CODE).includes(status as StatusCode);
334}
335
336/**
337 * A type guard that determines if the status code is informational.

Callers 6

isInformationalStatusFunction · 0.85
isSuccessfulStatusFunction · 0.85
isRedirectStatusFunction · 0.85
isClientErrorStatusFunction · 0.85
isServerErrorStatusFunction · 0.85
isErrorStatusFunction · 0.85

Calls 2

includesMethod · 0.80
valuesMethod · 0.80

Tested by

no test coverage detected