Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

255 B
Raw Blame
export const pluralize = (
  word: string,
  count: number,
  options: {
    plural?: string;
  } = {},
) => {
  if (count === 1) {
    return word;
  }

  // Use custom plural form if provided, otherwise add 's'
  return options.plural || `${word}s`;
};