1

Duplicate:

Javascript Beautifier


Is there a way I can auto format my javascript so its readable?

I have a javascript file that is just one line but about a million columns white. I don't want to go through and tab through each function just so I can read it.

Anyone know of a program that will do this for me?

Thanks!

Community
  • 1
  • 1
hanesjw
  • 2,356
  • 4
  • 26
  • 34
  • 2
    @hanesjw: yes, there are programs and websites that will do this for you - see the answers to: http://stackoverflow.com/questions/18985/javascript-beautifier – Shog9 Apr 22 '09 at 23:33
  • 3
    Try googling 'js beautifier' :) – karim79 Apr 22 '09 at 23:35
  • 1
    If it's a duplicate, shouldn't it be closed? – lothar Apr 22 '09 at 23:47
  • 1
    @lothar: I voted to close. It takes 4 others to actually close it, but if i don't provide the link then poor hanesjw is left wondering why it's being voted on! – Shog9 Apr 22 '09 at 23:51

1 Answers1

1

On OS X use Textmate with the JavaScript bundle.

Bjorn
  • 69,215
  • 39
  • 136
  • 164