diff --git a/build.js b/build.js index 1d555d120..b9c765751 100755 --- a/build.js +++ b/build.js @@ -132,7 +132,7 @@ 'pairs': ['forOwn'], 'partial': ['isFunction', 'isObject'], 'pick': ['forIn'], - 'pluck': ['forEach'], + 'pluck': ['map'], 'random': [], 'range': [], 'reduce': ['forEach'], diff --git a/lodash.js b/lodash.js index 528f7af36..c27be51bc 100644 --- a/lodash.js +++ b/lodash.js @@ -2346,11 +2346,7 @@ * // => ['moe', 'larry', 'curly'] */ function pluck(collection, property) { - var result = []; - forEach(collection, function(value) { - result.push(value[property]); - }); - return result; + return map(collection, property + ''); } /**