code: function treeWalker(registryJson) {
    if (registryJson.registry) {
      return treeWalker(registryJson.registry);
    }
  
    const portlets = registryJson.portlets || [];
  
    if (registryJson.categories) {
      return portlets
          .concat(registryJson.categories.map(portletRegistryToArray))
          .reduce(flatten, []);
    }
    if (registryJson.subcategories) {
      return portlets
          .concat(registryJson.subcategories.map(portletRegistryToArray))
          .reduce(flatten, []);
    }
  
    return portlets;
  }
docs: Walks the portlet registry tree
  @param {Object} registryJson Portlet Registry Tree
  @return {Array<Portlet>} list of portlets