Tiny, simple utility package for enum-to-string and string-to-enum conversions
This package was originally a fork of enum_to_string by Ryan Knell (rknell). Most code has been rewritten, and large parts of it removed as they were deemed unnecessary, such as string-to-enum-list and
Start Case value conversions.
Conversion of an enumerator value to a string (enum-to-string):
Enum.asString(Direction.up); // Returns 'up'
Conversion of a string to an enumerator value (string-to-enum):
Enum.fromString(Countries.values, 'elSalvador'); // Returns 'Countries.elSalvador'
- Utility library for enum-to-string and string-to-enum conversions