Skip to content

Commit

Permalink
Alias mapObject to mapValues
Browse files Browse the repository at this point in the history
For the record, I like `_.mapObject` better. But this change was
undiscussed.

Re: #2061, 4f771e0
  • Loading branch information
jridgewell committed Jan 14, 2016
1 parent 0e6d1e5 commit 8cb27b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions index.html
Expand Up @@ -1381,6 +1381,7 @@ <h2 id="objects">Object Functions</h2>

<p id="mapObject">
<b class="header">mapObject</b><code>_.mapObject(object, iteratee, [context])</code>
<span class="alias">Alias: <b>mapValues</b></span>
<br />
Like <a href="#map">map</a>, but for objects. Transform the value
of each property in turn.
Expand Down
2 changes: 1 addition & 1 deletion underscore.js
Expand Up @@ -993,7 +993,7 @@

// Returns the results of applying the iteratee to each element of the object
// In contrast to _.map it returns an object
_.mapObject = function(obj, iteratee, context) {
_.mapObject = _.mapValues = function(obj, iteratee, context) {
iteratee = cb(iteratee, context);
var keys = _.keys(obj),
length = keys.length,
Expand Down

0 comments on commit 8cb27b6

Please sign in to comment.