MCPcopy
hub / github.com/vercel/streamdown / Markdown

Function Markdown

packages/streamdown/lib/markdown.ts:186–192  ·  view source on GitHub ↗
(options: Readonly<Options>)

Source from the content-addressed store, hash-verified

184const processorCache = new ProcessorCache();
185
186export const Markdown = (options: Readonly<Options>) => {
187 const processor = getCachedProcessor(options);
188 const content = options.children || "";
189 // biome-ignore lint/suspicious/noExplicitAny: runSync return type varies with processor configuration
190 const tree = processor.runSync(processor.parse(content), content) as any;
191 return post(tree, options);
192};
193
194const getCachedProcessor = (options: Readonly<Options>) => {
195 // Try to get from cache first

Calls 2

getCachedProcessorFunction · 0.85
postFunction · 0.85

Tested by 1

WrapperFunction · 0.72