MCPcopy Create free account
hub / github.com/Devographics/Monorepo / formatNumericOptions

Function formatNumericOptions

api/src/generate/helpers.ts:212–213  ·  view source on GitHub ↗
(options: T[])

Source from the content-addressed store, hash-verified

210}
211
212export const formatNumericOptions = <T extends Option | OptionGroup>(options: T[]) =>
213 options.map(option => ({ ...option, id: `value_${option.id}` }))
214
215// convert an option back into a number
216export const convertNumericOption = (value: string) => Number(value.replace('value_', ''))

Callers 1

generateEnumTypeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected