MCPcopy Create free account
hub / github.com/backnotprop/plannotator / getSourceSaveLanguage

Function getSourceSaveLanguage

packages/shared/source-save.ts:102–108  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

100}
101
102export function getSourceSaveLanguage(filePath: string): SourceSaveLanguage | null {
103 const lower = filePath.toLowerCase();
104 if (lower.endsWith(".mdx")) return "mdx";
105 if (lower.endsWith(".md")) return "markdown";
106 if (lower.endsWith(".txt")) return "text";
107 return null;
108}
109
110export function basenameFromPath(filePath: string): string {
111 const normalized = filePath.replace(/\\/g, "/");

Callers 1

enabledSourceSaveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected