Source: apc-abstract/lib/object/fallback_copy.js

/**
 * Copy properties only if not exists in destination.
 * @function lib.object.fallbackCopy
 * @param {object} src - Source object.
 * @param {object} dest - Destination object.
 * @returns {object} - Destination object.
 */
module.exports = function (src, dest) {
    Object.keys(src).forEach(function (key) {
        var has = dest.hasOwnProperty(key);
        if (!has) dest[key] = src[key];
    });
    return dest;
};