Function
isMarkdown
(originalName: string, contentType: string)
Source from the content-addressed store, hash-verified
| 22 | const MARKDOWN_EXTENSIONS = new Set(['md', 'markdown']) |
| 23 | |
| 24 | function 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 | |
| 30 | function safeFilename(name: string): string { |
| 31 | return path |
Tested by
no test coverage detected