Skip to content Skip to sidebar Skip to footer

Properly Formatting JavaScript In JavaScript

How can I automatically format JavaScript properly? As an example, this: (function(){(function(){alert('whatever')})()})() Should become: (function(){ (function(){ ale

Solution 1:

There is the jsbeautifier, you can find the source code at github.


Solution 2:

Try http://jsbeautifier.org/ - it's the same one used by jsfiddle.net on their "Tidy Up" button where you can try it out.


Post a Comment for "Properly Formatting JavaScript In JavaScript"