Closed hufftheweevil closed 3 months ago
Any suggestions for a more descriptive prop? dictionary
lookup
lookupMap
?
enumMap
perhaps?
I was thinking though, maybe it's enough to just include the keys? Like
return {
...
enum: ...,
enumKeys: actualKeys
}
They should be in the same order making it possible to construct it on the other end.
Object.fromEntries(schema.enum((value, index) => [schema.enumKeys[index], value]))
Great simple library!
Any interest in adding a
dict
property tonativeEnum
types?