From d72e8c2687c65770b6cf7a3e834457317a686fe2 Mon Sep 17 00:00:00 2001 From: jdalton Date: Wed, 11 Feb 2015 20:19:27 -0800 Subject: [PATCH] Source cleanup from eslinting. --- lodash.src.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lodash.src.js b/lodash.src.js index fe4ce5021..fbd783a5c 100644 --- a/lodash.src.js +++ b/lodash.src.js @@ -1695,7 +1695,7 @@ return baseCopy(source, object, props); } var index = -1, - length = props.length + length = props.length; while (++index < length) { var key = props[index], @@ -2649,7 +2649,7 @@ eachFunc(collection, function(value, index, collection) { accumulator = initFromCollection ? (initFromCollection = false, value) - : iteratee(accumulator, value, index, collection) + : iteratee(accumulator, value, index, collection); }); return accumulator; } @@ -6712,7 +6712,7 @@ props = baseFlatten(args, false, false, 1), result = isLength(length) ? Array(length) : []; - baseEach(collection, function(value, key, collection) { + baseEach(collection, function(value) { var length = props.length, criteria = Array(length); @@ -10151,7 +10151,7 @@ return string; } if (guard ? isIterateeCall(value, chars, guard) : chars == null) { - return string.slice(trimmedLeftIndex(string)) + return string.slice(trimmedLeftIndex(string)); } return string.slice(charsLeftIndex(string, (chars + ''))); } @@ -10181,7 +10181,7 @@ return string; } if (guard ? isIterateeCall(value, chars, guard) : chars == null) { - return string.slice(0, trimmedRightIndex(string) + 1) + return string.slice(0, trimmedRightIndex(string) + 1); } return string.slice(0, charsRightIndex(string, (chars + '')) + 1); } @@ -10347,7 +10347,7 @@ try { return func.apply(undefined, baseSlice(arguments, 1)); } catch(e) { - return isError(e) ? e : Error(e); + return isError(e) ? e : new Error(e); } } @@ -11075,7 +11075,7 @@ // Add `LazyWrapper` methods for `_.first` and `_.last`. arrayEach(['first', 'last'], function(methodName, index) { - var takeName = 'take' + (index ? 'Right': ''); + var takeName = 'take' + (index ? 'Right' : ''); LazyWrapper.prototype[methodName] = function() { return this[takeName](1).value()[0];