automatic indent and clean up of js code?

I

ivanhoe

I need something like html tidy, but for javascript...to fix code
indentation, converts tab/spaces, removes white space, etc...maybe even fast
check sintax and warn on compatibility issues, but I guess it's too much to
ask (?!)

if you have positive expirience with some application(or perl/php script)
that knows how to properly do this (and is customizible and maybe also free
or at least cheap?), please speak up, since all progs I tried so far were
(very) far from perfect...


thanx in advance,
ivan
 
I

Ivo

ivanhoe said:
I need something like html tidy, but for javascript...to fix code
indentation, converts tab/spaces, removes white space, etc...maybe even fast
check sintax and warn on compatibility issues, but I guess it's too much to
ask (?!)

jslint, a 'script validator':
if you have positive expirience with some application(or perl/php script)
that knows how to properly do this (and is customizible and maybe also free
or at least cheap?), please speak up, since all progs I tried so far were
(very) far from perfect...

That is why you will write your own.
thanx in advance,
ivan

H
Ivo
 
J

Jim Ley

I need something like html tidy, but for javascript...to fix code
indentation, converts tab/spaces, removes white space, etc...maybe even fast
check sintax and warn on compatibility issues, but I guess it's too much to
ask (?!)

astyle (in addition to the lint you've already been told about.)

both free of course.

Jim.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top