Use more ES2015.

This commit is contained in:
John-David Dalton
2017-01-02 16:45:31 -06:00
parent 2900cfd288
commit 1a1e462f80
17 changed files with 45 additions and 59 deletions

View File

@@ -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;