src/utilities/object-assign/index.js
function assign( destination ) {
  destination = destination || {};
  for ( let i = 1, len = arguments.length; i < len; i++ ) {
    const source = arguments[i] || {};
    for ( const key in source ) {
      if ( Object.prototype.hasOwnProperty.call( source, key ) ) {
        const value = source[key];
        if ( _isPlainObject( value ) ) {
          assign( destination[key] || ( destination[key] = {} ), value );
        } else {
          destination[key] = value;
        }
      }
    }
  }

  return destination;
}
function assign( destination ) {
  destination = destination || {};
  for ( let i = 1, len = arguments.length; i < len; i++ ) {
    const source = arguments[i] || {};
    for ( const key in source ) {
      if ( Object.prototype.hasOwnProperty.call( source, key ) ) {
        const value = source[key];
        if ( _isPlainObject( value ) ) {
          assign( destination[key] || ( destination[key] = {} ), value );
        } else {
          destination[key] = value;
        }
      }
    }
  }

  return destination;
}
function assign ( destination ) { destination = destination || { } ; for ( let i = 1 , len = arguments . length ; i < len ; i ++ ) { const source = arguments [ i ] || { } ; for ( const key in source ) { if ( Object . prototype . hasOwnProperty . call ( source , key ) ) { const value = source [ key ] ; if ( _isPlainObject ( value ) ) { assign ( destination [ key ] || ( destination [ key ] = { } ) , value ) ; } else { destination [ key ] = value ; } } } } return destination ; }
Copies properties of all sources to the destination object overriding its own
existing properties. When assigning from multiple sources, fields of every
next source will override same named fields of previous sources.

@param {Object} destination object.
@returns {Object} assigned destination object.
Copies properties of all sources to the destination object overriding its own existing properties . When assigning from multiple sources fields of every next source will override same named fields of previous sources .