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

Property Type Description
icon string The lucide icon name representing this value's type.
type string

Methods

Method Returns Description
equals(a, b) boolean
equals(other) boolean Returns a boolean indicating whether this Value is equal to the provided Value.
isTruthy() boolean Returns 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) boolean Returns a boolean indicating whether this Value is loosely equal to the provided Value.
objectAccess(key) null | Value Accesses a named sub-property of this value.
renderTo(el, ctx) void Render this value into the provided HTMLElement.
toString() string Get the string representation of this Value.

Links to this page: