MCPcopy Create free account
hub / github.com/chhoumann/quickadd / frontmatterTitle

Function frontmatterTitle

src/utils/fileSyntax.ts:265–271  ·  view source on GitHub ↗
(frontmatter?: Record<string, unknown>)

Source from the content-addressed store, hash-verified

263}
264
265function frontmatterTitle(frontmatter?: Record<string, unknown>): string | undefined {
266 if (!frontmatter) return undefined;
267 const entry = Object.entries(frontmatter).find(
268 ([key]) => key.toLowerCase() === "title",
269 );
270 return entry ? scalarTitleValue(entry[1]) : undefined;
271}
272
273function firstLevelHeading(metadata?: CachedMetadata | null): string | undefined {
274 const heading = metadata?.headings?.find((entry) => entry.level === 1);

Callers 1

buildFileDisplayInfosFunction · 0.85

Calls 1

scalarTitleValueFunction · 0.85

Tested by

no test coverage detected