Calling lodash _.defaults() before Object.defineProperty()
I don't believe so _.defaults. The properties will be set on this but be enumerable. The call to Object.defineProperty  will just set those properties to not enumerable. If the property didn't exist then the value would be set as undefined and default descriptors.

Let's break out only the necessary.

Empty object.


var x = {};
console.log(Object.getOwnPropertyDescriptor(x, 'clientId'));




Object with clientId set.


var x = {
  clientId: 1
};
console.log(Object.getOwnPropertyDescriptor(x, 'clientId'));




Empty object.


var x = Object.defineProperty({}, 'clientId', {
  enumerable: false
});
console.log(Object.getOwnPropertyDescriptor(x, 'clientId'));



Note that the default descriptors are set.

Object with clientId set.


var x = Object.defineProperty({
  clientId: 1
}, 'clientId', {
  enumerable: false
});
console.log(Object.getOwnPropertyDescriptor(x, 'clientId'));




So if anything were to give you a problem then it would be this situation.



var x = Object.defineProperty({}, 'clientId', {
  enumerable: false
});
console.log(Object.getOwnPropertyDescriptor(x, 'clientId'));
x.clientId = 1;
console.log(Object.getOwnPropertyDescriptor(x, 'clientId'));