export default function truncateCSV(strings = [], max = Infinity) {
  const count = strings.length;

  if (max === 0) {
    return `${count}`;
  }

  if (count <= max) {
    return strings.join(", ");
  }

  return `${strings.slice(0, max).join(", ")}, +${count - max} more`;
}