lookUp(dict, path, subpath) {
    if (path) path = PageManager.normalizePath(path, true);
    if (subpath) subpath = PageManager.normalizePath(subpath, true);

    if (!dict[path]) {
      if (path === '/*') return null;
      return this.lookUp(dict, PageManager.getClosestWildcardPath(path), subpath);
    }
    else {
      if (typeof dict[path] === 'function') return dict[path];
      if (typeof dict[path] === 'object') {
        if (dict[path][subpath || '/*']) return dict[path][subpath || '/*'];
        if (subpath === '/*') return null;
        let d = this.lookUp(dict, path, PageManager.getClosestWildcardPath(subpath));
        if (d) return d;
        return this.lookUp(dict, PageManager.getClosestWildcardPath(path), subpath);
      }
      else {
        return null;
      }
    }
  }
/**
   * Looks up a path-keyed dictionary and returns its value.
   *
   * @param {Object} dict
   * @param {string} path
   * @param {string} subpath
   *
   * @return {*}
   */
Looks up a path-keyed dictionary and returns its value.


Looks up a path - keyed dictionary and returns its value .
lookUp(dict, path, subpath) {
    if (path) path = PageManager.normalizePath(path, true);
    if (subpath) subpath = PageManager.normalizePath(subpath, true);
    if (!dict[path]) {
      if (path === '/*') return null;
      return this.lookUp(dict, PageManager.getClosestWildcardPath(path), subpath);
    }
    else {
      if (typeof dict[path] === 'function') return dict[path];
      if (typeof dict[path] === 'object') {
        if (dict[path][subpath || '/*']) return dict[path][subpath || '/*'];
        if (subpath === '/*') return null;
        let d = this.lookUp(dict, path, PageManager.getClosestWildcardPath(subpath));
        if (d) return d;
        return this.lookUp(dict, PageManager.getClosestWildcardPath(path), subpath);
      }
      else {
        return null;
      }
    }
  }
lookUp ( dict , path , subpath ) { if ( path ) path = PageManager . normalizePath ( path , true ) ; if ( subpath ) subpath = PageManager . normalizePath ( subpath , true ) ; if ( ! dict [ path ] ) { if ( path === '/*' ) return null ; return this . lookUp ( dict , PageManager . getClosestWildcardPath ( path ) , subpath ) ; } else { if ( typeof dict [ path ] === 'function' ) return dict [ path ] ; if ( typeof dict [ path ] === 'object' ) { if ( dict [ path ] [ subpath || '/*' ] ) return dict [ path ] [ subpath || '/*' ] ; if ( subpath === '/*' ) return null ; let d = this . lookUp ( dict , path , PageManager . getClosestWildcardPath ( subpath ) ) ; if ( d ) return d ; return this . lookUp ( dict , PageManager . getClosestWildcardPath ( path ) , subpath ) ; } else { return null ; } } }
Looks up a path-keyed dictionary and returns its value.
Looks up a path - keyed dictionary and returns its value .