Skip to content

The open alternative to Salesforce, designed for AI.

223 B
Raw Blame
export const getMaxLabelLength = (labels?: string[]) => {
  if (!labels || labels.length === 0) {
    return 0;
  }

  return labels.reduce(
    (maxLength, label) => Math.max(maxLength, label?.length ?? 0),
    0,
  );
};