MCPcopy Create free account
hub / github.com/apitable/apitable / enumToArray

Function enumToArray

packages/core/src/model/field/validate_schema/index.ts:47–50  ·  view source on GitHub ↗
(en: Object)

Source from the content-addressed store, hash-verified

45const stringIsNumber = (value: string) => isNaN(Number(value)) === false;
46
47export function enumToArray(en: Object) {
48 const keys = Object.keys(en).filter(k => !stringIsNumber(k));
49 return keys.map(k => en[k]);
50}
51
52export function enumKeyToArray(en: Object) {
53 return Object.keys(en);

Callers 15

validateConditionSchemaFunction · 0.90
parseConditionGroupFunction · 0.90
CreatedTimeFieldClass · 0.90
NumberFieldClass · 0.90
CurrencyFieldClass · 0.90
DateTimeFieldClass · 0.90
filterInfoSchemaFunction · 0.90
apiFilterInfoSchemaFunction · 0.90
LookUpFieldClass · 0.90

Calls 4

stringIsNumberFunction · 0.85
keysMethod · 0.65
filterMethod · 0.45
mapMethod · 0.45

Tested by

no test coverage detected