There was an error while loading. Please reload this page.
Transform values of an object.
Alternatives: map, map$. Similar: map, reduce, filter, reject.
function map$(x, fm) // x: an object (updated) // fm: map function (v, k, x)
const object = require('extra-object'); var x = {a: 1, b: 2, c: 3, d: 4}; object.map$(x, v => v * 2); // → { a: 2, b: 4, c: 6, d: 8 } x; // → { a: 2, b: 4, c: 6, d: 8 }