src/illustrator/swatches.js
function getColorGroups(colors) {
  var colorGroups = [];

  colors.forEach(function (color) {
    if (colorGroups.indexOf(color.group) < 0) {
      colorGroups.push(color.group);
    }
  });

  return colorGroups;
}
function getColorGroups(colors) {
  var colorGroups = [];

  colors.forEach(function (color) {
    if (colorGroups.indexOf(color.group) < 0) {
      colorGroups.push(color.group);
    }
  });

  return colorGroups;
}
function getColorGroups ( colors ) { var colorGroups = [ ] ; colors . forEach ( function ( color ) { if ( colorGroups . indexOf ( color . group ) < 0 ) { colorGroups . push ( color . group ) ; } } ) ; return colorGroups ; }
Returns an array of unique group names.

@param   {Array} colors
@returns {Array)
Returns an array of unique group names .