Preparing search index...
The search index is not available
@tb-dev/utils - v4.0.7
@tb-dev/utils
upsert
Function upsert
upsert
<
T
>
(
array
,
item
,
predicate
?
)
:
void
Pushes an item to the array if it doesn't exist, otherwise updates it.
Type Parameters
T
Parameters
array
:
T
[]
item
:
T
Optional
predicate
:
(
(
value
:
T
)
=>
boolean
)
(
value
)
:
boolean
Parameters
value
:
T
Returns
boolean
Returns
void
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
@tb-dev/utils - v4.0.7
Loading...
Pushes an item to the array if it doesn't exist, otherwise updates it.