There is not a built-in number formatter for JavaScript, but there are some libraries that accomplish this:
- underscore.string provides an sprintf function (along with many other useful formatters)
- javascript-sprintf, which underscore.string borrows from.