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

Function asRecord

cli/src/codex/utils/codexEventConverter.ts:47–52  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

45};
46
47function asRecord(value: unknown): Record<string, unknown> | null {
48 if (!value || typeof value !== 'object') {
49 return null;
50 }
51 return value as Record<string, unknown>;
52}
53
54function asString(value: unknown): string | null {
55 return typeof value === 'string' && value.length > 0 ? value : null;

Callers 2

extractCodexTextFunction · 0.70
convertCodexEventFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected