https://github.com/muhammad-usman-108/http-status-descriptions
A npm package that provides human-readable descriptions for HTTP status codes.
https://github.com/muhammad-usman-108/http-status-descriptions
api api-response description developer-tools error http http-response http-status-code human-readable status-code
Last synced: 3 months ago
JSON representation
A npm package that provides human-readable descriptions for HTTP status codes.
- Host: GitHub
- URL: https://github.com/muhammad-usman-108/http-status-descriptions
- Owner: muhammad-usman-108
- License: mit
- Created: 2024-06-02T16:48:17.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-03T08:48:05.000Z (about 1 year ago)
- Last Synced: 2024-08-09T09:28:32.218Z (10 months ago)
- Topics: api, api-response, description, developer-tools, error, http, http-response, http-status-code, human-readable, status-code
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/http-status-descriptions
- Size: 16.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/funding.yml
- License: LICENSE
Awesome Lists containing this project
README
# 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
## 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.