getFrontmatterSafe<CustomFrontmatter = unknown>
Retrieves the front matter from the metadata cache safely.
Import:
import { getFrontmatterSafe } from 'obsidian-dev-utils/obsidian/metadata-cache';Signature:
function getFrontmatterSafe(app: App, pathOrFile: PathOrFile): Promise<CombinedFrontmatter<CustomFrontmatter>>Parameters:
| Parameter | Type | Description |
|---|---|---|
app | App | The Obsidian app instance. |
pathOrFile | PathOrFile | The path or file to retrieve the front matter from. |
Returns: Promise<CombinedFrontmatter<CustomFrontmatter>> — The combined front matter.