MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / objectToZodEnums

Function objectToZodEnums

packages/validation/src/index.ts:14–19  ·  view source on GitHub ↗
(
  obj: Record<K, any>,
)

Source from the content-addressed store, hash-verified

12} from '@openpanel/constants';
13
14export function objectToZodEnums<K extends string>(
15 obj: Record<K, any>,
16): [K, ...K[]] {
17 const [firstKey, ...otherKeys] = Object.keys(obj) as K[];
18 return [firstKey!, ...otherKeys];
19}
20
21export const mapKeys = objectToZodEnums;
22

Callers 5

filter-command.tsFile · 0.90
base.tsFile · 0.90
ReportChartTypeFunction · 0.90
ReportLineTypeFunction · 0.90
index.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected