Browse Source

🔄 Refactor: Improve number formatting function

Refactored the 'convertNumbThousand' function for better readability
and added a default value for the parameter.
main
John Doe 1 year ago
parent
commit
2693347318
  1. 7
      src/utils/convertNumbThousand.ts

7
src/utils/convertNumbThousand.ts

@ -0,0 +1,7 @@
const convertNumbThousand = (x?: number): string => {
if (!x) {
return "0";
}
return x.toLocaleString("en-US");
};
export default convertNumbThousand;
Loading…
Cancel
Save