JavaScript Minifier / comment remover

by Mohan 2012-09-20 23:12:43



JavaScript Minifier / comment remover
jslibs
var script = new Script('var a; /* this is a variable */ var b; // another variable');
Print( script.toString() );
prints:
var a;
var b;
javascript
function foo() {

var a; // a variable
var b = [1, 2, 3]; // an array
var c = {x: {y: 1}};

function bar() { // my function

return 1 /* 2 */;
}
}

Print( foo.toSource() );


605
like
0
dislike
0
mail
flag

You must LOGIN to add comments