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 castPath from './castPath.js';
import isArguments from '../isArguments.js';
import isIndex from './isIndex.js';
import isLength from '../isLength.js';
import toKey from './toKey.js';
import castPath from './castPath.js'
import isArguments from '../isArguments.js'
import isIndex from './isIndex.js'
import isLength from '../isLength.js'
import toKey from './toKey.js'
/**
* Checks if `path` exists on `object`.
@@ -14,26 +14,26 @@ import toKey from './toKey.js';
* @returns {boolean} Returns `true` if `path` exists, else `false`.
*/
function hasPath(object, path, hasFunc) {
path = castPath(path, object);
path = castPath(path, object)
let key;
let index = -1;
let length = path.length;
let result = false;
let key
let index = -1
let length = path.length
let result = false
while (++index < length) {
key = toKey(path[index]);
key = toKey(path[index])
if (!(result = object != null && hasFunc(object, key))) {
break;
break
}
object = object[key];
object = object[key]
}
if (result || ++index != length) {
return result;
return result
}
length = object == null ? 0 : object.length;
length = object == null ? 0 : object.length
return !!length && isLength(length) && isIndex(key, length) &&
(Array.isArray(object) || isArguments(object));
(Array.isArray(object) || isArguments(object))
}
export default hasPath;
export default hasPath