tshttpcode
HTTP Status Code enum in TypeScript optimized for tree shaking
Get Started
npm install -D tshttpcode
or
yarn add -D tshttpcode
How to Use
; NOT_FOUND // { code: 404, name: 'not_found', text: 'Not Found' } HttpStatus === NOT_FOUND HttpStatus.not_found === NOT_FOUND HttpStatus.BAD_STATUS_NAME === undefined // typescript error getHttpStatus404 === NOT_FOUND getHttpStatus'404' === NOT_FOUND getHttpStatus9000 === undefined // typescript error getHttpStatus'NOT_FOUND' === NOT_FOUND getHttpStatus' nOt fOuNd ' === NOT_FOUND