Status is
GitHubPredicates for identifying successful and authentication-required HTTP responses.
Installation
bash
pnpm dlx shadcn@latest add @cs/status-isUsage
tsx
import { statusIsSuccess } from "@/lib/cs/status-is"tsx
statusIsSuccess(200)API Reference
statusIsSuccess
Returns whether an HTTP status code represents a successful response.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| status * | HttpStatus | - | - |
Returns: boolean
statusIsLogin
Returns whether an HTTP status code requires authentication.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| status * | HttpStatus | - | - |
Returns: boolean