http-status-code-const-enum

Basic const enum declaration for HTTP status codes

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
http-status-code-const-enum
001.0.25 years ago6 years agoMinified + gzip package size for http-status-code-const-enum in KB

Readme

Say no to typos. npm install -d http-status-code-const-enum Basic usage: ```typescript import {Request, Response} from 'express'; import {HttpStatusCode} from 'http-status-code-const-enum'; function myHandler(req: Request, res: Response) { res.status(HttpStatusCode.NOCONTENT)
.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.