(dataTransfer: DataTransfer | null)
| 30 | |
| 31 | /** Dropped files whose name ends in `.md` / `.markdown`. */ |
| 32 | export function markdownFilesFromDrop(dataTransfer: DataTransfer | null): File[] { |
| 33 | if (!dataTransfer) return [] |
| 34 | return Array.from(dataTransfer.files).filter((file) => MARKDOWN_NAME_RE.test(file.name)) |
| 35 | } |
| 36 | |
| 37 | export interface MarkdownFileDropDeps { |
| 38 | /** Handle the markdown files dropped onto the window. */ |
no outgoing calls
no test coverage detected