5 lines
131 B
TypeScript
5 lines
131 B
TypeScript
export function formatPercentage(pct: number) {
|
|
const prefix = pct > 0 ? "+" : "";
|
|
return `${prefix}${pct.toFixed(2)}%`;
|
|
}
|