Apply more let/const transforms.

This commit is contained in:
John-David Dalton
2017-01-08 23:38:19 -08:00
parent ca9e6fa087
commit 4d0c15b49e
115 changed files with 621 additions and 613 deletions

View File

@@ -5,10 +5,10 @@ import baseUnary from './_baseUnary.js';
import copyArray from './_copyArray.js';
/** Used for built-in method references. */
var arrayProto = Array.prototype;
const arrayProto = Array.prototype;
/** Built-in value references. */
var splice = arrayProto.splice;
const splice = arrayProto.splice;
/**
* The base implementation of `_.pullAllBy` without support for iteratee
@@ -22,10 +22,11 @@ var splice = arrayProto.splice;
* @returns {Array} Returns `array`.
*/
function basePullAll(array, values, iteratee, comparator) {
var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
index = -1,
length = values.length,
seen = array;
const indexOf = comparator ? baseIndexOfWith : baseIndexOf;
const length = values.length;
let index = -1;
let seen = array;
if (array === values) {
values = copyArray(values);
@@ -34,9 +35,9 @@ function basePullAll(array, values, iteratee, comparator) {
seen = arrayMap(array, baseUnary(iteratee));
}
while (++index < length) {
var fromIndex = 0,
value = values[index],
computed = iteratee ? iteratee(value) : value;
let fromIndex = 0;
const value = values[index];
const computed = iteratee ? iteratee(value) : value;
while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
if (seen !== array) {