Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

307 B
Raw Blame
export const calcGrowthPercentage = (currentCount: number, previousCount: number) => {
  if (typeof currentCount !== 'number') return 0;
  return previousCount !== 0
    ? ((currentCount - previousCount) / previousCount) * 100 // Calculate growth percentage
    : currentCount > 0
      ? 100
      : 0;
};