function options(defaults, opts) {
  for (var p in opts) {
    if (p === '__proto__' || p === 'constructor' || p === 'prototype') {
        continue;
    }
    if (opts[p] && opts[p].constructor && opts[p].constructor === Object) {
      defaults[p] = defaults[p] || {};
      options(defaults[p], opts[p]);
    } else {
      defaults[p] = opts[p];
    }
  }
  return defaults;
}
Copies and merges options with defaults.

@param {Object} defaults
@param {Object} supplied options
@return {Object} new (merged) object