underscore icon indicating copy to clipboard operation
underscore copied to clipboard

Alias mapObject to mapValues

Open jridgewell opened this issue 10 years ago • 4 comments

For the record, I like _.mapObject better. But this change was undiscussed.

Re: https://github.com/jashkenas/underscore/issues/2061, 4f771e0

jridgewell avatar Feb 20 '15 16:02 jridgewell

_.mapValues makes more sense to me as you are only manipulating the values in the object and not the keys. _.mapObject implies a limited set of functionality that _.transform has.

jamiebuilds avatar Feb 20 '15 23:02 jamiebuilds

:+1:

paulfalgout avatar Jan 13 '16 23:01 paulfalgout

I like the alias, but the PR should also update tests.

captbaritone avatar Jan 14 '16 13:01 captbaritone

@captbaritone: You got it. :wink:

jridgewell avatar Jan 14 '16 16:01 jridgewell