ObjectValue
Official
Value wrapping an object.
Import:
import { ObjectValue } from 'obsidian';Signature:
export class ObjectValue extends NotNullValueExtends: NotNullValue
Constructor
new ObjectValue(data: unknown)Constructor.
To get the constructor instance, use getObjectValueConstructor from obsidian-typings/implementations.
Properties
| Property | Type | Description | |
|---|---|---|---|
| data | Record<string, unknown> | The wrapped object. Values are lazily wrapped into Values on access. | |
| icon | string | The lucide icon name representing this value's type. (Inherited from NotNullValue) | |
| type | string |
Methods
| Method | Returns | Description | |
|---|---|---|---|
| equals(a, b) | boolean | (Inherited from NotNullValue) | |
| equals(other) | boolean | Returns a boolean indicating whether this Value is equal to the provided Value. (Inherited from NotNullValue) | |
| get(key) | Value | null | Get the Value associated with the provided key, or NullValue. If the referenced property in the object is not a Value, it will be wrapped before returning. | |
| getInsensitive(key) | Value | Gets the Value for a key, matched case-insensitively. | |
| isEmpty() | boolean | Returns a boolean indicating whether this obsidian#ObjectValue is empty. | |
| isTruthy() | boolean | Returns a boolean indicating whether this obsidian#ObjectValue is truthy. | |
| keys() | string[] | Returns the property keys accessible on this value via Value.objectAccess. (Inherited from NotNullValue) | |
| lazyEvaluator(key, raw) | Value | Wraps a raw property value into a Value. | |
| looseEquals(a, b) | boolean | (Inherited from NotNullValue) | |
| looseEquals(other) | boolean | Returns a boolean indicating whether this Value is loosely equal to the provided Value. (Inherited from NotNullValue) | |
| objectAccess(key) | null | Value | Accesses a named sub-property of this value. (Inherited from NotNullValue) | |
| renderTo(el, ctx) | void | Render this value into the provided HTMLElement. (Inherited from NotNullValue) | |
| toString() | string | Get the string representation of this obsidian#ObjectValue. | |
| valuesRaw() | unknown[] | Returns the raw (unwrapped) values of the object's properties. |
Links to this page: