Design System Utilities @ 0.1.1-alpha.0
GitHub
by Maddi Mathon
Preparing search index...
objectMap
Function objectMap
objectMap
<
T_Obj
extends
object
,
T_NewValue
extends
unknown
>
(
obj
:
T_Obj
,
callback
:
(
entry
:
[
keyof
T_Obj
,
T_Obj
[
keyof
T_Obj
]
]
)
=>
T_NewValue
,
)
:
{
[
K
in
string
|
number
|
symbol
]
:
T_NewValue
}
A utility to map the values of an object using a callback function.
Type Parameters
T_Obj
extends
object
T_NewValue
extends
unknown
Parameters
obj
:
T_Obj
The object to map.
callback
:
(
entry
:
[
keyof
T_Obj
,
T_Obj
[
keyof
T_Obj
]
]
)
=>
T_NewValue
Returns
{
[
K
in
string
|
number
|
symbol
]
:
T_NewValue
}
Since
0.1.0-alpha
Settings
Member Visibility
Alpha
Beta
External
Inherited
Private
Protected
Theme
OS
Light
Dark
GitHub
by Maddi Mathon
Design System Utilities @ 0.1.1-alpha.0
Loading...
A utility to map the values of an object using a callback function.