MCPcopy Index your code
hub / github.com/OpenCoworkAI/open-codesign / optionalNumber

Function optionalNumber

packages/shared/src/editmode.ts:244–248  ·  view source on GitHub ↗
(value: Record<string, unknown>, key: string)

Source from the content-addressed store, hash-verified

242}
243
244function optionalNumber(value: Record<string, unknown>, key: string): number | null | undefined {
245 if (!hasOwn(value, key)) return undefined;
246 const raw = value[key];
247 return typeof raw === 'number' ? raw : null;
248}
249
250function isStringArray(value: unknown[]): value is string[] {
251 return value.every((option) => typeof option === 'string');

Callers 1

validateEntryFunction · 0.85

Calls 1

hasOwnFunction · 0.85

Tested by

no test coverage detected