JavaScript has a number formatter, and it's part of the Internationalization API
stackoverflow.com