How can I automatically format JavaScript properly?
As an example, this:
(function(){(function(){alert('whatever')})()})()
Should become:
(function(){
(function(){
alert('whatever')
})()
})()
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.
Try http://jsbeautifier.org/ - it's the same one used by jsfiddle.net on their "Tidy Up" button where you can try it out.
© 2022 - 2024 — McMap. All rights reserved.