enum_as_string 1.0.0+2 copy "enum_as_string: ^1.0.0+2" to clipboard
enum_as_string: ^1.0.0+2 copied to clipboard

discontinued
outdated

Utility library for enum-to-string and string-to-enum conversions. Nothing more, nothing less.

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 camelCase to Start Case value conversions.

Usage #

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'
1
likes
150
pub points
3%
popularity

Publisher

unverified uploader

Utility library for enum-to-string and string-to-enum conversions. Nothing more, nothing less.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

More

Packages that depend on enum_as_string