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