Returns the validated & existing enum "string key" part of a "numeric" enum (the string at left hand side), given either side (the string or number part) of a "numeric" enum.
Features / Notes:
The number part can be given as a number or parseable string number.
The string part can be given the exact string key, or lower, upper or capitalized form of the string. // @todo: make this optional
It should maintain the right types of Enum / Enum keys, eg keyof TEnumType as a string
Returns the validated & existing enum "string key" part of a "numeric" enum (the string at left hand side), given either side (the string or number part) of a "numeric" enum.
Features / Notes:
keyof TEnumType
as a stringSee
z.numberEnumToNumberVal()
for the reverse function@todo: Curry this function, maintain types:
_.curry
, return type is string, instead of keyofTEnumType