As you know, trailing commas break IE.
Is there a tool that, given a directory, it can traverse all its subdirectories, and scan all *.js files....removing trailing commas from them?
As you know, trailing commas break IE.
Is there a tool that, given a directory, it can traverse all its subdirectories, and scan all *.js files....removing trailing commas from them?
I'd use JSLint.
var x = {a: "", b: "", };
Results in:
Error:
Problem at line 1 character 22: Unexpected ','.
var x = {a: "", b: "", };
Unfortunately, this doesn't traverse directories and do the removal. However, this leads to these answers, which may be helpful: