Get the root directory to use from the supplied object or calculate it.

@private
@param {Object} obj    The options object containing a 'dir' property.
@returns {string}      The directory path.
420475
function _getRoot(obj) {
  return (getCallingDir(((obj && obj.basedir) ? obj.basedir : undefined)) || (obj?obj.basedir:undefined));
}
688027
function get (obj, property, defaultValue) {
  if (isNull(obj) || isUndefined(obj)) {
    return defaultValue
  }
  var result = pathGet(obj, property)
  return isUndefined(result) ? defaultValue : result
}
868386
function(obj) {
            if (!obj) {
                return null;
            }

            if (typeof obj == 'function') {
                return obj.prototype.__moduleId__;
            }

            if (typeof obj == 'string') {
                return null;
            }

            return obj.__moduleId__;
        }
819697
def instance_dir(obj):  # pragma: py3 no cover
    """"""
    d = dict()
    d.update(obj.__dict__)
    d.update(class_dir(obj.__class__))
    result = sorted(d.keys())
    return result
1351136
function getDeepRef() {
  var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  var path = arguments.length > 1 ? arguments[1] : undefined;
  var keys = getKeysFromPath(path);
  if (!keys.length) return target;
  var obj = target;

  while (obj && keys.length > 1) {
    obj = obj[keys.shift()];
  }

  var key = keys.shift();

  if (obj && obj.hasOwnProperty(key)) {
    return obj[key];
  }
}
860690
def object_path(self, objhash):
        
        return os.path.join(self._path, self.OBJ_DIR, objhash)
488802
def get_root_dir(self):
        
        if os.path.isdir(self.root_path):
            return self.root_path
        else:
            return os.path.dirname(self.root_path)
826391
function getFilePathRelativeToAppRoot (pPath) {
    // go to meow-blog directory
    var projectBaseDirectory = path.resolve(__dirname, '..');

    if (projectBaseDirectory.indexOf('node_modules') !== -1) {
        // from meow-blog, go up to node_modules, then go to base directory
        projectBaseDirectory = path.resolve(projectBaseDirectory, '..', '..');
    }

    return path.resolve(projectBaseDirectory, pPath);
}
996964
function getPropertyOfPath(obj, path) {
    const [child, last] = getLeafOfPath(obj, path, false);
    return child && last ? child[last] : undefined;
}
1077249
function(name, obj) {
  var parts = name.split('.');
  if (parts.length > 1) {
    var curProperty = parts.shift();
    return obj[curProperty] ? getProperty(parts.join('.'), obj[curProperty]) : undefined;
  }
  else
    return obj[name];
}
1010797
def get_root_path():
    """"""
    return os.path.realpath(os.path.join(os.path.dirname(__file__), os.pardir))
1168351
def find_schema(schema_dir, obj_type):
    
    schema_filename = obj_type + '.json'

    for root, dirnames, filenames in os.walk(schema_dir):
        if schema_filename in filenames:
            return os.path.join(root, schema_filename)
640294
function getPropertyValue(obj, path) {

   if (path.length === 0 || obj === undefined) {
      return undefined;
   }
   var notation = dotNotation(path);
   if (!notation) {
      return;
   }
   path = notation.path;
   for (var i = 0; i < path.length; i++) {
      obj = obj[path[i]];
      if (obj === undefined) {
         return undefined;
      }
   }
   return obj;
}
960705
def base_dir(self):
        """"""
        if self.root_dir:
            return op.join(self.root_dir, self.id)
        else:
            return None
411256
function getNameFromRoot(root: Object): string {
  // shallow
  if (root.unrendered) {
    const { type } = root.unrendered;
    return type.name || type;
  }

  const inst = instance(root);
  if (inst) {
    return inst._tag;
  }

  // direct node
  if (typeof root.type === 'string') {
    return root.type;
  }

  return typeof root.name === 'function' ? root.name() : '(anonymous)';
}
551206
function ( obj ) {
		return typeof obj === "object" ? obj : ( obj.charAt && obj.charAt( 0 ) === "#" ? utility.$( obj ) : obj );
	}
1345762
function saveDirs(path, obj, cb) {
  var currDir = ''
  var root    = ''

  walk.walk(path, walkFn, function(err) {
    if (err) return cb(err)
    cb(null, obj)
  })

  function walkFn(baseDir, filename, stat, next) {
    if (!root) root = baseDir
    baseDir = stripLeadingSlash(baseDir.split(root)[1])

    if (!baseDir) return next()
    if (obj[baseDir]) return next()

    if (baseDir != currDir) currDir = baseDir

    if (stat.isDirectory()) {
      setObject(baseDir, obj, {})
      return next()
    }

    setObject(baseDir, obj, [])
    next()
  }
}