Package Exports
- @normality/status-code
- @normality/status-code/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@normality/status-code) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
StatusCode
Enums and utilities around status codes.
Requirements
node >= 8.6, tested with:node@8.6.0node@12.8.1typescript >= 4.0, tested with:typescript@4.0.2
Installation
npm i @normality/status-code
Usage
import { StatusCode, isStatusCode, is5xx } from '@normality/status-code';
StatusCode.OK; // 200
isStatusCode(200); // true
is5xx(StatusCode.INTERNAL_SERVER_ERROR); // true