jashkenas/underscore — pull request #1953 by greenify (2014-11-30 01:51:46+00:00)
Title: Object-preserving map() function: mapValues

This adds the `mapValues` methods.

It works exactly like `map`, but preserves the object.

```
_.map2({a: 1, b: 2}, function(val, key) {
return val * 2;
});
=> {a: 2, b: 4}
```

There are at least three issues about this function (#220 #1867 #1887), and as I also do this frequently it would be awesome to get this into underscore.