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

PropertyTypeDescription
datastringThe wrapped primitive value.
(Inherited from PrimitiveValue)
iconstringThe lucide icon name representing this value's type.
(Inherited from PrimitiveValue)
typestring

Methods

MethodReturnsDescription
equals(a, b)boolean
(Inherited from PrimitiveValue)
equals(other)booleanReturns a boolean indicating whether this Value is equal to the provided Value.
(Inherited from PrimitiveValue)
isTruthy()booleanReturns 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)booleanReturns a boolean indicating whether this Value is loosely equal to the provided Value.
(Inherited from PrimitiveValue)
objectAccess(key)null | ValueAccesses a named sub-property of this value.
(Inherited from PrimitiveValue)
renderTo(el, ctx)voidRender this value into the provided HTMLElement.
(Inherited from PrimitiveValue)
toString()stringGet the string representation of this obsidian#PrimitiveValue.
(Inherited from PrimitiveValue)

Links to this page: