Remove semicolons.

This commit is contained in:
John-David Dalton
2017-02-04 23:50:10 -08:00
parent f3a8e55e70
commit 6cb3460fce
452 changed files with 4261 additions and 4261 deletions

View File

@@ -1,8 +1,8 @@
import assignValue from './assignValue.js';
import castPath from './castPath.js';
import isIndex from './isIndex.js';
import isObject from '../isObject.js';
import toKey from './toKey.js';
import assignValue from './assignValue.js'
import castPath from './castPath.js'
import isIndex from './isIndex.js'
import isObject from '../isObject.js'
import toKey from './toKey.js'
/**
* The base implementation of `set`.
@@ -16,33 +16,33 @@ import toKey from './toKey.js';
*/
function baseSet(object, path, value, customizer) {
if (!isObject(object)) {
return object;
return object
}
path = castPath(path, object);
path = castPath(path, object)
const length = path.length;
const lastIndex = length - 1;
const length = path.length
const lastIndex = length - 1
let index = -1;
let nested = object;
let index = -1
let nested = object
while (nested != null && ++index < length) {
const key = toKey(path[index]);
let newValue = value;
const key = toKey(path[index])
let newValue = value
if (index != lastIndex) {
const objValue = nested[key];
newValue = customizer ? customizer(objValue, key, nested) : undefined;
const objValue = nested[key]
newValue = customizer ? customizer(objValue, key, nested) : undefined
if (newValue === undefined) {
newValue = isObject(objValue)
? objValue
: (isIndex(path[index + 1]) ? [] : {});
: (isIndex(path[index + 1]) ? [] : {})
}
}
assignValue(nested, key, newValue);
nested = nested[key];
assignValue(nested, key, newValue)
nested = nested[key]
}
return object;
return object
}
export default baseSet;
export default baseSet