This package has been deprecated

Author message:

Package functionality moved to @kangojs/core

@kangojs/http-status-codes
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

@kangojs/http-status-codes

Provides an enum for HTTP status codes.

🤔 About

This package provides a single enum (HTTPStatusCodes) that maps human-readable names to status codes... that's all.

This package was created specifically for KangoJS with the intention of reducing third party dependencies.
Obviously there are already many npm packages that offer this exact functionality perfectly fine such as http-status-codes which would be a better fit for general use.

🚀 Getting Started

Install the npm package:

npm install @kangojs/http-status-codes

👷 Usage

Simply import the package and use the enum where it's needed:

import { HTTPStatusCodes } from '@kangojs/http-status-codes';

// will output 404
console.log(HTTPStatusCodes.NOT_FOUND)

// will output 503
console.log(HTTPStatusCodes.SERVICE_UNAVAILABLE)

NOTE: This is purposefully not an exhaustive list at the moment, it's just the ones I've found myself actually needing.

🧰 Other KangoJS Packages

For all available KangoJS packages check out this list.

💬 Feedback & Contributions

I'm open to feedback and contributions. Feel free to raise an issue or suggest improvements and features.

📝 License

This project is licensed under the terms of the MIT license.

Package Sidebar

Install

npm i @kangojs/http-status-codes

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

5.35 kB

Total Files

5

Last publish

Collaborators

  • ben-ryder