Skip to content

checkPropertyEntryMatches

Checks whether a note’s frontmatter matches a property:name or property:name=value entry.

A value is compared by its rendering, since frontmatter values are whatever YAML produced, and an array matches when any of its items does, which is how tag-like properties read. An entry without the PROPERTY_ENTRY_PREFIX matches nothing.

Import:

import { checkPropertyEntryMatches } from 'obsidian-dev-utils/obsidian/property-entry';

Signature:

function checkPropertyEntryMatches(params: CheckPropertyEntryMatchesParams): boolean

Parameters:

Parameter Type Description
params CheckPropertyEntryMatchesParams The entry and the frontmatter to match it against.

Returns: boolean — Whether the frontmatter matches the entry.


Links to this page: