function addPatternSubgroup(patternlab, pattern) {
    const patternGroup = getPatternGroup(patternlab, pattern);

    patternGroup.patternGroupItems.push({
      patternSubgroupLC: _.kebabCase(pattern.patternSubgroup),
      patternSubgroupUC: _.startCase(pattern.patternSubgroup),
      patternSubgroup: pattern.patternSubgroup,
      patternSubgroupDash: pattern.patternSubgroup, //todo verify
      patternSubgroupItems: [],
      order:
        pattern.patternSubgroupData && pattern.patternSubgroupData.order
          ? Number(pattern.patternSubgroupData.order)
          : 0,
    });

    patternGroup.patternGroupItems = _.sortBy(
      patternGroup.patternGroupItems,
      'order',
      'patternSubgroup'
    );
  }
/**
   * Registers the pattern with the appropriate patternGroup.patternGroupItems object
   * This is a new menu group like atoms/global
   * @param patternlab - global data store
   * @param pattern - the pattern to register
   */
Registers the pattern with the appropriate patternGroup.patternGroupItems object
This is a new menu group like atoms/global
@param patternlab - global data store
@param pattern - the pattern to register
Registers the pattern with the appropriate patternGroup . patternGroupItems object This is a new menu group like atoms / global @param patternlab - global data store @param pattern - the pattern to register
function addPatternSubgroup(patternlab, pattern) {
    const patternGroup = getPatternGroup(patternlab, pattern);
    patternGroup.patternGroupItems.push({
      patternSubgroupLC: _.kebabCase(pattern.patternSubgroup),
      patternSubgroupUC: _.startCase(pattern.patternSubgroup),
      patternSubgroup: pattern.patternSubgroup,
      patternSubgroupDash: pattern.patternSubgroup, 
      patternSubgroupItems: [],
      order:
        pattern.patternSubgroupData && pattern.patternSubgroupData.order
          ? Number(pattern.patternSubgroupData.order)
          : 0,
    });
    patternGroup.patternGroupItems = _.sortBy(
      patternGroup.patternGroupItems,
      'order',
      'patternSubgroup'
    );
  }
function addPatternSubgroup ( patternlab , pattern ) { const patternGroup = getPatternGroup ( patternlab , pattern ) ; patternGroup . patternGroupItems . push ( { patternSubgroupLC : _ . kebabCase ( pattern . patternSubgroup ) , patternSubgroupUC : _ . startCase ( pattern . patternSubgroup ) , patternSubgroup : pattern . patternSubgroup , patternSubgroupDash : pattern . patternSubgroup , patternSubgroupItems : [ ] , order : pattern . patternSubgroupData && pattern . patternSubgroupData . order ? Number ( pattern . patternSubgroupData . order ) : 0 , } ) ; patternGroup . patternGroupItems = _ . sortBy ( patternGroup . patternGroupItems , 'order' , 'patternSubgroup' ) ; }
Registers the pattern with the appropriate patternGroup.patternGroupItems object
 This is a new menu group like atoms/global
 @param patternlab - global data store
 @param pattern - the pattern to register
Registers the pattern with the appropriate patternGroup . patternGroupItems object This is a new menu group like atoms / global @param patternlab - global data store @param pattern - the pattern to register
//todo verify