MCPcopy Create free account
hub / github.com/SensAI-PT/RAGMeUp / safeParseJSON

Function safeParseJSON

ui/node-react/client/src/components/ChatView.js:88–96  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

86 }, [chatId]);
87
88 function safeParseJSON(str) {
89 if (!str) return [];
90 if (typeof str === 'object') return str;
91 try {
92 return JSON.parse(str);
93 } catch {
94 return [];
95 }
96 }
97
98 const handleSend = async () => {
99 const query = input.trim();

Callers 1

ChatView.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected