lbry-desktop/ui/util/number.js

6 lines
212 B
JavaScript
Raw Permalink Normal View History

// @flow
export function formatNumberWithCommas(num: number, numberOfDigits?: number): string {
return num.toLocaleString('en', { minimumFractionDigits: numberOfDigits !== undefined ? numberOfDigits : 8 });
}