commonenums
v2.0.1
Published
This npm package offers a comprehensive set of enums to streamline development across various domains, categorized into exhausted, suggested, and expected types. It enhances code readability and maintenance by providing standard, extendable, and universal
Downloads
8
Readme
CommonEnums
CommonEnums is a collection of useful enums for various common scenarios, such as HTTP status codes, HTTP methods, languages, and more. It aims to provide developers with a convenient way to use enums in their projects without having to define them from scratch.
Installation
You can install CommonEnums via npm: npm install commonenums
Usage
HTTP Status Codes
import { HttpStatus } from "commonenums";
console.log(HttpStatus.OK); // Output: 200
HTTP Methods
import { HttpMethod } from "commonenums";
console.log(HttpMethod.GET); // Output: GET
Languages
import { Languages } from "commonenums";
console.log(Languages.English); // Output: en
Included enums
All enums should be listed here: enums.md.
Support
If you like this project, please consider supporting me by buying me a coffee.