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

Function valueToString

examples/ts-react-native-chat/src/App.tsx:119–126  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

117}
118
119function valueToString(value: unknown): string | undefined {
120 if (value === undefined || value === null) return undefined
121 if (typeof value === 'string') return value
122 if (typeof value === 'number' || typeof value === 'boolean') {
123 return String(value)
124 }
125 return formatValue(value)
126}
127
128function itemToString(item: unknown): string | undefined {
129 if (!isRecord(item)) return valueToString(item)

Callers 2

itemToStringFunction · 0.85
RecipeHeroFunction · 0.85

Calls 1

formatValueFunction · 0.70

Tested by

no test coverage detected