MCPcopy Create free account
hub / github.com/dailydotdev/apps / formatSource

Function formatSource

packages/webapp/pages/api/md/sources.ts:18–24  ·  view source on GitHub ↗
(source: Source)

Source from the content-addressed store, hash-verified

16const llmsTxtUrl = getLlmsTxtUrl();
17
18const formatSource = (source: Source): string => {
19 const name = escapeMarkdown(source.name);
20 const description = source.description
21 ? `: ${escapeMarkdown(source.description)}`
22 : '';
23 return `- [${name}](/sources/${source.handle})${description}`;
24};
25
26const handler = async (
27 req: NextApiRequest,

Callers

nothing calls this directly

Calls 1

escapeMarkdownFunction · 0.90

Tested by

no test coverage detected