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

@@ -2,7 +2,7 @@ import copyArray from './_copyArray.js';
import isIndex from './_isIndex.js';
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMin = Math.min;
const nativeMin = Math.min;
/**
* Reorder `array` according to the specified indexes where the element at
@@ -15,12 +15,12 @@ var nativeMin = Math.min;
* @returns {Array} Returns `array`.
*/
function reorder(array, indexes) {
var arrLength = array.length,
length = nativeMin(indexes.length, arrLength),
oldArray = copyArray(array);
const arrLength = array.length;
let length = nativeMin(indexes.length, arrLength);
const oldArray = copyArray(array);
while (length--) {
var index = indexes[length];
const index = indexes[length];
array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
}
return array;