MCPcopy Create free account
hub / github.com/tiann/hapi / asRecord

Function asRecord

hub/src/sync/syncEngine.ts:80–84  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

78 | { type: 'error'; message: string; code: 'session_not_found' | 'access_denied' | 'already_local' | 'handoff_failed' }
79
80function asRecord(value: unknown): Record<string, unknown> | null {
81 return value !== null && typeof value === 'object' && !Array.isArray(value)
82 ? value as Record<string, unknown>
83 : null
84}
85
86function normalizeUserMessageText(value: string): string | undefined {
87 const text = value.trim().replace(/\s+/g, ' ')

Calls

no outgoing calls

Tested by

no test coverage detected