Deeply assigns the properties of the source object to the target object

@param {object} target
@param {object} source
769833
function deepAssign (target, source) {
  var keys = Object.keys(source);

  for (var i = 0; i < keys.length; i++) {
    var key = keys[i];
    var oldValue = target[key];
    var newValue = source[key];

    target[key] = deepClone(newValue, oldValue);
  }

  return target;
}
141198
function extend (target, source) {
	var a = Object.create(target);

	Object.keys(source).map(function (prop) {
		prop in a && (a[prop] = source[prop]);
	});
	
	return a;
}
706487
function(target, obj){
      for (var attr in obj) {
        if(obj.hasOwnProperty(attr)){
          target[attr] = obj[attr];
        }
      }
      return target;
    }
727614
function extend(target, source, modify) {
    var result = target ? modify ? target : extend({}, target, true) : {};
    if (!source) return result;
    for (var key in source) {
        if (source.hasOwnProperty(key) && source[key] !== undefined) {
            result[key] = source[key];
        }
    }
    return result;
}
330073
public static void copyProperties(Object source, Object target, boolean ignoreCase) {
		BeanCopier.create(source, target, CopyOptions.create().setIgnoreCase(ignoreCase)).copy();
	}
341828
function (target, source, override) {
            //Use an empty object to avoid other bad JS code that modifies
            //Object.prototype.
            var empty = {}, prop;
            for (prop in source) {
                if (override || !(prop in target)) {
                    target[prop] = source[prop];
                }
            }
        }
1350923
private void updateProperties(T target, Map<String, Object> source) {
        Map<String, PropertyDescriptor> mapTargetProps = MappingUtils.mapPropertyDescriptors(target.getClass());

        for (String sourceKey : source.keySet()) {
            if (mapTargetProps.containsKey(sourceKey) == true) {
                MappingUtils.callSetter(target, mapTargetProps.get(sourceKey), source.get(sourceKey));
            }
        }
    }
1095979
function copyObject(source) {
  var target = {};
  for (var key in source)
    target[key] = source[key];
  return target;
}
985869
public static void set(PropertyKey key, Object value, Source source) {
    sConf.set(key, value, source);
  }
1249302
function extend(target, source) {
  var keys = Object.keys(source);
  for(var i = 0, len = keys.length; i < len; i++) {
    var key = keys[i];
    target[key] = source[key];
  }
  return target;
}
558856
function clone(target) {
  if (target == null || typeof target !== "object") return target;
  var cloned = target.constructor ? target.constructor() : Object.create(null);
  for (var attr in target) {
    if (target.hasOwnProperty(attr)) {
      cloned[attr] = target[attr];
    }
  }
  return cloned;
}
867360
function assign(target) {
  if (target === undefined || target === null) {
    throw new TypeError('Cannot convert first argument to object');
  }
  const to = Object(target);
  for (let i = 1; i < arguments.length; i++) {
    const source = arguments[i];
    if (source === undefined || source === null) {
      continue;
    }
    const keys = Object.keys(Object(source));
    for (const key of keys) {
      const desc = Object.getOwnPropertyDescriptor(source, key);
      if (desc !== undefined && desc.enumerable) {
        to[key] = source[key];
      }
    }
  }
  return to;
}
923783
function copyAugment (target, src, keys) {
  for (let i = 0, l = keys.length; i < l; i++) {
    const key = keys[i]
    def(target, key, src[key])
  }
}
892181
function swap(source, target) {
  // wrap to allow string selectors, arrays etc.
  source = $(source);
  target = $(target);
  source.each(function(el, index) {
    var content = target.get(index);
    if(el.parentNode && content) {
      // deep clone template partial
      content = content.cloneNode(true);
      // replace sourc element with cloned target element
      el.parentNode.replaceChild(content, el);
    }
  })
}
638424
public static void copyProperties(Object target, Object source) throws IkasoaException {
		Class<?> sourceClz = source.getClass(), targetClz = target.getClass();
		Field[] fields = sourceClz.getDeclaredFields();
		if (fields.length == 0)
			fields = sourceClz.getSuperclass().getDeclaredFields();
		for (short i = 0; i < fields.length; i++) {
			String fieldName = fields[i].getName();
			Field targetField = null;
			try {
				targetField = targetClz.getDeclaredField(fieldName);
			} catch (NoSuchFieldException e) {
				try {
					targetField = targetClz.getSuperclass().getDeclaredField(fieldName);
				} catch (NoSuchFieldException | SecurityException e1) {
					throw new IkasoaException(e1);
				}
			}
			if (fields[i].getType() == targetField.getType()) {
				String getMethodName = new StringBuilder("get").append(fieldName.substring(0, 1).toUpperCase())
						.append(fieldName.substring(1)).toString();
				String setMethodName = new StringBuilder("set").append(fieldName.substring(0, 1).toUpperCase())
						.append(fieldName.substring(1)).toString();
				Method getMethod, setMethod;
				try {
					try {
						getMethod = sourceClz.getDeclaredMethod(getMethodName, new Class[] {});
					} catch (NoSuchMethodException e) {
						getMethod = sourceClz.getSuperclass().getDeclaredMethod(getMethodName, new Class[] {});
					}
					try {
						setMethod = targetClz.getDeclaredMethod(setMethodName, fields[i].getType());
					} catch (NoSuchMethodException e) {
						setMethod = targetClz.getSuperclass().getDeclaredMethod(setMethodName, fields[i].getType());
					}
					setMethod.invoke(target, getMethod.invoke(source, new Object[] {}));
				} catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
					throw new IkasoaException(e);
				} catch (NoSuchMethodException e) {
				} catch (Exception e) {
					log.warn("Object copy failed : {}", e.getMessage());
				}
			} else {
				throw new IkasoaException("Object copy failed ! Attribute type error !");
			}
		}
	}
972145
function mergeDeep(target, ...sources) {
  if (!sources.length) return target;
  const source = sources.shift();

  if (isObject(target) && isObject(source)) {
    for (const key in source) {
      if (isObject(source[key])) {
        if (!target[key]) Object.assign(target, { [key]: {} });
        mergeDeep(target[key], source[key]);
      } else {
        Object.assign(target, { [key]: source[key] });
      }
    }
  }

  return mergeDeep(target, ...sources);
}
31778
function _assign(target, ...sources) {

    sources.forEach(source => {
        Object.keys(source || {}).forEach(
            key => target[key] = source[key]
        );
    });

    return target;
}