Merge customizer. video.js simply overwrites non-simple objects
(like arrays) instead of attempting to overlay them.
@see https://lodash.com/docs#merge
963250
function customizer(destination, source) {
  // If we're not working with a plain object, copy the value as is
  // If source is an array, for instance, it will replace destination
  if (!isPlain(source)) {
    return source;
  }

  // If the new value is a plain object but the first object value is not
  // we need to create a new object for the first object to merge with.
  // This makes it consistent with how merge() works by default
  // and also protects from later changes the to first object affecting
  // the second object's values.
  if (!isPlain(destination)) {
    return mergeOptions(source);
  }
}
773674
function mergeLayers(layers)
{
  var _instance = this
    , result    = null
    ;

  layers.forEach(function(layer)
  {
    layer.exts.forEach(function(ext)
    {
      ext.dirs.forEach(function(cfg)
      {
        // have customizable's array merge function
        result = merge.call({
          useCustomAdapters: merge.behaviors.useCustomAdapters,
          'array': _instance.arrayMerge,
          useCustomTypeOf: merge.behaviors.useCustomTypeOf,
          'typeof': _instance.mergeTypeOf
        }, result || {}, cfg.config);
      });
    });
  });

  // return `null` if noting found
  // and let downstream layers to make the decision
  return result;
}
1211659
function (customizations, layoutConfig) {
  var customization = customizations[layoutConfig.view.type];
  if (!customization) {
    return layoutConfig;
  }
  return _.merge(layoutConfig, { view: customization });
}
982685
function mergeArrays(source, target) {
  for (let i = 0; i < source.length; i++) {
    // If the item is not yet in the target array, add it
    if (target.indexOf(source[i]) === -1) {
      target.push(source[i])
    }
  }

  return target
}
222463
function merge(defaultObject, objectToMerge) {
		var key;
		if (!objectToMerge) {
			return defaultObject;
		}

		for (key in objectToMerge) {
			defaultObject[key] = objectToMerge[key];
		}

		return defaultObject;
	}
496993
function merge (obj1, obj2) {
  var c = {},
    keys = Object.keys(obj2),
    i;

  for (i = 0; i !== keys.length; i++) {
    c[keys[i]] = obj2[keys[i]];
  }

  keys = Object.keys(obj1);
  for (i = 0; i !== keys.length; i++) {
    if (!c.hasOwnProperty(keys[i])) {
      c[keys[i]] = obj1[keys[i]];
    }
  }

  return c;
}
571311
function mergeObject (oldObject, newObject) {
  let oldCopy = Object.assign({}, oldObject)

  function _merge (oo, no) {
    for (let key in no) {
      if (key in oo) {
        // Follow structure of oo
        if (oo[key] === Object(oo[key])) {
          _merge(oo[key], no[key])
        } else if (no[key] !== Object(no[key])) {
          oo[key] = no[key]
        }
      } else {
        // Plain assign
        oo[key] = no[key]
      }
    }
    return oo
  }

  return _merge(oldCopy, newObject)
}
67558
function merge(object, options, ...sources) {

	/* iterate through all provided sources */
	for(const source of sources) {

		/* retrieve the property names defined on object */
		const propNames = Object.getOwnPropertyNames(source);

		/* recursively merge properties */
		for(const name of propNames) {
			const value = source[name];

			/* skip undefined values */
			if(options && options.skipUndefined && value === undefined) {
				continue;
			}

			/* skip if both values equals */
			if(value === object[name]) {
				continue;
			}

			/* merge based on options */
			if(value && typeof value === "object") {
				if(options && options.arrayConcat && Array.isArray(object[name]) && Array.isArray(value)) {
					object[name] = object[name].concat(value);
					if(options && options.arrayUnique) {
						object[name] = Array.from(new Set(object[name]));
					}
				} else if(Array.isArray(value)) {
					object[name] = options && options.overwrite || object[name] === undefined ? value : object[name];
				} else {
					object[name] = merge(object[name] || {}, options, value);
				}
			} else {
				object[name] = options && options.overwrite || object[name] === undefined ? value : object[name];
			}

		}

	}

	/* return merged object */
	return object;
}
449609
function merge ( obj1, obj2 ) {
    var args = argsToArray( arguments ), res;
    if ( 0 === args.length ) return {};
    if ( 1 === args.length ) return obj1;
    if ( 2 === args.length ) return mergeTwo( obj1, obj2 );

    // More then two objects
    res  = mergeTwo( obj1, obj2 );
    args = args.slice( 2 );

    while ( args.length ) {
        res = mergeTwo( res, args[ 0 ] );
        args = args.slice( 1 );
    }

    return res;

    function mergeTwo ( obj1, obj2 ) {
        if ( !isDefined( obj1 ) ) return obj2;
        if ( !isDefined( obj2 ) ) return obj1;

        for (var key in obj2) {
            obj1[ key ] = obj2[ key ];
        }

        return obj1;
    }
}
604187
function mergeConfigRecursively(baseObject, data) {
        var i;
        for (i in data) {
            if (data[i] !== undefined) {

                // exception
                if (baseObject[i] !== undefined && typeof data[i] !== typeof baseObject[i]) {
                    grunt.log.error('Data types not mutch. Property: ' + i +
                        ' {' + typeof baseObject[i] + '} !== {' +  typeof data[i] + '}');
                }

                // simple file type
                if (
                    baseObject[i] === undefined ||
                        typeof data[i] !== 'object' ||
                        data[i] instanceof Array
                ) {
                    baseObject[i] = data[i];
                } else {
                    mergeConfigRecursively(baseObject[i], data[i]);
                }
            }
        }
    }
301935
function (id, canva, video, altCanvas) {

    const date = new Date();
    canva.resize(video);
    canva.copy(video);

    // handle alternative canvas:
    altCanvas = altCanvas === undefined ? [] : altCanvas;
    this.altScreenShots = [];
    if (altCanvas.length > 0) {
        for (let i = 0; i < altCanvas.length; i++) {
            let canvaEl = altCanvas[i].el;
            canvaEl.resize(video, altCanvas[i].width);
            canvaEl.copy(video);

            this.altScreenShots.push({
                dataURI: canvaEl.extractImage(),
                name: altCanvas[i].name
            });
        }
    }

    this.id = id;
    this.timestamp = date.getTime();
    this.dataURI = canva.extractImage();
    this.videoTime = video.getCurrentTime();

}
141508
function merge(obj1, obj2){
    for(var key in obj2){
        obj1[key] = obj2[key]
    }

    return obj1
}
201429
function mergeObjects(a, b) {
    var r = { };
    for (var k in a)
        r[k] = a[k];
    for (var k in b)
        r[k] = b[k];
    return r;
}
813738
function mergeJson(original, override) {
            return _.merge(original, override, function (a, b, key, aParent, bParent) {
                if (_.isUndefined(b)) {
                    aParent[key] = undefined;
                    return;
                }
            });
        }
82800
function clone(obj1, obj2, index) {
  index = index || 0;
  for (var i in obj2) {
    if ('object' == typeof i) obj1[i] = recursiveMerge(obj1[i], obj2[i], index++);
    else obj1[i] = obj2[i];
  }
  return obj1;
}
251336
function extendPreventingOverrides (a, b) {
          Object.keys(b).forEach(addContentFromBtoA)
          return a

          function addContentFromBtoA (key) {
            if (a.hasOwnProperty(key)) {
              mergeIntoAnArray(a, b, key)
            } else {
              a[key] = b[key]
            }
          }
        }
1146044
function merge_objects(obj1,obj2){
        var obj3 = {};
        for (var attrname1 in obj1) { obj3[attrname1] = obj1[attrname1]; }
        for (var attrname2 in obj2) { obj3[attrname2] = obj2[attrname2]; }
        return obj3;
    }