I am trying to use the Object Spread syntax like so:
let credentialsWithAuth = { ...credentials, type: 'basic' }
Where credentials is an object with username and password as keys and values. But this blows up with SyntaxError: Unexpected token ...
So do I have to setup node with babel for this to work? I thought native support was now built in.
Can't I use this without Object.assign
etc?
Could someone please clarify?