Skip to content

The open alternative to Salesforce, designed for AI.

303 B
Raw Blame
import { isDefined } from 'twenty-shared/utils';

export function formatCompactCount(
  value: number | null,
  locale: string,
): string | null {
  if (!isDefined(value)) return null;
  return new Intl.NumberFormat(locale, {
    notation: 'compact',
    maximumFractionDigits: 1,
  }).format(value);
}