Home
This is the documentation home for Enumerate, a library for creating custom enumerations in Roblox Lua:
enumerate("Sport", { "Basketball", "Baseball", "Hockey", })
Enumerations created by Enumerate have a few advantages over simple tables:
- Read-only -> erroring on modification attempts
- Catch typos -> erroring when accessing invalid enum values
- Raw value support -> allowing for testing membership and using values directly
- Debugging friendly -> useful
tostring
implementations for enumerations and their values - Reduced boilerplate -> simple string enums can be created with a list-like table syntax
Jump over to the API Reference to learn more!