Bump to v4.13.1.

This commit is contained in:
John-David Dalton
2016-05-23 08:55:37 -07:00
parent 0cf3476f14
commit 295d8cf415
10 changed files with 229 additions and 171 deletions

11
find.js
View File

@@ -1,6 +1,5 @@
var findIndex = require('./findIndex'),
isArrayLike = require('./isArrayLike'),
values = require('./values');
var createFind = require('./_createFind'),
findIndex = require('./findIndex');
/**
* Iterates over elements of `collection`, returning the first element
@@ -39,10 +38,6 @@ var findIndex = require('./findIndex'),
* _.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);
module.exports = find;