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

@@ -20,17 +20,18 @@ function baseSet(object, path, value, customizer) {
}
path = castPath(path, object);
var index = -1,
length = path.length,
lastIndex = length - 1,
nested = object;
const length = path.length;
const lastIndex = length - 1;
let index = -1;
let nested = object;
while (nested != null && ++index < length) {
var key = toKey(path[index]),
newValue = value;
const key = toKey(path[index]);
let newValue = value;
if (index != lastIndex) {
var objValue = nested[key];
const objValue = nested[key];
newValue = customizer ? customizer(objValue, key, nested) : undefined;
if (newValue === undefined) {
newValue = isObject(objValue)