MCPcopy Create free account
hub / github.com/Houseofmvps/codesight / extractStringArray

Function extractStringArray

src/config.ts:86–91  ·  view source on GitHub ↗
(field: string)

Source from the content-addressed store, hash-verified

84 return m ? m[1] === "true" : undefined;
85 }
86 function extractStringArray(field: string): string[] | undefined {
87 const m = body.match(new RegExp(`\\b${field}\\s*:\\s*\\[([^\\]]*?)\\]`));
88 if (!m) return undefined;
89 const items = m[1].match(/['"`]([^'"`]*?)['"`]/g);
90 return items ? items.map((s) => s.slice(1, -1)) : [];
91 }
92
93 const maxDepth = extractNumber("maxDepth");
94 if (maxDepth !== undefined) config.maxDepth = maxDepth;

Callers 1

safeParseConfigTextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected