javascript beautifier that handles comma statements

Viewed 210

uglifyjs replaces all semicolons with commas where possible, https://github.com/beautify-web/js-beautify which it seems like 100% of JS web formatter tools use, keeps comma statements as a long string. Is there a code beautifier that will add newlines and semicolons back to JS code? seems easy because all the assignments are in void context. example below.

var a = t.appendChild(document.createElement("meta"));
    a.content = "IE=edge", a.httpEquiv = "X-UA-Compatible",
1 Answers

You can try Prettier, it should put the next variable on a newline

Related