Y
Yoo
Is there an online javascript formatter that pass the following five
tests? Is there at least one that pass all five tests except test 2?
Test 1 : make the following code look good.
var s= abc( a , b,c)
Only JFC among the following three tools modifies the spacing of this
code.
Bookmarklet Builder (BB)
http://subsimple.com/bookmarklets/jsbuilder.htm
Click Me - Scriptedit (CMS)
http://4umi.com/web/bookmarklet/edit.htm
Javascript Format and Color (JFC)
http://javascript.about.com/library/blformat.htm
Test 2 : Don't destroy the following code.
a = 1
b = 2
BB, CMS and JFC, all of them change this code into:
a = 1b = 2
Test 3 : Don't destroy the following code.
a/**/=/**/1//if(1){a=1} /*
b=1/*abc
// */c=1
CMS destroys this code changing the code into:
a$1=$11
b=1/*abc
Test 4 : Indent function bodies of the following.
abc(function(){s=1;s=2},function(){s=1;s=2},{a:1,b:2})
Only JFC indents function bodies
Test 5 : Indent the following.
if(s)b=1;else c=2
Only BB indents both b=1 and c=2.
Summary
1 2 3 4 5
BB o o
CMS
JFC o o o
tests? Is there at least one that pass all five tests except test 2?
Test 1 : make the following code look good.
var s= abc( a , b,c)
Only JFC among the following three tools modifies the spacing of this
code.
Bookmarklet Builder (BB)
http://subsimple.com/bookmarklets/jsbuilder.htm
Click Me - Scriptedit (CMS)
http://4umi.com/web/bookmarklet/edit.htm
Javascript Format and Color (JFC)
http://javascript.about.com/library/blformat.htm
Test 2 : Don't destroy the following code.
a = 1
b = 2
BB, CMS and JFC, all of them change this code into:
a = 1b = 2
Test 3 : Don't destroy the following code.
a/**/=/**/1//if(1){a=1} /*
b=1/*abc
// */c=1
CMS destroys this code changing the code into:
a$1=$11
b=1/*abc
Test 4 : Indent function bodies of the following.
abc(function(){s=1;s=2},function(){s=1;s=2},{a:1,b:2})
Only JFC indents function bodies
Test 5 : Indent the following.
if(s)b=1;else c=2
Only BB indents both b=1 and c=2.
Summary
1 2 3 4 5
BB o o
CMS
JFC o o o