eslint-plugin-copilot Documentation / _internal/frontmatter / extractFrontmatter
Function: extractFrontmatter()
function extractFrontmatter(text: string): Readonly<{
body: string;
content: string;
fields: ReadonlyMap<string, FrontmatterField>;
}> | null;
Defined in: _internal/frontmatter.ts:343
Extract top-of-file YAML frontmatter when present.
Parametersâ
| Parameter | Type |
|---|---|
text | string |
Returnsâ
| Readonly<{
body: string;
content: string;
fields: ReadonlyMap<string, FrontmatterField>;
}>
| null