@normality/status-code
TypeScript icon, indicating that this package has built-in type declarations

4.0.4 • Public • Published

StatusCode

npm npm npm

Enums and utilities around status codes.

Requirements

  • node >= 8.6, tested with:
  • node@8.6.0
  • node@12.8.1
  • typescript >= 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

Package Sidebar

Install

npm i @normality/status-code

Weekly Downloads

1

Version

4.0.4

License

MIT

Unpacked Size

152 kB

Total Files

33

Last publish

Collaborators

  • sylvainestevez