function extend() {
        var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

        for (var _len = arguments.length, sources = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
            sources[_key - 1] = arguments[_key];
        }

        if (!sources.length) {
            return target;
        }

        var source = sources.shift();

        if (!utils.is.object(source)) {
            return target;
        }

        Object.keys(source).forEach(function (key) {
            if (utils.is.object(source[key])) {
                if (!Object.keys(target).includes(key)) {
                    Object.assign(target, defineProperty({}, key, {}));
                }

                utils.extend(target[key], source[key]);
            } else {
                Object.assign(target, defineProperty({}, key, source[key]));
            }
        });

        return utils.extend.apply(utils, [target].concat(toConsumableArray(sources)));
    }
// Deep extend destination object with N more objects
Deep extend destination object with N more objects
Deep extend destination object with N more objects
function extend() {
        var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
        for (var _len = arguments.length, sources = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
            sources[_key - 1] = arguments[_key];
        }
        if (!sources.length) {
            return target;
        }
        var source = sources.shift();
        if (!utils.is.object(source)) {
            return target;
        }
        Object.keys(source).forEach(function (key) {
            if (utils.is.object(source[key])) {
                if (!Object.keys(target).includes(key)) {
                    Object.assign(target, defineProperty({}, key, {}));
                }
                utils.extend(target[key], source[key]);
            } else {
                Object.assign(target, defineProperty({}, key, source[key]));
            }
        });
        return utils.extend.apply(utils, [target].concat(toConsumableArray(sources)));
    }
function extend ( ) { var target = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : { } ; for ( var _len = arguments . length , sources = Array ( _len > 1 ? _len - 1 : 0 ) , _key = 1 ; _key < _len ; _key ++ ) { sources [ _key - 1 ] = arguments [ _key ] ; } if ( ! sources . length ) { return target ; } var source = sources . shift ( ) ; if ( ! utils . is . object ( source ) ) { return target ; } Object . keys ( source ) . forEach ( function ( key ) { if ( utils . is . object ( source [ key ] ) ) { if ( ! Object . keys ( target ) . includes ( key ) ) { Object . assign ( target , defineProperty ( { } , key , { } ) ) ; } utils . extend ( target [ key ] , source [ key ] ) ; } else { Object . assign ( target , defineProperty ( { } , key , source [ key ] ) ) ; } } ) ; return utils . extend . apply ( utils , [ target ] . concat ( toConsumableArray ( sources ) ) ) ; }
Deep extend destination object with N more objects
Deep extend destination object with N more objects