TypeScript Enum Utilities

JSON →
library 4.1.0 ·javascript
verified May 27, 2026

ts-enum-util is a strictly typed utility library designed to enhance the usability and safety of TypeScript enums, as well as string and number literal union types. It provides two core functionalities: Enum Wrapper Utilities and Enum Value Visitor/Mapper. The Enum Wrapper offers type-safe methods for runtime inspection and manipulation of enums, such as retrieving keys, values, performing lookups with validation, and treating enums like arrays or maps. The Value Visitor/Mapper implements a visitor pattern, forcing exhaustive handling of all possible enum or literal union values, similar to a comprehensive switch statement, which helps prevent bugs from unhandled cases. The library is actively maintained, with the current stable version being 4.1.0, and new features or bug fixes are regularly released. Its key differentiators include strong compile-time type safety for enum operations and the exhaustive visitor pattern for robust code.

total hits 15
actors 5 distinct systems
last hit 2d ago MJ12bot
GPTBot
5
MetaBot
4
Script
1

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany · 🇳🇴 Norway · 🇫🇷 France