How can I automatically format JavaScript properly?
As an example, this:
(function(){(function(){alert('whatever')})()})()
Should become:
(function(){
(function(){
alert('whatever')
})()
})()
There is the jsbeautifier, you can find the source code at github.