Named status constants plus lookup helpers for numeric codes and status text.
import { Status, codes } from '@stackpress/lib';Use Status when you need stable named ResponseStatus objects in emitters, queues, routers, or response helpers.
| Export | Notes |
|---|---|
codes |
Full Record<string, ResponseStatus> table keyed by status constant name. |
Status |
Named constants plus lookup helpers. |
Status exposes named ResponseStatus objects such as:
OKCREATEDNOT_FOUNDABORTBAD_REQUESTERROR
The full list mirrors the codes object.
| Method | Returns | Notes |
|---|---|---|
Status.find(status) |
ResponseStatus | undefined |
Finds the first status object with the matching status text. |
Status.get(code) |
ResponseStatus | undefined |
Finds the first status object with the matching numeric code. |
import { Status } from '@stackpress/lib';
const ok = Status.OK;
const aborted = Status.ABORT;
const notFound = Status.get(404);