As stated in the blog, the Formspider framework had a Java renderer that uses DecimalFormat and we needed the same functionality on the javascript side which means formatting numbers with variable masks such as "$#,#00.0#" or "00.0##%" that is defined by the user. So sprintf is not the same.
By the way, this code was wrtiten in 2008.
https://www.youtube.com/watch?v=LXJ5jrvDuEk
https://www.youtube.com/watch?v=HTL5-0DDqE4
https://www.youtube.com/watch?v=cUKlYjQEQGY
https://www.youtube.com/watch?v=hUnTg5v4tDU