MCPcopy Create free account
hub / github.com/callstack/agent-device / readJsonString

Function readJsonString

src/daemon/network-log.ts:318–327  ·  view source on GitHub ↗
(value: Record<string, unknown> | null, keys: string[])

Source from the content-addressed store, hash-verified

316}
317
318function readJsonString(value: Record<string, unknown> | null, keys: string[]): string | undefined {
319 if (!value) return undefined;
320 for (const key of keys) {
321 const next = value[key];
322 if (typeof next === 'string' && next.trim().length > 0) {
323 return next.trim();
324 }
325 }
326 return undefined;
327}
328
329function readJsonNumber(value: Record<string, unknown> | null, keys: string[]): number | null {
330 if (!value) return null;

Callers 1

parseNetworkLineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…