@inrupt/solid-client / thing/remove

Module: thing/remove

Type aliases

RemoveOfType

Ƭ RemoveOfType<Type>: <T>(thing: T, property: Url | UrlString, value: Type) => T

param Thing to remove a value from.

param Property for which to remove the given value.

param Value to remove from thing for the given property.

returns A new Thing equal to the input Thing with the given value removed for the given Property.

Type parameters

Name

Type

Type declaration

▸ <T>(thing, property, value): T

Type parameters

Name

Type

T

T: Thing

Parameters

Name

Type

thing

T

property

Url | UrlString

value

Type

Returns

T

Functions

removeAll

removeAll<T>(thing, property): T

Create a new Thing with all values removed for the given Property.

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

Type parameters

Name

Type

T

T: Readonly<Object>

Parameters

Name

Type

Description

thing

T

Thing to remove values from.

property

Url | UrlString

Property for which to remove all values from the Thing.

Returns

T

A new Thing equal to the input Thing with all values removed for the given Property.


removeBoolean

Const removeBoolean<T>(thing, property, value): T

Create a new Thing with the given boolean removed for the given Property.

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

Type parameters

Name

Type

T

T: Readonly<Object>

Parameters

Name

Type

Description

thing

T

Thing to remove a boolean value from.

property

string | Url

Property for which to remove the given boolean value.

value

boolean

Boolean to remove from thing for the given property.

Returns

T

A new Thing equal to the input Thing with the given value removed for the given Property.


removeDatetime

Const removeDatetime<T>(thing, property, value): T

Create a new Thing with the given datetime removed for the given Property.

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

Type parameters

Name

Type

T

T: Readonly<Object>

Parameters

Name

Type

Description

thing

T

Thing to remove a datetime value from.

property

string | Url

Property for which to remove the given datetime value.

value

Date

Datetime to remove from thing for the given property.

Returns

T

A new Thing equal to the input Thing with the given value removed for the given Property.


removeDecimal

Const removeDecimal<T>(thing, property, value): T

Create a new Thing with the given decimal removed for the given Property.

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

Type parameters

Name

Type

T

T: Readonly<Object>

Parameters

Name

Type

Description

thing

T

Thing to remove a decimal value from.

property

string | Url

Property for which to remove the given decimal value.

value

number

Decimal to remove from thing for the given property.

Returns

T

A new Thing equal to the input Thing with the given value removed for the given Property.


removeInteger

Const removeInteger<T>(thing, property, value): T

Create a new Thing with the given integer removed for the given Property.

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

Type parameters

Name

Type

T

T: Readonly<Object>

Parameters

Name

Type

Description

thing

T

Thing to remove an integer value from.

property

string | Url

Property for which to remove the given integer value.

value

number

Integer to remove from thing for the given property.

Returns

T

A new Thing equal to the input Thing with the given value removed for the given Property.


removeStringNoLocale

Const removeStringNoLocale<T>(thing, property, value): T

Create a new Thing with the given unlocalised string removed for the given Property.

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

Type parameters

Name

Type

T

T: Readonly<Object>

Parameters

Name

Type

Description

thing

T

Thing to remove an unlocalised string value from.

property

string | Url

Property for which to remove the given string value.

value

string

String to remove from thing for the given property.

Returns

T

A new Thing equal to the input Thing with the given value removed for the given Property.


removeStringWithLocale

removeStringWithLocale<T>(thing, property, value, locale): T

Create a new Thing with the given localised string removed for the given Property.

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

Type parameters

Name

Type

T

T: Readonly<Object>

Parameters

Name

Type

Description

thing

T

Thing to remove a localised string value from.

property

Url | UrlString

Property for which to remove the given localised string value.

value

string

String to remove from thing for the given property.

locale

string

Locale of the string to remove.

Returns

T

A new Thing equal to the input Thing with the given value removed for the given Property.


removeUrl

Const removeUrl<T>(thing, property, value): T

Create a new Thing with the given URL removed for the given Property.

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

Type parameters

Name

Type

T

T: Readonly<Object>

Parameters

Name

Type

Description

thing

T

Thing to remove a URL value from.

property

string | Url

Property for which to remove the given URL value.

value

string | Url | ThingPersisted

URL to remove from thing for the given Property.

Returns

T

A new Thing equal to the input Thing with the given value removed for the given Property.