Checks to see whether an object has a deeply nested path
@param {Object} target
@param {String} propertyPath
@param {Boolean} returnVal
@returns {Boolean || Any} will return either true/false for existance or the actual value
979695
function hasNestedProperty(obj, propertyPath, returnVal = false) {
  if (!propertyPath) return false;

  // strip the leading dot
  propertyPath = propertyPath.replace(/^\./, '');
  const properties = propertyPath.split('.');

  for (var i = 0; i < properties.length; i++) {
    var prop = properties[i];

    if (!obj || !obj.hasOwnProperty(prop)) {
      return returnVal ? null : false;
    } else {
      obj = obj[prop];
    }
  }

  return returnVal ? obj : true;
}
399648
function(filePath, currentPath){
	if(/^(?:\/|[a-zA-Z]:(?:\/|\\))/.test(filePath)){ // Is the path absolute?
		filePath = path.normalize(filePath);
	}else{ // Relative paths need to be resolved first
		filePath = path.resolve(currentPath, filePath);
	}
	return filePath;
}
753307
function _has(obj, path) {
  var subpathes = path.split('.');
  while (subpathes.length) {
    var subpath = subpathes.shift();
    if (!obj.hasOwnProperty(subpath)) {
      return false;
    }
    obj = obj[subpath];
  }
  return true;
}
1299424
function path(properties, options) {
  if (!properties) return;
  var str = properties.path;
  if (options.includeSearch && properties.search) str += properties.search;
  return str;
}
890337
function getorigPath(filePath, base) {
    var extName = path.extname(filePath);
    var pt = path.resolve(base, filePath);
    if (!extName) pt += '.js';
    return pt;
}
356735
function pathAll(propertyPath) {
  return propertyPath.split('.').reduce((a, v, i) => {
    a[i] = i === 0 ? v : a[i-1] + '.' + v;
    return a;
  }, []);
}
610357
async function assurePath (modulePath, resolve) {
  if (resolveCache[modulePath] === false) {
    return false
  } else if (!(modulePath in resolveCache)) {
    if (typeof resolve === 'function') {
      try {
        resolveCache[modulePath] = !!(await resolve(modulePath))
      } catch (e) {
        resolveCache[modulePath] = false
      }
    }
  }

  return resolveCache[modulePath]
}
583920
public function forProperty(string $propertyPath = null): Result
    {
        if ($propertyPath === '' || $propertyPath === null) {
            return $this;
        }
        if (strpos($propertyPath, '.') !== false) {
            return $this->recurseThroughResult(explode('.', $propertyPath));
        }
        if (!isset($this->propertyResults[$propertyPath])) {
            $newResult = new Result();
            $newResult->setParent($this);
            $this->propertyResults[$propertyPath] = $newResult;
        }
        return $this->propertyResults[$propertyPath];
    }
159876
function setByPath(target, path, value) {
  path = pathToArray(path);

  if (! path.length) {
    return value;
  }

  const key = path[0];
  if (isNumber(key)) {
    if (! Array.isArray(target)) {
      target = [];
    }
  }
  else if (! isObject(target)) {
    target = {};
  }

  if (path.length > 1) {
    target[key] = setByPath(target[key], path.slice(1), value);
  }
  else {
    target[key] = value;
  }

  return target;
}
1210893
protected String getFullPropertyPath(String propertyPath) {
		if (basePropertyPath.equals("")) {
			return propertyPath;
		}
		else if (propertyPath.equals("")) {
			return basePropertyPath;
		}
		else {
			return basePropertyPath + '.' + propertyPath;
		}
	}
1058814
function(filePath) {
        var ignoredPaths;

        if (this.options.ignore) {
            ignoredPaths = new IgnoredPaths(this.options);
            return ignoredPaths.contains(filePath);
        }

        return false;
    }
1193660
function (obj, target) {
                    if (obj == null)
                        return false;
                    if (obj.length !== +obj.length)
                        obj = _.values(obj);

                    if (_.every(obj, function (item) {
                        return moment.isMoment(item);
                    })) {
                        return _.any(obj, function (item) {
                            return item.isSame(target);
                        });
                    } else {
                        return _.indexOf(obj, target) >= 0;
                    }
                }
108883
function _getPathInfo (obj, parts, walkNonEnumerables) {
    if (isNil(obj)) {
        throw _makeTypeErrorFor(obj, "object");
    }

    var target = obj;
    var i = -1;
    var len = parts.length;
    var key;

    while (++i < len) {
        key = _getPathKey(target, parts[i], walkNonEnumerables);

        if (isUndefined(key)) {
            break;
        }

        target = target[key];
    }

    return i === len ? { isValid: true, target: target } : { isValid: false, target: void 0 };
}
780568
function resolvePath(path, options, callback) {
        if (!callback) {
            callback = options;
            options = {};
        }
        
        var alreadyRooted = options.alreadyRooted;
        var checkSymlinks = options.checkSymlinks === undefined 
            ? true : options.checkSymlinks;
        var isHome        = false;
        
        if (checkSymlinks === undefined)
            checkSymlinks = true;
        if (path.substr(0, 2) == "~/") {
            isHome = true;
            path = process.env.HOME + path.substr(1);
        }
        else if (!alreadyRooted) 
            path = join(root, path);

        if (checkSymlinks && fsOptions.checkSymlinks && !alreadyRooted) 
            fs.realpath(path, check);
        else check(null, path);

        function check(err, path) {
            if (err) return callback(err);
            
            if (!options.nocheck) {
                if (!(path === base || path.substr(0, root.length) === root)
                  && !isHome) {
                    err = new Error("EACCESS: '" + path + "' not in '" + root + "'");
                    err.code = "EACCESS";
                    return callback(err);
                }
            }
            callback(null, path);
        }
    }
1345976
function resolve(val, i, isPath) {
			val = val.replace('~', '');
			return Promise.resolve(System.normalize(val))
					.then(function(normalized) {
						return System.locate({name: normalized, metadata: {}});
					})
					.then(function(address) {
						if (isPath) {
							options.includePaths.push(
									path.resolve(address.replace('file:', '').replace('.js', ''))
							);
						} else {
							var originalRelativePath      = path.relative(
									path.dirname(file.path),
									path.resolve(address.replace('file:', '').replace('.js', ''))
							);
							var originalRelativePathArray = originalRelativePath.split(path.sep);

							replacements[i] = path.posix?
									path.posix.join.apply(this, originalRelativePathArray):
									path.normalize(originalRelativePath).replace(/\\/g, '/').replace('//', '/');
						}
					});
		}
1094172
function parseIndexedPaths(path) {
                var opensb = path.lastIndexOf('[');
                info.entityPath = path.substring(0, opensb);  // path to entity is before last [
                var propertyPath = path.substring(opensb + 1, path.length - 1); // property is between [ ]
                // eval it, in case it's an angular expression
                try { var evalPath = info.scope.$eval(propertyPath); }
                catch (_) { }
                info.propertyPath = evalPath ? evalPath : propertyPath;
            }
62998
public static boolean checkIsPathOrLinkToSvg(String path) {

        if (path == null) {
            return false;
        }
        path = path.trim().toLowerCase();
        int paramPos = path.indexOf("?");
        if (paramPos >= 0) {
            path = path.substring(0, paramPos);
        }
        return path.endsWith(".svg");
    }