- Preparing search index...
- The search index is not available
@giraugh/tools
- mapValues<TMapped, TObj>(obj, mapFn): {
[k in string | number | symbol]: TMapped
}
-
Type Parameters
-
TMapped
-
TObj extends Record<PropertyKey, any>
Parameters
-
obj: TObj
-
mapFn: ((t) => TMapped)
-
- (t): TMapped
-
Returns TMapped
Returns {
[k in string | number | symbol]: TMapped
}
Map the values of an object using a mapping function
Returns
obj
with its values mapped usingmapFn
Example
Example