MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / markdownFilesFromDrop

Function markdownFilesFromDrop

packages/app-core/src/lib/markdown-file-drop.ts:32–35  ·  view source on GitHub ↗
(dataTransfer: DataTransfer | null)

Source from the content-addressed store, hash-verified

30
31/** Dropped files whose name ends in `.md` / `.markdown`. */
32export 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
37export interface MarkdownFileDropDeps {
38 /** Handle the markdown files dropped onto the window. */

Callers 2

onDropFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected