@shopgate/engage
Version:
Shopgate's ENGAGE library.
5 lines • 501 B
JavaScript
/**
* Collects all display sub-groups from the properties.
* @param {Array} [properties=null] The properties to parse.
* @returns {Array}
*/export function getSubgroupsFromProperties(){var properties=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;var subgroups=[];if(properties===null){return subgroups;}properties.forEach(function(property){if(property.subDisplayGroup&&!subgroups.includes(property.subDisplayGroup)){subgroups.push(property.subDisplayGroup);}});return subgroups;}