Apply even more let/const transforms.

This commit is contained in:
John-David Dalton
2017-01-09 12:23:34 -08:00
parent e6152a97e8
commit dc687c1d85
177 changed files with 433 additions and 437 deletions

View File

@@ -3,8 +3,8 @@ import isIterateeCall from './_isIterateeCall.js';
import toInteger from './toInteger.js';
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeCeil = Math.ceil,
nativeMax = Math.max;
const nativeCeil = Math.ceil;
const nativeMax = Math.max;
/**
* Creates an array of elements split into groups the length of `size`.
@@ -33,13 +33,13 @@ function chunk(array, size, guard) {
} else {
size = nativeMax(toInteger(size), 0);
}
var length = array == null ? 0 : array.length;
const length = array == null ? 0 : array.length;
if (!length || size < 1) {
return [];
}
var index = 0,
resIndex = 0,
result = Array(nativeCeil(length / size));
let index = 0;
let resIndex = 0;
const result = Array(nativeCeil(length / size));
while (index < length) {
result[resIndex++] = baseSlice(array, index, (index += size));