code: function assignDefaults(defaults, options) {
    var keys = Object.keys(defaults),
        i = keys.length,
        k;
  
    options = options || {};
  
    while (i--) {
      k = keys[i];
      if (!(k in options)) {
        options[k] = defaults[k];
      }
    }
  
    return options;
  }
docs: /*!
  COPIED FROM MONGOOSE CODE BASE (lib/utils.js).
  
  Shallow copies defaults into options.
  
  @param {Object} defaults
  @param {Object} options
  @return {Object} the merged object
  @api private