@inrupt/solid-client

Globals / “thing/set”

Module: “thing/set”

Functions

setBoolean

ConstsetBoolean(thing: T, property: string | Url, value: boolean): T

Defined in src/thing/set.ts:84

Create a new Thing with existing values replaced by the given boolean for the given Property.

To preserve existing values, see addBoolean.

The original thing is not modified; this function returns a cloned Thing with updated values.

Parameters:

Name

Type

Description

thing

T

Thing to set a boolean value on.

property

string | Url

Property for which to set the given boolean value.

value

boolean

Boolean to set on thing for the given property.

Returns: T

A new Thing equal to the input Thing with existing values replaced by the given value for the given Property.


setDatetime

ConstsetDatetime(thing: T, property: string | Url, value: Date): T

Defined in src/thing/set.ts:106

Create a new Thing with existing values replaced by the given datetime for the given Property.

To preserve existing values, see addDatetime.

The original thing is not modified; this function returns a cloned Thing with updated values.

Parameters:

Name

Type

Description

thing

T

Thing to set an datetime value on.

property

string | Url

Property for which to set the given datetime value.

value

Date

Datetime to set on thing for the given property.

Returns: T

A new Thing equal to the input Thing with existing values replaced by the given value for the given Property.


setDecimal

ConstsetDecimal(thing: T, property: string | Url, value: number): T

Defined in src/thing/set.ts:128

Create a new Thing with existing values replaced by the given decimal for the given Property.

To preserve existing values, see addDecimal.

The original thing is not modified; this function returns a cloned Thing with updated values.

Parameters:

Name

Type

Description

thing

T

Thing to set a decimal value on.

property

string | Url

Property for which to set the given decimal value.

value

number

Decimal to set on thing for the given property.

Returns: T

A new Thing equal to the input Thing with existing values replaced by the given value for the given Property.


setInteger

ConstsetInteger(thing: T, property: string | Url, value: number): T

Defined in src/thing/set.ts:150

Create a new Thing with existing values replaced by the given integer for the given Property.

To preserve existing values, see addInteger.

The original thing is not modified; this function returns a cloned Thing with updated values.

Parameters:

Name

Type

Description

thing

T

Thing to set an integer value on.

property

string | Url

Property for which to set the given integer value.

value

number

Integer to set on thing for the given property.

Returns: T

A new Thing equal to the input Thing with existing values replaced by the given value for the given Property.


setStringNoLocale

ConstsetStringNoLocale(thing: T, property: string | Url, value: string): T

Defined in src/thing/set.ts:196

Create a new Thing with existing values replaced by the given unlocalised string for the given Property.

To preserve existing values, see addStringNoLocale.

The original thing is not modified; this function returns a cloned Thing with updated values.

Parameters:

Name

Type

Description

thing

T

Thing to set an unlocalised string value on.

property

string | Url

Property for which to set the given unlocalised string value.

value

string

Unlocalised string to set on thing for the given property.

Returns: T

A new Thing equal to the input Thing with existing values replaced by the given value for the given Property.


setStringWithLocale

setStringWithLocale<T>(thing: T, property: Url | UrlString, value: string, locale: string): T

Defined in src/thing/set.ts:173

Create a new Thing with existing values replaced by the given localised string for the given Property.

To preserve existing values, see addStringWithLocale.

The original thing is not modified; this function returns a cloned Thing with updated values.

Type parameters:

Name

Type

T

Thing

Parameters:

Name

Type

Description

thing

T

Thing to set a localised string value on.

property

Url | UrlString

Property for which to set the given localised string value.

value

string

Localised string to set on thing for the given property.

locale

string

Locale of the added string.

Returns: T

A new Thing equal to the input Thing with existing values replaced by the given value for the given Property.


setUrl

ConstsetUrl(thing: T, property: string | Url, url: string | Url | DatasetCore<Quad, Quad> & { internal_url: UrlString } | DatasetCore<Quad, Quad> & { internal_localSubject: LocalNode }): T

Defined in src/thing/set.ts:50

Create a new Thing with existing values replaced by the given URL for the given Property.

To preserve existing values, see addUrl.

The original thing is not modified; this function returns a cloned Thing with updated values.

Parameters:

Name

Type

Description

thing

T

Thing to set a URL value on.

property

string | Url

Property for which to set the given URL value.

url

string | Url | DatasetCore<Quad, Quad> & { internal_url: UrlString } | DatasetCore<Quad, Quad> & { internal_localSubject: LocalNode }

URL to set on thing for the given property.

Returns: T

A new Thing equal to the input Thing with existing values replaced by the given value for the given Property.