MCPcopy
hub / github.com/callstack/agent-device / readRequiredNumber

Function readRequiredNumber

src/utils/parsing.ts:53–60  ·  view source on GitHub ↗
(record: Record<string, unknown>, key: string)

Source from the content-addressed store, hash-verified

51}
52
53export function readRequiredNumber(record: Record<string, unknown>, key: string): number {
54 return readRequired(
55 record,
56 key,
57 parseFiniteNumber,
58 `Daemon response is missing numeric "${key}".`,
59 );
60}
61
62export function readRequiredPlatform(record: Record<string, unknown>, key: string): PublicPlatform {
63 return readRequired(record, key, parsePlatform, `Daemon response has invalid "${key}".`);

Callers 1

normalizeSessionFunction · 0.90

Calls 1

readRequiredFunction · 0.85

Tested by

no test coverage detected