1.0.2 • Published 5 years ago

http-status-code-const-enum v1.0.2

Weekly downloads
102
License
MIT
Repository
github
Last release
5 years ago

Say no to typos.

npm install -d http-status-code-const-enum

Basic usage:

import {Request, Response} from 'express';
import {HttpStatusCode} from 'http-status-code-const-enum';

function myHandler(req: Request, res: Response) {
  res.status(HttpStatusCode.NO_CONTENT)
    .end();
}

Please note that this is a const enum, meaning it cannot be used in a pure JavaScript environment and is therefore only suited for TypeScript.