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

Function asRecord

apps/sim/lib/copilot/request/sse-utils.ts:12–13  ·  view source on GitHub ↗
(data: unknown)

Source from the content-addressed store, hash-verified

10
11/** Safely cast event.data to a record for property access. */
12export const asRecord = (data: unknown): Record<string, unknown> =>
13 (data && typeof data === 'object' && !Array.isArray(data) ? data : {}) as Record<string, unknown>
14
15/**
16 * In-memory tool event dedupe with bounded size.

Callers 1

getToolCallUIFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected