Prelude API
Guides
Skill
GitHub
Preparing search index...
@prelude/predicate
unique
Function unique
unique
<
T
,
R
extends
string
|
number
=
T
extends
string
|
number
?
T
:
never
>
(
a
:
Predicate
<
T
>
,
k
?:
(
value
:
T
)
=>
R
,
)
:
Predicate
<
T
[]
>
An array of
a
values that are unique, by
k
when given.
Type Parameters
T
R
extends
string
|
number
=
T
extends
string
|
number
?
T
:
never
Parameters
a
:
Predicate
<
T
>
Optional
k
:
(
value
:
T
)
=>
R
Returns
Predicate
<
T
[]
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
Guides
Skill
GitHub
Prelude API
Loading...
An array of
avalues that are unique, bykwhen given.