Bump to v4.13.1.

This commit is contained in:
John-David Dalton
2016-05-23 12:25:07 -07:00
parent c731ef8e1e
commit 2ab869e88a
7 changed files with 69 additions and 34 deletions

41
main.js
View File

@@ -13,7 +13,7 @@
var undefined;
/** Used as the semantic version number. */
var VERSION = '4.13.0';
var VERSION = '4.13.1';
/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;
@@ -4550,6 +4550,31 @@
return wrapper;
}
/**
* Creates a `_.find` or `_.findLast` function.
*
* @private
* @param {Function} findIndexFunc The function to find the collection index.
* @returns {Function} Returns the new find function.
*/
function createFind(findIndexFunc) {
return function(collection, predicate, fromIndex) {
var iterable = Object(collection);
predicate = getIteratee(predicate, 3);
if (!isArrayLike(collection)) {
var props = keys(collection);
}
var index = findIndexFunc(props || collection, function(value, key) {
if (props) {
key = value;
value = iterable[key];
}
return predicate(value, key, iterable);
}, fromIndex);
return index > -1 ? collection[props ? props[index] : index] : undefined;
};
}
/**
* Creates a `_.flow` or `_.flowRight` function.
*
@@ -5795,7 +5820,7 @@
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `func` is maskable, else `false`.
*/
var isMaskable = !coreJsData ? stubFalse : isFunction;
var isMaskable = coreJsData ? isFunction : stubFalse;
/**
* Checks if `value` is likely a prototype object.
@@ -8473,11 +8498,7 @@
* _.find(users, 'active');
* // => object for 'barney'
*/
function find(collection, predicate, fromIndex) {
collection = isArrayLike(collection) ? collection : values(collection);
var index = findIndex(collection, predicate, fromIndex);
return index > -1 ? collection[index] : undefined;
}
var find = createFind(findIndex);
/**
* This method is like `_.find` except that it iterates over elements of
@@ -8499,11 +8520,7 @@
* });
* // => 3
*/
function findLast(collection, predicate, fromIndex) {
collection = isArrayLike(collection) ? collection : values(collection);
var index = findLastIndex(collection, predicate, fromIndex);
return index > -1 ? collection[index] : undefined;
}
var findLast = createFind(findLastIndex);
/**
* Creates a flattened array of values by running each element in `collection`