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"