mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 10:57:49 +00:00
Rebuild dist/ files.
Former-commit-id: 3e9c51b17797b9a1ba702c4f38f24c3bc592c1d5
This commit is contained in:
31
dist/lodash.js
vendored
31
dist/lodash.js
vendored
@@ -457,7 +457,6 @@
|
||||
/** Native method shortcuts */
|
||||
var ceil = Math.ceil,
|
||||
clearTimeout = context.clearTimeout,
|
||||
defineProperty = reNative.test(defineProperty = Object.defineProperty) && defineProperty,
|
||||
floor = Math.floor,
|
||||
fnToString = Function.prototype.toString,
|
||||
getPrototypeOf = reNative.test(getPrototypeOf = Object.getPrototypeOf) && getPrototypeOf,
|
||||
@@ -470,6 +469,15 @@
|
||||
toString = objectProto.toString,
|
||||
unshift = arrayRef.unshift;
|
||||
|
||||
var defineProperty = (function() {
|
||||
try {
|
||||
var o = {},
|
||||
func = reNative.test(func = Object.defineProperty) && func,
|
||||
result = func(o, o, o) && func;
|
||||
} catch(e) { }
|
||||
return result;
|
||||
}());
|
||||
|
||||
/* Native method shortcuts for methods with the same name as other `lodash` methods */
|
||||
var nativeBind = reNative.test(nativeBind = toString.bind) && nativeBind,
|
||||
nativeCreate = reNative.test(nativeCreate = Object.create) && nativeCreate,
|
||||
@@ -1659,7 +1667,7 @@
|
||||
* iteration. If a property name or object is provided it will be used to
|
||||
* create a "_.pluck" or "_.where" style callback, respectively.
|
||||
* @param {*} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {*} Returns the key of the found element, else `undefined`.
|
||||
* @returns {string|undefined} Returns the key of the found element, else `undefined`.
|
||||
* @example
|
||||
*
|
||||
* _.findKey({ 'a': 1, 'b': 2, 'c': 3, 'd': 4 }, function(num) {
|
||||
@@ -1691,7 +1699,7 @@
|
||||
* iteration. If a property name or object is provided it will be used to
|
||||
* create a "_.pluck" or "_.where" style callback, respectively.
|
||||
* @param {*} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {*} Returns the key of the found element, else `undefined`.
|
||||
* @returns {string|undefined} Returns the key of the found element, else `undefined`.
|
||||
* @example
|
||||
*
|
||||
* _.findLastKey({ 'a': 1, 'b': 2, 'c': 3, 'd': 4 }, function(num) {
|
||||
@@ -3339,7 +3347,18 @@
|
||||
* _.pluck(stooges, 'name');
|
||||
* // => ['moe', 'larry']
|
||||
*/
|
||||
var pluck = map;
|
||||
function pluck(collection, property) {
|
||||
var index = -1,
|
||||
length = collection ? collection.length : 0;
|
||||
|
||||
if (typeof length == 'number') {
|
||||
var result = Array(length);
|
||||
while (++index < length) {
|
||||
result[index] = collection[index][property];
|
||||
}
|
||||
}
|
||||
return result || map(collection, property);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reduces a collection to a value which is the accumulated result of running
|
||||
@@ -3809,7 +3828,7 @@
|
||||
* per iteration. If a property name or object is provided it will be used
|
||||
* to create a "_.pluck" or "_.where" style callback, respectively.
|
||||
* @param {*} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {*} Returns the index of the found element, else `-1`.
|
||||
* @returns {number} Returns the index of the found element, else `-1`.
|
||||
* @example
|
||||
*
|
||||
* _.findIndex(['apple', 'banana', 'beet'], function(food) {
|
||||
@@ -3842,7 +3861,7 @@
|
||||
* per iteration. If a property name or object is provided it will be used
|
||||
* to create a "_.pluck" or "_.where" style callback, respectively.
|
||||
* @param {*} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {*} Returns the index of the found element, else `-1`.
|
||||
* @returns {number} Returns the index of the found element, else `-1`.
|
||||
* @example
|
||||
*
|
||||
* _.findLastIndex(['apple', 'banana', 'beet'], function(food) {
|
||||
|
||||
Reference in New Issue
Block a user