Skip to content

Enums for JS

Runtime Release Types License Downloads Dependencies Coverage Build

Yet another implementation of enumerated types

This implementation provides an Enum class that gives a set of static methods to ease working with the values of an object literal representing an enumerated type.

For JavaScript users, this class provides a factory method for creating concrete enumerated types.
For TypeScript users, this class provides helper methods for querying the members of an enum.

Quick start

Install the latest version of Enums for JS with npm:

npm install @cedx/enum

Info

This library is packaged as ECMAScript modules.

For detailed instructions, see the installation guide.