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

Function parseRawRecipe

examples/ts-react-native-chat/src/App.tsx:174–183  ·  view source on GitHub ↗
(raw: string | undefined)

Source from the content-addressed store, hash-verified

172}
173
174function parseRawRecipe(raw: string | undefined): RecipeValue | undefined {
175 if (!raw) return undefined
176
177 try {
178 const parsed = JSON.parse(raw)
179 return isRecord(parsed) ? parsed : undefined
180 } catch {
181 return undefined
182 }
183}
184
185function getRecipeSource(part?: StructuredRecipePart): RecipeValue | undefined {
186 if (!part) return undefined

Callers 1

getRecipeSourceFunction · 0.85

Calls 2

parseMethod · 0.80
isRecordFunction · 0.70

Tested by

no test coverage detected