checkIsPlainObject
Checks whether the value is a plain object, i.e. an object literal rather than an array or a class instance.
parseYaml() turns a YAML timestamp into a Date, which has no own enumerable properties, so a plain typeof value === 'object' test would report every date as an empty object.
Import:
import { checkIsPlainObject } from 'obsidian-dev-utils/obsidian/frontmatter';Signature:
function checkIsPlainObject(value: unknown): booleanParameters:
| Parameter | Type | Description |
|---|---|---|
value |
unknown | The value to check. |
Returns: boolean — Whether the value is a plain object.