When I run JSFormat, it turns:
function( stuff ) {
into
function(stuff) {
How do I prevent this behavior?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Unfortunately there is no option for that. JSFormat uses the JS Beautifier lib which trims all whitespace not associated with language syntax.
If you know Python you can edit the source of jsbeautifier.py to exclude function trimming.
If you want to be really rough you could write a regex that just parses the file after it’s done and modify your functions. Something like
which would find
function (stuff) {