lib/utils.js
function mergeObjects (o1, o2) {
  let m = Object.assign({}, o1)
  for (let attr in o2) {
    let v = o2[attr]

    if (attr in m && isPlainObject(v) && isPlainObject(m[attr]))
      m[attr] = mergeObjects(m[attr], v)
    else
      m[attr] = v
  }
  return m
}
function mergeObjects (o1, o2) {
  let m = Object.assign({}, o1)
  for (let attr in o2) {
    let v = o2[attr]

    if (attr in m && isPlainObject(v) && isPlainObject(m[attr]))
      m[attr] = mergeObjects(m[attr], v)
    else
      m[attr] = v
  }
  return m
}
function mergeObjects ( o1 , o2 ) { let m = Object . assign ( { } , o1 ) for ( let attr in o2 ) { let v = o2 [ attr ] if ( attr in m && isPlainObject ( v ) && isPlainObject ( m [ attr ] ) ) m [ attr ] = mergeObjects ( m [ attr ] , v ) else m [ attr ] = v } return m }
Merges objects recursively. Conflicts are resolved by privileging the second argument.
@returns {object} Recursively merged object
@param {object} o1 - First object to merge: taken as the base
@param {object} o2 - Second object to merge: overwrites the base
Merges objects recursively . Conflicts are resolved by privileging the second argument .