A npm package that provides human-readable descriptions for HTTP status codes.
You can install this package using npm or yarn.
npm i http-status-descriptions
yarn add http-status-descriptions
Here is a simple example to get you started:
import { getStatusDescription } from 'http-status-descriptions';
const description = getStatusDescription(200);
console.log(description);
// Output: OK: The request was successful.
To compile the TypeScript files to JavaScript, run:
npm run build
To run tests, use:
npm run test
This package uses a tsconfig.json
file for TypeScript configuration. Here is an example:
{
"compilerOptions": {
"target": "ES6",
"module": "commonjs",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"outDir": "./dist"
},
}
This project is licensed under the MIT License - see the LICENSE file for details.