Skip to content

muhammad-usman-108/http-status-descriptions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

http-status-descriptions

npm version created by star size npm downloads 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:

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

Support

engrmuhammk



LICENSE

This project is licensed under the MIT License - see the LICENSE file for details.