framework/js/lib/utils/format-number.js

4 lines
102 B
JavaScript
Raw Normal View History

export default function(number) {
return number.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
}