import { default } from "https://deno.land/x/enum@v3.0.4/lib/enum.js";
Represents an Enum with enum items.
Methods
extend(map)
Extends the existing Enum with a New Map.
Define freezeEnums() as a property of the prototype. make enumerable items nonconfigurable and deep freeze the properties. Throw Error on property setter.
get(key, offset)
Returns the appropriate EnumItem.
getKey(value)
Returns the appropriate EnumItem key.
getValue(key)
Returns the appropriate EnumItem value.
isDefined(enumItem)
Return true whether the enumItem parameter passed in is an EnumItem object and has been included as constant of this Enum
set()
buffer,
offset,
value,
Sets the Enum "value" onto the give buffer
at the specified offset
.
Part of the ref "Type interface".
toJSON()
Returns JSON object representation of this Enum.
Static Methods
register(key?)
Registers the Enum Type globally in node.js.