@inrupt/solid-client / thing/set
Module: thing/set¶
Table of contents¶
Functions¶
setBoolean¶
▸ Const
setBoolean<T>(thing
: T, property
: string | Url, value
: boolean): T
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 |
---|---|---|
|
T |
Thing to set a boolean value on. |
|
string | Url |
Property for which to set the given boolean value. |
|
boolean |
Boolean to set on |
Returns: T
A new Thing equal to the input Thing with existing values replaced by the given value for the given Property.
Defined in: src/thing/set.ts:97
setDatetime¶
▸ Const
setDatetime<T>(thing
: T, property
: string | Url, value
: Date): T
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 |
---|---|---|
|
T |
Thing to set an datetime value on. |
|
string | Url |
Property for which to set the given datetime value. |
|
Date |
Datetime to set on |
Returns: T
A new Thing equal to the input Thing with existing values replaced by the given value for the given Property.
Defined in: src/thing/set.ts:119
setDecimal¶
▸ Const
setDecimal<T>(thing
: T, property
: string | Url, value
: number): T
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 |
---|---|---|
|
T |
Thing to set a decimal value on. |
|
string | Url |
Property for which to set the given decimal value. |
|
number |
Decimal to set on |
Returns: T
A new Thing equal to the input Thing with existing values replaced by the given value for the given Property.
Defined in: src/thing/set.ts:141
setInteger¶
▸ Const
setInteger<T>(thing
: T, property
: string | Url, value
: number): T
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 |
---|---|---|
|
T |
Thing to set an integer value on. |
|
string | Url |
Property for which to set the given integer value. |
|
number |
Integer to set on |
Returns: T
A new Thing equal to the input Thing with existing values replaced by the given value for the given Property.
Defined in: src/thing/set.ts:163
setStringNoLocale¶
▸ Const
setStringNoLocale<T>(thing
: T, property
: string | Url, value
: string): T
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 |
---|---|---|
|
T |
Thing to set an unlocalised string value on. |
|
string | Url |
Property for which to set the given unlocalised string value. |
|
string |
Unlocalised string to set on |
Returns: T
A new Thing equal to the input Thing with existing values replaced by the given value for the given Property.
Defined in: src/thing/set.ts:209
setStringWithLocale¶
▸ setStringWithLocale<T>(thing
: T, property
: Url | UrlString, value
: string, locale
: string): T
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.
Parameters:¶
Name |
Type |
Description |
---|---|---|
|
T |
Thing to set a localised string value on. |
|
Property for which to set the given localised string value. |
|
|
string |
Localised string to set on |
|
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.
Defined in: src/thing/set.ts:186
setUrl¶
▸ Const
setUrl<T>(thing
: T, property
: string | Url, value
: string | Url | DatasetCore<Quad, Quad> & { internal_url
: string } | DatasetCore<Quad, Quad> & { internal_localSubject
: LocalNode }): T
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 |
---|---|---|
|
T |
Thing to set a URL value on. |
|
string | Url |
Property for which to set the given URL value. |
|
string | Url | DatasetCore<Quad, Quad> & { |
- |
Returns: T
A new Thing equal to the input Thing with existing values replaced by the given value for the given Property.
Defined in: src/thing/set.ts:56