I use ES6 features with babel compiler. I have a function which takes option object as an argument:
function myFunction({ option1 = true, option2 = \'whateve
Yes, you just have to provide a default value for the complete argument:
function myFunction({option1 = true, option2 = 'whatever'} = {}) { // ^^^^ console.log(option1, option2); // do something... }