Skip to content

RemoveEmptyFrontmatterValuesParams

Parameters for removeEmptyFrontmatterValues.

Import:

import type { RemoveEmptyFrontmatterValuesParams } from 'obsidian-dev-utils/obsidian/frontmatter';

Signature:

export interface RemoveEmptyFrontmatterValuesParams

Properties

PropertyTypeDescription
frontmatterGenericObjectThe front matter object to remove the empty values from. It is modified in place.
shouldRemoveEmptyArrays?booleanWhether to remove arrays that are empty, including the ones that became empty after their own items were removed.
shouldRemoveEmptyObjects?booleanWhether to remove plain objects that are empty, including the ones that became empty after their own properties were removed.
shouldRemoveNulls?booleanWhether to remove null and undefined values. Both are treated the same: they are the two ways a key can be present but carry no value, and undefined cannot survive a YAML round-trip anyway.

Links to this page: