/object/mapValues
stdMaps and returns an array of transformed object values.
Type signature
<T, TResult>(f: (value: T, key: string, context: object) => TResult) => (xs: GenericObject<T>) => TResult[]
Examples
mapValues((x) => x ** 2)({
a: 1,
b: 2,
c: 3,
});
// ⇒ [1, 4, 9]
Try in REPL
Questions
- How to map object values?