Skip to content

StringValue

Official

Value wrapping a string.

Import:

import { StringValue } from 'obsidian';

Signature:

export class StringValue extends PrimitiveValue<string>

Extends: PrimitiveValue<string>

Constructor

new StringValue(value: string)

Constructor.

To get the constructor instance, use getStringValueConstructor from obsidian-typings/implementations.

Properties

Property Type Description
data string The wrapped primitive value.
(Inherited from PrimitiveValue)
icon string The lucide icon name representing this value's type.
(Inherited from PrimitiveValue)
type string

Methods

Method Returns Description
equals(a, b) boolean
(Inherited from PrimitiveValue)
equals(other) boolean Returns a boolean indicating whether this Value is equal to the provided Value.
(Inherited from PrimitiveValue)
isTruthy() boolean Returns a boolean indicating whether this obsidian#PrimitiveValue is truthy.
(Inherited from PrimitiveValue)
keys() string[] Returns the property keys accessible on this value via Value.objectAccess.
(Inherited from PrimitiveValue)
looseEquals(a, b) boolean
(Inherited from PrimitiveValue)
looseEquals(other) boolean Returns a boolean indicating whether this Value is loosely equal to the provided Value.
(Inherited from PrimitiveValue)
objectAccess(key) null | Value Accesses a named sub-property of this value.
(Inherited from PrimitiveValue)
renderTo(el, ctx) void Render this value into the provided HTMLElement.
(Inherited from PrimitiveValue)
toString() string Get the string representation of this obsidian#PrimitiveValue.
(Inherited from PrimitiveValue)

Links to this page: