function addToViewAllPaths(patternlab, pattern) {
    if (!patternlab.viewAllPaths[pattern.patternGroup]) {
      patternlab.viewAllPaths[pattern.patternGroup] = {};
    }

    if (
      !patternlab.viewAllPaths[pattern.patternGroup][pattern.patternSubgroup] &&
      pattern.patternSubgroup
    ) {
      // note these retain any number prefixes if present, because these paths match the filesystem
      patternlab.viewAllPaths[pattern.patternGroup][
        pattern.patternSubgroup
      ] = `${pattern.patternGroup}-${pattern.patternSubgroup}`;
    }

    // add all if it does not exist yet
    if (!patternlab.viewAllPaths[pattern.patternGroup].all) {
      patternlab.viewAllPaths[pattern.patternGroup].all = pattern.patternGroup;
    }
  }
/**
   * Registers the pattern with the viewAllPaths object for the appropriate patternGroup and patternSubgroup
   * @param patternlab - global data store
   * @param pattern -  the pattern to add
   */
Registers the pattern with the viewAllPaths object for the appropriate patternGroup and patternSubgroup
@param patternlab - global data store
@param pattern -  the pattern to add
Registers the pattern with the viewAllPaths object for the appropriate patternGroup and patternSubgroup @param patternlab - global data store @param pattern - the pattern to add
function addToViewAllPaths(patternlab, pattern) {
    if (!patternlab.viewAllPaths[pattern.patternGroup]) {
      patternlab.viewAllPaths[pattern.patternGroup] = {};
    }
    if (
      !patternlab.viewAllPaths[pattern.patternGroup][pattern.patternSubgroup] &&
      pattern.patternSubgroup
    ) {
      patternlab.viewAllPaths[pattern.patternGroup][
        pattern.patternSubgroup
      ] = `${pattern.patternGroup}-${pattern.patternSubgroup}`;
    }
    if (!patternlab.viewAllPaths[pattern.patternGroup].all) {
      patternlab.viewAllPaths[pattern.patternGroup].all = pattern.patternGroup;
    }
  }
function addToViewAllPaths ( patternlab , pattern ) { if ( ! patternlab . viewAllPaths [ pattern . patternGroup ] ) { patternlab . viewAllPaths [ pattern . patternGroup ] = { } ; } if ( ! patternlab . viewAllPaths [ pattern . patternGroup ] [ pattern . patternSubgroup ] && pattern . patternSubgroup ) { patternlab . viewAllPaths [ pattern . patternGroup ] [ pattern . patternSubgroup ] = ` ${ pattern . patternGroup } ${ pattern . patternSubgroup } ` ; } if ( ! patternlab . viewAllPaths [ pattern . patternGroup ] . all ) { patternlab . viewAllPaths [ pattern . patternGroup ] . all = pattern . patternGroup ; } }
Registers the pattern with the viewAllPaths object for the appropriate patternGroup and patternSubgroup
 @param patternlab - global data store
 @param pattern -  the pattern to add
Registers the pattern with the viewAllPaths object for the appropriate patternGroup and patternSubgroup @param patternlab - global data store @param pattern - the pattern to add
// note these retain any number prefixes if present, because these paths match the filesystem // add all if it does not exist yet