MCPcopy Create free account
hub / github.com/TanStack/ai / readString

Function readString

examples/ts-react-native-chat/src/server/app.ts:144–148  ·  view source on GitHub ↗
(value: unknown, key: string)

Source from the content-addressed store, hash-verified

142}
143
144function readString(value: unknown, key: string): string {
145 if (!isRecord(value)) return ''
146 const field = value[key]
147 return typeof field === 'string' ? field : ''
148}
149
150function readNumber(value: unknown, key: string): number {
151 if (!isRecord(value)) return 0

Callers 1

app.tsFile · 0.70

Calls 1

isRecordFunction · 0.70

Tested by

no test coverage detected