MCPcopy
hub / github.com/simstudioai/sim / isMarkdown

Function isMarkdown

apps/sim/app/api/files/export/[id]/route.ts:24–28  ·  view source on GitHub ↗
(originalName: string, contentType: string)

Source from the content-addressed store, hash-verified

22const MARKDOWN_EXTENSIONS = new Set(['md', 'markdown'])
23
24function isMarkdown(originalName: string, contentType: string): boolean {
25 if (MARKDOWN_MIME_TYPES.has(contentType)) return true
26 const ext = originalName.split('.').pop()?.toLowerCase() ?? ''
27 return MARKDOWN_EXTENSIONS.has(ext)
28}
29
30function safeFilename(name: string): string {
31 return path

Callers 1

route.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected