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

Function formatComponents

src/formatter.ts:241–259  ·  view source on GitHub ↗
(result: ScanResult)

Source from the content-addressed store, hash-verified

239}
240
241function formatComponents(result: ScanResult): string {
242 const lines: string[] = ["# Components", ""];
243
244 for (const comp of result.components) {
245 const markers: string[] = [];
246 if (comp.isClient) markers.push("client");
247 if (comp.isServer) markers.push("server");
248 const markerStr = markers.length > 0 ? ` [${markers.join(", ")}]` : "";
249
250 if (comp.props.length > 0) {
251 lines.push(`- **${comp.name}**${markerStr} — props: ${comp.props.join(", ")} — \`${comp.file}\``);
252 } else {
253 lines.push(`- **${comp.name}**${markerStr} — \`${comp.file}\``);
254 }
255 }
256
257 lines.push("");
258 return lines.join("\n");
259}
260
261function formatLibs(result: ScanResult): string {
262 const lines: string[] = ["# Libraries", ""];

Callers 1

writeOutputFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected