docs: function sortGroups(selector) {
    selector.each((subSelector) => {
      subSelector.nodes.sort((a, b) => {
        // different types cannot be sorted
        if (a.type !== b.type) {
          return 0;
        }
  
        // sort alphabetically
        return a.value < b.value ? -1 : 1;
      });
    });
  
    selector.sort((a, b) => (a.nodes.join('') < b.nodes.join('') ? -1 : 1));
  }