Recursively copy keys from `source` to `target`, skipping truthy values already in `target` so parent values can block child values
@private
967491
function deepAssign(target, source) {
	//if they aren't both objects, use target if it is defined (null/0/false/etc. are OK), otherwise use source
	if (!(target && source && typeof target==='object' && typeof source==='object')) {
		return typeof target !== 'undefined' ? target : source;
	}

	let out = assign({}, target);
	for (let i in source) {
		if (source.hasOwnProperty(i)) {
			out[i] = deepAssign(target[i], source[i]);
		}
	}
	return out;
}
1273774
function() {
			var options, name, src, copy, copyIsArray, clone,
				target = arguments[0] || {},
				i = 1,
				length = arguments.length;


			// Handle case when target is a string or something (possible in deep copy)
			if (typeof target !== 'object' && typeof target !== 'function') {
				target = {};
			}

			for ( ; i < length; i++ ) {
				// Only deal with non-null/undefined values
				if ( (options = arguments[ i ]) !== null ) {
					// Extend the base object
					for ( name in options ) {
						src = target[ name ];
						copy = options[ name ];

						// Prevent never-ending loop
						if ( target === copy ) {
							continue;
						}

						// Recurse if we're merging plain objects or arrays
						if ( copy && ( typeof copy === 'object' || (copyIsArray = Array.isArray(copy)) ) ) {
							if ( copyIsArray ) {
								copyIsArray = false;
								clone = src && Array.isArray(src) ? src : [];

							} else {
								clone = src && typeof src === 'object' ? src : {};
							}

							// Never move original objects, clone them
							target[ name ] = this.deepMerge(clone, copy );

						// Don't bring in undefined values
						} else if ( copy !== undefined ) {
							target[ name ] = copy;
						}
					}
				}
			}

			// Return the modified object
			return target;
		}
979682
function deepCopy(destination, source) {
    Object.keys(source).forEach(function (property) {
        if (destination[property] && isObject(destination[property])) {
            deepCopy(destination[property], source[property]);
        } else {
            destination[property] = source[property];
        }
    });
}
1260842
function copyOwnProperties(source, target, ignorePropertyNames = []) {
  Object.getOwnPropertyNames(source).forEach(name => {
    if (ignorePropertyNames.indexOf(name) < 0) {
      const descriptor = Object.getOwnPropertyDescriptor(source, name);
      Object.defineProperty(target, name, descriptor);
    }
  });
  return target;
}
1236605
function(source) {
		if (helpers.isArray(source)) {
			return source.map(helpers.clone);
		}

		if (helpers.isObject(source)) {
			var target = {};
			var keys = Object.keys(source);
			var klen = keys.length;
			var k = 0;

			for (; k < klen; ++k) {
				target[keys[k]] = helpers.clone(source[keys[k]]);
			}

			return target;
		}

		return source;
	}
1143012
function copyDeep(source) {
    for (var
      key, descriptor, value,
      target = create(gPO(source)),
      names = oK(source),
      i = 0; i < names.length; i++
    ) {
      key = names[i];
      descriptor = gOPD(source, key);
      if (hOP.call(descriptor, VALUE)) {
        copyValueIfObject(descriptor, copyDeep);
      }
      defineProperty(target, key, descriptor);
    }
    return target;
  }
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;
}
249525
function nextend(target) { var sources
        sources = __slice.call(arguments, 1)
        sources.forEach(function(source) {
            keys(source).forEach(function(key) {
                target[key] = source[key] })})

        return target
    }
316941
function deepExtend(target, source) {
  _.each(source, function(value, key) {
    if (_.has(target, key) && isObject(target[key]) && isObject(source[key])) {
      deepExtend(target[key], source[key]);
    } else {
      target[key] = source[key];
    }
  });
  return target;
}
1205870
function _setIn (source, key, value) {
    var result = {};

    for (var prop in source) {
        result[prop] = source[prop];
    }

    result[key] = value;

    return result;
}
913985
function mergeObjects(source, target, opts) {
  const properties = Object.keys(source)

  for (let i = 0; i < properties.length; i++) {
    const property = properties[i]

    // Is this property on the list of exclusions?
    if (opts.exclusions.indexOf(property) !== -1) {
      continue
    }

    let item = source[property]

    // Is this an object? Should we perform recursive merge?
    if (opts.recurse && item instanceof Object) {
      // If the item on the source is object, we must have such object on the target as well
      // So we either reuse any such existing "receiving" object or we create a new one
      const receiver = target[property] instanceof Object ? target[property]
                                                          : new item.constructor()

      // "To understand recursion, you must first understand recursion."
      item = doMerge(item, receiver, opts)
    }

    target[property] = item
  }

  return target
}
294081
function _extend (target, source, deep) {
  for (let key in source) {
    if (deep) {
      if (isPlainObject(source[key])) {
        !isPlainObject(target[key]) && (target[key] = {})
      } else if (Array.isArray(source[key])) {
        !Array.isArray(target[key]) && (target[key] = [])
      } else {
        source[key] !== undefined && (target[key] = source[key])
        continue
      }
      _extend(target[key], source[key], deep)
    } else if (source[key] !== undefined) {
      target[key] = source[key]
    }
  }
}
822272
function copy() {
  var result = {}
    , depth = 2
    , seen = [];

  (function worker() {
    each(array(arguments), function each(obj) {
      for (var prop in obj) {
        if (hasOwn.call(obj, prop) && !~index(seen, obj[prop])) {
          if (type(obj[prop]) !== 'object' || !depth) {
            result[prop] = obj[prop];
            seen.push(obj[prop]);
          } else {
            depth--;
            worker(result[prop], obj[prop]);
          }
        }
      }
    });
  }).apply(null, arguments);

  return result;
}
385912
function extend(destination, source, recursive) {
    destination = destination || {};
    source = source || {};
    recursive = recursive || false;

    for (var attrName in source) {
        if (source.hasOwnProperty(attrName)) {
            var destVal = destination[attrName];
            var sourceVal = source[attrName];
            if (recursive && isObject(destVal) && isObject(sourceVal)) {
                destination[attrName] = extend(destVal, sourceVal, recursive);
            } else {
                destination[attrName] = sourceVal;
            }
        }
    }

    return destination;
}
1217271
function copy(from, to) {
      var name;
      for (name in from) {
        if (from.hasOwnProperty(name)) {
          to[name] = from[name];
        }
      }
    }
745788
function(target, index, val, clone) {

            if (isNaN(index) && index != "first" && index != "last") {
                error(index + 'is not a valid index.');
                return;
            }

            var type = objType(target),
                length = target.length;

            //to limit index
            var idx = index < 0 || index == "first" ? 0 : index > length || index == "last" ? length : index;


            //if array push
            if (type == 'array') {
                val = clone ? jsonQ.clone(val) : val;
                target.splice(idx, 0, val);
            }

            //if string concatenate , if number add
            else if (type == 'string') {
                target = target.substring(0, idx) + val + target.substring(idx, length);
            }


            return target;

        }
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;
}