5 lines
116 B
JavaScript
5 lines
116 B
JavaScript
export const getPercentage = (value, total) => {
|
|
if (!value || !total) return 0;
|
|
return (value / total) * 100;
|
|
};
|