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

Function isSuccessfulStatus

http/status.ts:370–374  ·  view source on GitHub ↗
(
  status: number,
)

Source from the content-addressed store, hash-verified

368 * @returns Whether or not the provided status is a successful status code.
369 */
370export function isSuccessfulStatus(
371 status: number,
372): status is SuccessfulStatus {
373 return isStatus(status) && status >= 200 && status < 300;
374}
375
376/**
377 * A type guard that determines if the status code is a redirection.

Callers 1

fnFunction · 0.90

Calls 1

isStatusFunction · 0.85

Tested by

no test coverage detected