mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 02:17:48 +00:00
Reduced _.pluck.
Former-commit-id: e413c1a6d0df383cb1ca51ab2203d3e380f71177
This commit is contained in:
7
dist/lodash.underscore.js
vendored
7
dist/lodash.underscore.js
vendored
@@ -376,7 +376,7 @@
|
||||
* @returns {Function} Returns a callback function.
|
||||
*/
|
||||
function createCallback(func, thisArg, argCount) {
|
||||
if (!func) {
|
||||
if (func == null) {
|
||||
return identity;
|
||||
}
|
||||
var type = typeof func;
|
||||
@@ -2086,6 +2086,7 @@
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @type Function
|
||||
* @category Collections
|
||||
* @param {Array|Object|String} collection The collection to iterate over.
|
||||
* @param {String} property The property to pluck.
|
||||
@@ -2100,9 +2101,7 @@
|
||||
* _.pluck(stooges, 'name');
|
||||
* // => ['moe', 'larry']
|
||||
*/
|
||||
function pluck(collection, property) {
|
||||
return map(collection, property + '');
|
||||
}
|
||||
var pluck = map;
|
||||
|
||||
/**
|
||||
* Reduces a `collection` to a value that is the accumulated result of running
|
||||
|
||||
Reference in New Issue
Block a user