MCPcopy Index your code
hub / github.com/simstudioai/sim / parseJsonLine

Function parseJsonLine

apps/sim/executor/handlers/pi/events.ts:152–160  ·  view source on GitHub ↗
(line: string)

Source from the content-addressed store, hash-verified

150
151/** Parses one `pi --mode json` stdout line into a {@link PiEvent}. */
152export function parseJsonLine(line: string): PiEvent | null {
153 const trimmed = line.trim()
154 if (!trimmed) return null
155 try {
156 return normalizePiEvent(JSON.parse(trimmed))
157 } catch {
158 return null
159 }
160}

Callers 3

events.test.tsFile · 0.90
handleChunkFunction · 0.90
runCloudPiFunction · 0.90

Calls 2

normalizePiEventFunction · 0.85
parseMethod · 0.80

Tested by

no test coverage detected