@inrupt/solid-client / thing/add
Module: thing/add¶
Table of contents¶
Functions¶
Functions¶
addBoolean¶
▸ Const
addBoolean<T>(thing
: T, property
: string | Url, value
: boolean): T
Create a new Thing with a boolean added for a Property.
This preserves existing values for the given Property. To replace them, see setBoolean.
The original thing
is not modified; this function returns a cloned Thing with updated values.
Type parameters:¶
Name |
Type |
---|---|
|
Parameters:¶
Name |
Type |
Description |
---|---|---|
|
T |
Thing to add a boolean value to. |
|
string | Url |
Property for which to add the given boolean value. |
|
boolean |
Boolean to add to |
Returns: T
A new Thing equal to the input Thing with the given value added for the given Property.
Defined in: src/thing/add.ts:99
addDatetime¶
▸ Const
addDatetime<T>(thing
: T, property
: string | Url, value
: Date): T
Create a new Thing with a datetime added for a Property.
This preserves existing values for the given Property. To replace them, see setDatetime.
The original thing
is not modified; this function returns a cloned Thing with updated values.
Type parameters:¶
Name |
Type |
---|---|
|
Parameters:¶
Name |
Type |
Description |
---|---|---|
|
T |
Thing to add a datetime value to. |
|
string | Url |
Property for which to add the given datetime value. |
|
Date |
Datetime to add to |
Returns: T
A new Thing equal to the input Thing with the given value added for the given Property.
Defined in: src/thing/add.ts:121
addDecimal¶
▸ Const
addDecimal<T>(thing
: T, property
: string | Url, value
: number): T
Create a new Thing with a decimal added for a Property.
This preserves existing values for the given Property. To replace them, see setDecimal.
The original thing
is not modified; this function returns a cloned Thing with updated values.
Type parameters:¶
Name |
Type |
---|---|
|
Parameters:¶
Name |
Type |
Description |
---|---|---|
|
T |
Thing to add a decimal value to. |
|
string | Url |
Property for which to add the given decimal value. |
|
number |
Decimal to add to |
Returns: T
A new Thing equal to the input Thing with the given value added for the given Property.
Defined in: src/thing/add.ts:143
addInteger¶
▸ Const
addInteger<T>(thing
: T, property
: string | Url, value
: number): T
Create a new Thing with an integer added for a Property.
This preserves existing values for the given Property. To replace them, see setInteger.
The original thing
is not modified; this function returns a cloned Thing with updated values.
Type parameters:¶
Name |
Type |
---|---|
|
Parameters:¶
Name |
Type |
Description |
---|---|---|
|
T |
Thing to add an integer value to. |
|
string | Url |
Property for which to add the given integer value. |
|
number |
Integer to add to |
Returns: T
A new Thing equal to the input Thing with the given value added for the given Property.
Defined in: src/thing/add.ts:165
addStringNoLocale¶
▸ Const
addStringNoLocale<T>(thing
: T, property
: string | Url, value
: string): T
Create a new Thing with an unlocalised string added for a Property.
This preserves existing values for the given Property. To replace them, see setStringNoLocale.
The original thing
is not modified; this function returns a cloned Thing with updated values.
Type parameters:¶
Name |
Type |
---|---|
|
Parameters:¶
Name |
Type |
Description |
---|---|---|
|
T |
Thing to add an unlocalised string value to. |
|
string | Url |
Property for which to add the given string value. |
|
string |
String to add to |
Returns: T
A new Thing equal to the input Thing with the given value added for the given Property.
Defined in: src/thing/add.ts:211
addStringWithLocale¶
▸ addStringWithLocale<T>(thing
: T, property
: Url | UrlString, value
: string, locale
: string): T
Create a new Thing with a localised string added for a Property.
This preserves existing values for the given Property. To replace them, see setStringWithLocale.
The original thing
is not modified; this function returns a cloned Thing with updated values.
Type parameters:¶
Name |
Type |
---|---|
|
Parameters:¶
Name |
Type |
Description |
---|---|---|
|
T |
Thing to add a localised string value to. |
|
Property for which to add the given string value. |
|
|
string |
String to add to |
|
string |
Locale of the added string. |
Returns: T
A new Thing equal to the input Thing with the given value added for the given Property.
Defined in: src/thing/add.ts:188
addUrl¶
▸ Const
addUrl<T>(thing
: T, property
: string | Url, value
: string | Url | Thing): T
Create a new Thing with a URL added for a Property.
This preserves existing values for the given Property. To replace them, see setUrl.
The original thing
is not modified; this function returns a cloned Thing with updated values.
Type parameters:¶
Name |
Type |
---|---|
|
Parameters:¶
Name |
Type |
Description |
---|---|---|
|
T |
Thing to add a URL value to. |
|
string | Url |
Property for which to add the given URL value. |
|
- |
Returns: T
A new Thing equal to the input Thing with the given value added for the given Property.
Defined in: src/thing/add.ts:59