lib/ObjectPaths.js
/**
   * Check whether the given path actually exists on an object
   * @param path The path to check
   * @param obj The object to check if the path exists on
   * @returns boolean whether the path exists or not
   */
Check whether the given path actually exists on an object
@param path The path to check
@param obj The object to check if the path exists on
@returns boolean whether the path exists or not
Check whether the given path actually exists on an object @param path The path to check @param obj The object to check if the path exists on @returns boolean whether the path exists or not
function hasPath(path, obj) {
    var parent = path.split('.').slice(0, -1);
    if (parent && parent.length > 1) {
      return !!_this.getPath(parent.join('.'), obj);
    } else {
      return !!obj && obj.hasOwnProperty(path);
    }
  }
function hasPath ( path , obj ) { var parent = path . split ( '.' ) . slice ( 0 , - 1 ) ; if ( parent && parent . length > 1 ) { return ! ! _this . getPath ( parent . join ( '.' ) , obj ) ; } else { return ! ! obj && obj . hasOwnProperty ( path ) ; } }
Check whether the given path actually exists on an object
 @param path The path to check
 @param obj The object to check if the path exists on
 @returns boolean whether the path exists or not
Check whether the given path actually exists on an object @param path The path to check @param obj The object to check if the path exists on @returns boolean whether the path exists or not