HTTP Status Code enum in TypeScript
npm install tshttpcode

!npm type definitions



npm install -D tshttpcode
`
or
`
yarn add -D tshttpcode
`How to Use
`typescript
import { getHttpStatus, HttpStatus, NOT_FOUND } from 'tshttpcode';NOT_FOUND // { code: 404, name: 'not_found', text: 'Not Found' }
HttpStatus[404] === NOT_FOUND
HttpStatus.not_found === NOT_FOUND
HttpStatus.BAD_STATUS_NAME === undefined // typescript error
getHttpStatus(404) === NOT_FOUND
getHttpStatus('404') === NOT_FOUND
getHttpStatus(9000) === undefined // typescript error
getHttpStatus('NOT_FOUND') === NOT_FOUND
getHttpStatus(' nOt fOuNd ') === NOT_FOUND
``