Skip to content

Value

Official

Container type for data which can expose functions for retrieving, comparing, and rendering the data. Most commonly used in conjunction with formulas for Bases. Values can be used as formula parameters, intermediate values, and the result of evaluation.

Import:

import { Value } from 'obsidian';

Signature:

export class Value

Constructor

new Value()

Constructor.

To extract the constructor type, use ExtractConstructor<Value>.

Properties

PropertyTypeDescription
iconstringThe lucide icon name representing this value's type.
typestring

Methods

MethodReturnsDescription
equals(a, b)boolean
equals(other)booleanReturns a boolean indicating whether this Value is equal to the provided Value.
isTruthy()booleanReturns a boolean indicating whether this Value is truthy.
keys()string[]Returns the property keys accessible on this value via Value.objectAccess.
looseEquals(a, b)boolean
looseEquals(other)booleanReturns a boolean indicating whether this Value is loosely equal to the provided Value.
objectAccess(key)null | ValueAccesses a named sub-property of this value.
renderTo(el, ctx)voidRender this value into the provided HTMLElement.
toString()stringGet the string representation of this Value.

Links to this page: