@bluejay/status-code
v4.0.2
Published
HTTP status codes utility.
Downloads
2,226
Readme
StatusCode
Enums and utilities around status codes.
Requirements
node >= 8.6
, tested with:[email protected]
[email protected]
typescript >= 4.0
, tested with:[email protected]
Installation
npm i @bluejay/status-code
Usage
import { StatusCode, isStatusCode, is5xx } from '@bluejay/status-code';
StatusCode.OK; // 200
isStatusCode(200); // true
is5xx(StatusCode.INTERNAL_SERVER_ERROR); // true
Documentation
See Github Pages.