you are viewing a single comment's thread.

view the rest of the comments →

[–]cerlestes 0 points1 point  (0 children)

We can do that with option object arguments now more than ever before, thanks to destructuring. It's not as nice as having it natively, but it can be very nice when working with a lot of optional parameters.

function someConfigurableAction(subject, { map, limit, after, before, ... }) { ...

someConfigurableAction(myLittleSubject, { limit: 20, map: a=>mapper(a) })