Y
Hacker News
new
|
ask
|
show
|
jobs
by
epidemian
3306 days ago
> Particular to have cleaner diffs. But why for function calls?
Exactly the same reason :)
1 comments
koolba
3306 days ago
I suppose but that's usually an indication that an object would be more apt. If you have enough parameters that it needs to be wrapped, they're probably hard to track too.
link
piezoney
3306 days ago
Well no, since you can use object destructuring.
const fn = ( { arg1 = '', arg2 = [], arg3 = true } = {} ) => { }
link
scottmf
3305 days ago
But isn't this already valid with trailing commas?
link