function deepExtend()

in src/EpicRoadmap/redux/selectors/dependencyTreeSelector.ts [93:111]


function deepExtend(source) {
    const destination = {};
    if(typeof source !== "object") {
        return source;
    }
    for (var property in source) {
        if (source[property] && source[property].constructor &&
            source[property].constructor === Object) {
            destination[property] = destination[property] || {};
            arguments.callee(destination[property], source[property]);
        } else if (source[property] && source[property].constructor &&
            source[property].constructor === Array) {
            destination[property] = source[property].map(v => deepExtend(v));
        } else {
            destination[property] = source[property];
        }
    }
    return destination;
}