http-status-lite
v2.3.0

Status codes that
TypeScript understands.

Tiny, standards-backed HTTP status codes with exact types, safe parsing, and literal-preserving lookups. Zero runtime dependencies.

Install package
$npm install http-status-lite
64 known codes0 dependenciesMIT licensed
1xx05Informational
2xx10Success
3xx09Redirection
4xx29Client error
5xx11Server error

Typed from end to end

One import.
Exact answers.

Literal inputs keep literal outputs, so your editor knows the exact name and message—not just string.

response.tsTypeScript
import { Status, getStatus, isSuccess }
  from 'http-status-lite';

const status = getStatus(404);

status.name; // 'NOT_FOUND'
status.message; // 'Not Found'
isSuccess(Status.NO_CONTENT); // true

Exact generated types

Literal-preserving lookups and unions generated from one reviewable registry.

Safe at the boundary

Parse, validate, assert, and narrow unknown status values at runtime.

Small by design

Import only constants, predicates, or metadata through tree-shakeable entry points.

Standards registry

Find a status code

64 represented entries, sourced from the IANA registry.

Pick the smallest entry point

Use only what you need.

/codes

Constants

Named values and the complete Status object.

OK · NOT_FOUND · Status
/predicates

Classification

Range helpers for any valid HTTP integer.

isSuccess · isError · getCategory
/metadata

Standards data

References, categories, and IANA lifecycle state.

getStatusMetadata
Migrating?

The original httpStatusLite namespace and legacy RFC names remain supported.

Read migration notes