mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 19:07:49 +00:00
Source cleanup from eslinting.
This commit is contained in:
@@ -1695,7 +1695,7 @@
|
|||||||
return baseCopy(source, object, props);
|
return baseCopy(source, object, props);
|
||||||
}
|
}
|
||||||
var index = -1,
|
var index = -1,
|
||||||
length = props.length
|
length = props.length;
|
||||||
|
|
||||||
while (++index < length) {
|
while (++index < length) {
|
||||||
var key = props[index],
|
var key = props[index],
|
||||||
@@ -2649,7 +2649,7 @@
|
|||||||
eachFunc(collection, function(value, index, collection) {
|
eachFunc(collection, function(value, index, collection) {
|
||||||
accumulator = initFromCollection
|
accumulator = initFromCollection
|
||||||
? (initFromCollection = false, value)
|
? (initFromCollection = false, value)
|
||||||
: iteratee(accumulator, value, index, collection)
|
: iteratee(accumulator, value, index, collection);
|
||||||
});
|
});
|
||||||
return accumulator;
|
return accumulator;
|
||||||
}
|
}
|
||||||
@@ -6712,7 +6712,7 @@
|
|||||||
props = baseFlatten(args, false, false, 1),
|
props = baseFlatten(args, false, false, 1),
|
||||||
result = isLength(length) ? Array(length) : [];
|
result = isLength(length) ? Array(length) : [];
|
||||||
|
|
||||||
baseEach(collection, function(value, key, collection) {
|
baseEach(collection, function(value) {
|
||||||
var length = props.length,
|
var length = props.length,
|
||||||
criteria = Array(length);
|
criteria = Array(length);
|
||||||
|
|
||||||
@@ -10151,7 +10151,7 @@
|
|||||||
return string;
|
return string;
|
||||||
}
|
}
|
||||||
if (guard ? isIterateeCall(value, chars, guard) : chars == null) {
|
if (guard ? isIterateeCall(value, chars, guard) : chars == null) {
|
||||||
return string.slice(trimmedLeftIndex(string))
|
return string.slice(trimmedLeftIndex(string));
|
||||||
}
|
}
|
||||||
return string.slice(charsLeftIndex(string, (chars + '')));
|
return string.slice(charsLeftIndex(string, (chars + '')));
|
||||||
}
|
}
|
||||||
@@ -10181,7 +10181,7 @@
|
|||||||
return string;
|
return string;
|
||||||
}
|
}
|
||||||
if (guard ? isIterateeCall(value, chars, guard) : chars == null) {
|
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);
|
return string.slice(0, charsRightIndex(string, (chars + '')) + 1);
|
||||||
}
|
}
|
||||||
@@ -10347,7 +10347,7 @@
|
|||||||
try {
|
try {
|
||||||
return func.apply(undefined, baseSlice(arguments, 1));
|
return func.apply(undefined, baseSlice(arguments, 1));
|
||||||
} catch(e) {
|
} 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`.
|
// Add `LazyWrapper` methods for `_.first` and `_.last`.
|
||||||
arrayEach(['first', 'last'], function(methodName, index) {
|
arrayEach(['first', 'last'], function(methodName, index) {
|
||||||
var takeName = 'take' + (index ? 'Right': '');
|
var takeName = 'take' + (index ? 'Right' : '');
|
||||||
|
|
||||||
LazyWrapper.prototype[methodName] = function() {
|
LazyWrapper.prototype[methodName] = function() {
|
||||||
return this[takeName](1).value()[0];
|
return this[takeName](1).value()[0];
|
||||||
|
|||||||
Reference in New Issue
Block a user