title: What's the best way to initialize an object with defaults where values are omitted in Ecmascript 6?
body: <p>Let's say I want to declare an object <code>bar</code> and set it's values to be those of the object <code>foo</code>, but I'm uncertain whether <code>foo</code> will have all the requisite properties.  I also want to preserve falsy values like <code>""</code> from <code>foo</code>, rather than reverting to defaults.  For example:</p>
  
  <pre><code>var foo = somefunc();
  console.log(foo);
  //{prop1: "", prop2: "works"}
  
  var defaults = {prop1: "default1", prop2: "default2", prop3: "default3"}
  /* some piece of code */
  console.log(bar);
  //should log: {prop1: "", prop2: "works", prop3: "default3"}
  </code></pre>
  
  <p>What would be the best <code>/* some piece of code */</code> to use in Ecmascript 6 to initialize with defaults like this?</p>