Remove parentheses around anonymous functions
bbrk24 opened this issue · 5 comments
bbrk24 commented
It seems that currently, this adds parentheses around every arrow function, such as giving:
arr.reduce(((e,t)=>e+t),0)
which could be:
arr.reduce((e,t)=>e+t,0)
coderaiser commented
Looks like default options are missing https://github.com/terser/terser, do you have any ideas what should be added?
bbrk24 commented
Hm, I'm not really sure. Providing all of them is a bit much -- at some point, you just use terser directly. To address the issue, you should at least provide the format options wrap_iife
and wrap_func_args
, and probably also the compress option negate_iife
.
coderaiser commented
Sounds reasonable, are you willing for a PR?
bbrk24 commented
Sure, if I get the chance I would like to, but I'm not sure whether I'd be able to in a reasonable amount of time.