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

Function parseStatusCode

src/daemon/network-log.ts:275–283  ·  view source on GitHub ↗
(line: string)

Source from the content-addressed store, hash-verified

273}
274
275function parseStatusCode(line: string): number | null {
276 for (const pattern of STATUS_PATTERNS) {
277 const match = pattern.exec(line);
278 if (!match) continue;
279 const value = Number.parseInt(match[1] ?? '', 10);
280 if (Number.isInteger(value)) return value;
281 }
282 return null;
283}
284
285function parseTimestamp(line: string): string | undefined {
286 const isoMatch = /\b\d{4}-\d{2}-\d{2}[ T]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z)?\b/.exec(line);

Callers 2

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…