parseFrontMatterAliases
Reads a note’s aliases from its frontmatter. Only an aliases key is read, case-insensitively; Obsidian reads no alias fallback.
Import:
import { parseFrontMatterAliases } from 'obsidian-test-mocks/obsidian';Signature:
function parseFrontMatterAliases(frontmatter: unknown): string[] | nullParameters:
| Parameter | Type | Description |
|---|---|---|
frontmatter |
unknown | The parsed frontmatter object, or a falsy value when the note has none. |
Returns: string[] | null — The aliases, each trimmed (a single string becomes a one-element array, non-string list items are dropped, and so is every entry that is empty once trimmed). An entry-less list yields an empty array; null means there is no aliases entry at all, or it is neither a string nor a list.