MCPcopy
hub / github.com/callumalpass/tasknotes / getFrontmatterFromCache

Method getFrontmatterFromCache

src/utils/TaskManager.ts:434–445  ·  view source on GitHub ↗
(cache: unknown)

Source from the content-addressed store, hash-verified

432 }
433
434 private getFrontmatterFromCache(cache: unknown): Record<string, unknown> | null {
435 if (!cache || typeof cache !== "object" || !("frontmatter" in cache)) {
436 return null;
437 }
438
439 const frontmatter = (cache as { frontmatter?: unknown }).frontmatter;
440 if (!frontmatter || typeof frontmatter !== "object" || Array.isArray(frontmatter)) {
441 return null;
442 }
443
444 return frontmatter as Record<string, unknown>;
445 }
446
447 private getFrontmatterForPath(path: string): Record<string, unknown> | null {
448 const file = this.app.vault.getAbstractFileByPath(path);

Callers 2

getFrontmatterForPathMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected