code: function mix(receiver, supplier, overwrite) {
      var key;
  
      if (!receiver || !supplier) {
          return receiver || {};
      }
  
      for (key in supplier) {
          if (supplier.hasOwnProperty(key)) {
              if (overwrite || !receiver.hasOwnProperty(key)) {
                  receiver[key] = supplier[key];
              }
          }
      }
  
      return receiver;
  }
docs: mix & merge lifted from yui-base, simplified