MCPcopy Create free account
hub / github.com/FlowiseAI/Flowise / tryJsonStringify

Function tryJsonStringify

packages/components/src/handler.ts:192–198  ·  view source on GitHub ↗
(obj: unknown, fallback: string)

Source from the content-addressed store, hash-verified

190}
191
192export function tryJsonStringify(obj: unknown, fallback: string) {
193 try {
194 return JSON.stringify(obj, null, tryGetJsonSpaces())
195 } catch (err) {
196 return fallback
197 }
198}
199
200export function elapsed(run: Run): string {
201 if (!run.end_time) return ''

Callers 15

onChainStartMethod · 0.90
onChainEndMethod · 0.90
onChainErrorMethod · 0.90
onLLMStartMethod · 0.90
onLLMEndMethod · 0.90
onLLMErrorMethod · 0.90
onToolErrorMethod · 0.90
onAgentActionMethod · 0.90
onChainStartMethod · 0.85
onChainEndMethod · 0.85
onChainErrorMethod · 0.85
onLLMStartMethod · 0.85

Calls 2

tryGetJsonSpacesFunction · 0.85
stringifyMethod · 0.80

Tested by

no test coverage detected