http-status-descriptions
Version:
A npm package that provides human-readable descriptions for HTTP status codes.
79 lines (46 loc) • 2.41 kB
Markdown
# http-status-descriptions
[](https://badge.fury.io/js/http-status-descriptions) [](https://github.com/muhammad-usman-108) [](https://github.com/muhammad-usman-108/http-status-descriptions/stargazers)   [](https://github.com/muhammad-usman-108/http-status-descriptions/blob/main/LICENSE)
A npm package that provides human-readable descriptions for HTTP status codes.
## Installation
You can install this package using npm or yarn.
### npm
```npm i http-status-descriptions```
### yarn
```yarn add http-status-descriptions```
## Usage
Here is a simple example to get you started:
```typescript
import { getStatusDescription } from 'http-status-descriptions';
const description = getStatusDescription(200);
console.log(description);
// Output: OK: The request was successful.
```
## Scripts
### Build
To compile the TypeScript files to JavaScript, run:
```npm run build```
### Test
To run tests, use:
```npm run test```
## Configuration
### TypeScript Configuration
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"
},
}
```
## Contributing
- [Muhammad Usman](https://github.com/muhammad-usman-108)
## Support
<p><a href="https://buymeacoffee.com/engrmuhammk"> <img align="left" src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" height="50" width="210" alt="engrmuhammk" /></a></p><br><br>
## LICENSE
This project is licensed under the MIT License - see the [LICENSE](https://github.com/muhammad-usman-108/http-status-descriptions/blob/main/LICENSE) file for details.