mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 00:27:50 +00:00
Use more ES2015.
This commit is contained in:
@@ -10,8 +10,8 @@
|
||||
* @returns {*} Returns the found element or its key, else `undefined`.
|
||||
*/
|
||||
function baseFindKey(collection, predicate, eachFunc) {
|
||||
var result;
|
||||
eachFunc(collection, function(value, key, collection) {
|
||||
let result;
|
||||
eachFunc(collection, (value, key, collection) => {
|
||||
if (predicate(value, key, collection)) {
|
||||
result = key;
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user