import _castPath from "./_castPath.js";
import isArguments_1 from "./isArguments.js";
import isArray_1 from "./isArray.js";
import _isIndex from "./_isIndex.js";
import isLength_1 from "./isLength.js";
import _toKey from "./_toKey.js";
var castPath = _castPath, isArguments = isArguments_1, isArray = isArray_1, isIndex = _isIndex, isLength = isLength_1, toKey = _toKey;
function hasPath(object, path, hasFunc) {
  path = castPath(path, object);
  var index = -1, length = path.length, result = false;
  while (++index < length) {
    var key = toKey(path[index]);
    if (!(result = object != null && hasFunc(object, key))) {
      break;
    }
    object = object[key];
  }
  if (result || ++index != length) {
    return result;
  }
  length = object == null ? 0 : object.length;
  return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));
}
var _hasPath = hasPath;
export {
  _hasPath as default
};
//# sourceMappingURL=_hasPath.js.map
