The blog of Sebastián Gurin about software development. "A place to store those little things that time will erase if not written...."
var esprima = require('esprima'), escodegen = require('escodegen'); function doUglify(s) { try { var ast = esprima.parse(s); s = escodegen.generate(ast, {format: escodegen.FORMAT_MINIFY}) || s; } catch(ex) { console.log(ex); } return s; }