MCPcopy
hub / github.com/ComposioHQ/composio / parse

Function parse

docs/lib/toolkit-data.ts:18–30  ·  view source on GitHub ↗
(data: string)

Source from the content-addressed store, hash-verified

16}
17
18function parse(data: string): Toolkit[] {
19 const toolkits = JSON.parse(data) as Toolkit[];
20
21 if (!Array.isArray(toolkits)) {
22 throw new Error('toolkits.json must contain an array');
23 }
24
25 if (toolkits.length === 0) {
26 console.warn('[Toolkits] Warning: toolkits.json is empty');
27 }
28
29 return toolkits;
30}
31
32export async function getAllToolkits(): Promise<Toolkit[]> {
33 if (cached) return cached.list;

Callers 4

getAllToolkitsFunction · 0.70
getToolkitBySlugFunction · 0.70
getAllToolkitsSyncFunction · 0.70
parseJsonFunction · 0.50

Calls 2

warnMethod · 0.65
parseMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…