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

Function parseTimestamp

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

Source from the content-addressed store, hash-verified

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);
287 if (isoMatch) return isoMatch[0];
288 const androidMatch = /\b\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d+\b/.exec(line);
289 return androidMatch?.[0];
290}
291
292function parseAndroidPacketId(line: string): string | null {
293 const match = /\bpacket id (\d+)\b/i.exec(line);

Callers 2

parseNetworkLineFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…