function merge (target, source, deepCopy) {
    Object.keys(source).forEach((key) => {
        if (deepCopy && 'object' === typeof source[key]) {
            merge(target[key], source[key]);
        } else {
            target[key] = source[key];
        }
    });
    return target;
}
/**
 * Copy all own properties from the source object to the target object,
 * performing a deep copy as requested. This mutates the first object passed in.
 * @param {Object} target The object to be modified
 * @param {Object} source The object to copy properties from
 * @param {Boolean} [deepCopy] Whether to perform a deep copy
 * @returns {Object} The target option passed in
 */
Copy all own properties from the source object to the target object,
performing a deep copy as requested. This mutates the first object passed in.
@param {Object} target The object to be modified
@param {Object} source The object to copy properties from
@param {Boolean} [deepCopy] Whether to perform a deep copy
@returns {Object} The target option passed in
Copy all own properties from the source object to the target object performing a deep copy as requested . This mutates the first object passed in . @param { Object } target The object to be modified @param { Object } source The object to copy properties from @param { Boolean } [ deepCopy ] Whether to perform a deep copy @returns { Object } The target option passed in
function merge (target, source, deepCopy) {
    Object.keys(source).forEach((key) => {
        if (deepCopy && 'object' === typeof source[key]) {
            merge(target[key], source[key]);
        } else {
            target[key] = source[key];
        }
    });
    return target;
}
function merge ( target , source , deepCopy ) { Object . keys ( source ) . forEach ( ( key ) => { if ( deepCopy && 'object' === typeof source [ key ] ) { merge ( target [ key ] , source [ key ] ) ; } else { target [ key ] = source [ key ] ; } } ) ; return target ; }
Copy all own properties from the source object to the target object,
 performing a deep copy as requested.
Copy all own properties from the source object to the target object performing a deep copy as requested .