Creates immutable (shallow) copy of the provided objects

@param   {...object} from - object(s) to merge with
@returns {object} mixed result new object
350641
function mixImmutable()
{
  var args = Array.prototype.slice.apply(arguments);
  return append.apply(null, [{}].concat(args));
}
1037608
function merge(source, target) {
    if (target == null) {
        return clone(source);
    }
    if (source == null) {
        return clone(target);
    }
    if (typeof source !== 'object' || typeof target !== 'object') {
        return clone(target);
    }
    const merge = (source, target) => {
        Object.keys(target).forEach(key => {
            if (source[key] == null) {
                source[key] = target[key];
            } else if (typeof source[key] === 'object') {
                if (typeof target[key] === 'object') {
                    merge(source[key], target[key]);
                } else {
                    source[key] = target[key];
                }
            } else {
                source[key] = target[key];
            }
        });

        return source;
    };

    return merge(clone(source), clone(target));
}
1244362
public static void copyJoins(From<?, ?> from, From<?, ?> to) {
        for (Join<?, ?> j : from.getJoins()) {
            Join<?, ?> toJoin = to.join(j.getAttribute().getName(), j.getJoinType());
            toJoin.alias(getOrCreateAlias(j));

            copyJoins(j, toJoin);
        }

        for (Fetch<?, ?> f : from.getFetches()) {
            Fetch<?, ?> toFetch = to.fetch(f.getAttribute().getName());
            copyFetches(f, toFetch);

        }
    }
1281680
function _cloneObject(object) {
    if (object == null || typeof object != 'object' || typeof object.nodeType != 'undefined') {
        return object;
    }
    var temp = {};
    for (var key in object) {
        if (typeof jQuery != 'undefined' && object[key] instanceof jQuery) {
            temp[key] = object[key];
        } else {
            temp[key] = _cloneObject(object[key]);
        }
    }
    return temp;
}
709945
function cloneObj(obj, exclude) {
  var type = _typeof(obj);

  switch (type) {
    case 'undefined':
    case 'boolean':
    case 'nuber':
    case 'string':
    case 'function':
      return obj;
      break;

    case 'object':
      if (obj === null) {
        // null is object
        return obj;
      }

      var r;

      if (isArray(obj)) {
        r = [];
        var _iteratorNormalCompletion3 = true;
        var _didIteratorError3 = false;
        var _iteratorError3 = undefined;

        try {
          for (var _iterator3 = obj[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
            var item = _step3.value;
            r.push(cloneObj(item, exclude));
          }
        } catch (err) {
          _didIteratorError3 = true;
          _iteratorError3 = err;
        } finally {
          try {
            if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
              _iterator3.return();
            }
          } finally {
            if (_didIteratorError3) {
              throw _iteratorError3;
            }
          }
        }
      } else {
        r = {};

        for (var _i7 = 0, _Object$keys2 = Object.keys(obj); _i7 < _Object$keys2.length; _i7++) {
          var key = _Object$keys2[_i7];

          if (!exclude || isArray(exclude) && !exclude.includes(key) || !exclude(key, obj[key], obj)) {
            r[key] = cloneObj(obj[key], exclude);
          }
        }
      }

      return r;
      break;

    default:
      return obj;
      break;
  }
}
791546
function merge() {
  let i = 1
    , key
    , val
    , obj
    , target
    ;

  // make sure we don't modify source element and it's properties
  // objects are passed by reference
  target = clone( arguments[0] );
  while (obj = arguments[i++]) {
    for (key in obj) {
      if ( !hasOwn(obj, key) ) {
          continue;
      }

      val = obj[key];
      if ( isObject(val) && isObject(target[key]) ){
        // inception, deep merge objects
        target[key] = merge(target[key], val);
      } else {
        let is_url = val && val.type == url;
        let is_path = val && val.type == path;

        // make sure arrays, regexp, date, objects are cloned
        target[key] = clone(val);
        if( is_url ){
          target[key].type = url;
        }

        if( is_path ){
          target[key].type = path;
        }
      }
    }
  }
  return target;
}
16508
function clone(source) {
    var ret = {};
    for (var prop in source) {
      ret[prop] = source[prop];
    }
    return ret;
  }
616220
function expand(to, from) {

   const keys = Object.keys(from)
   for (const key of keys) {
      if (!to.hasOwnProperty(key))
         to[key] = from[key]
   }

}
617147
function mergeObjectsInGecko(origin, add, opts) {
    "use strict";

    var options = opts || {},
        keepReferences = options.keepReferences;

    for (var p in add) {
        if (isPlainObject(add[p])) {
            if (isPlainObject(origin[p])) {
                origin[p] = mergeObjects(origin[p], add[p]);
            } else {
                origin[p] = keepReferences ? add[p] : clone(add[p]);
            }
        } else {
            // if a property is only a getter, we could have a Javascript error
            // in strict mode "TypeError: setting a property that has only a getter"
            // when setting the value to the new object (gecko 25+).
            // To avoid it, let's define the property on the new object, do not set
            // directly the value
            var prop = Object.getOwnPropertyDescriptor(add, p);
            if (prop.get && !prop.set) {
                Object.defineProperty(origin, p, prop);
            }
            else {
                origin[p] = add[p];
            }
        }
    }
    return origin;
}
885009
function clone (obj) {
  if(!isObject(obj, true)) return obj
  var _obj
  _obj = Array.isArray(obj) ? [] : {}
  for(var k in obj) _obj[k] = clone(obj[k])
  return _obj
}
850728
function( obj1, obj2 ) {
            var newObj = {};
            if ( obj1 ) {
                this.inheritAttrs( newObj, this.cloneObj( obj1 ) );
            }
            if ( obj2 ) {
                this.inheritAttrs( newObj, obj2 );
            }
            return newObj;
        }
1095979
function copyObject(source) {
  var target = {};
  for (var key in source)
    target[key] = source[key];
  return target;
}
368518
function clone(value, deep) {
    if (Array.isArray(value)) {
      if (deep) {
        return value.map(function(value) {
          return clone(value, deep);
        });
      } else {
        return value.slice();
      }
    } else if (value && typeof value === 'object') {
      if (value.valueOf() !== value) {
        return new value.constructor(value.valueOf());
      } else {
        var copy = {};
        for (var key in value) {
          var objValue = value[key];
          if (deep) {
            objValue = clone(objValue, deep);
          }
          copy[key] = objValue;
        }
        return copy;
      }
    } else {
      return value;
    }
  }
998549
public static function copy($names, $from, &$to)
    {
        if (is_array($from) && is_array($to)) {
            foreach ($names as $key) {
                if (isset($from[$key]) && !isset($to[$key])) {
                    $to[$key] = static::getValue($from, $key);
                }
            }
        }
        return $to;
    }
1304680
function fromObject (obj) {
  let polygons = obj.polygons.map(polygonLike => poly3.fromObject(polygonLike))
  let shape3 = fromPolygons(polygons)
  shape3.isCanonicalized = obj.isCanonicalized
  shape3.isRetesselated = obj.isRetesselated
  return shape3
}
502006
function clone(obj) {
    if (Array.isArray(obj)) {
        return obj.map(clone);
    } else if (typeof obj === 'object') {
        var copy = {};
        Object.keys(obj).forEach(function (key) {
            copy[key] = clone(obj[key]);
        });
        return copy;
    }
    return obj;
}
216421
function merge(iterable /* ...iterbles */) {
    var map = anObject(this);
    var setter = aFunction(map.set);
    var i = 0;
    while (i < arguments.length) {
      iterate(arguments[i++], setter, map, true);
    }
    return map;
  }