Code coverage report for cjs/util/assign.js

Statements: 20% (4 / 20)      Branches: 8.33% (1 / 12)      Functions: 0% (0 / 2)      Lines: 20% (4 / 20)      Ignored: none     

All files » cjs/util/ » assign.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 301 1 1                                                   1  
var root_1 = require('./root');
var Object = root_1.root.Object;
Iif (typeof Object.assign != 'function') {
    (function () {
        Object.assign = function assignPolyfill(target) {
            var sources = [];
            for (var _i = 1; _i < arguments.length; _i++) {
                sources[_i - 1] = arguments[_i];
            }
            if (target === undefined || target === null) {
                throw new TypeError('Cannot convert undefined or null to object');
            }
            var output = Object(target);
            var len = sources.length;
            for (var index = 0; index < len; index++) {
                var source = sources[index];
                if (source !== undefined && source !== null) {
                    for (var key in source) {
                        if (source.hasOwnProperty(key)) {
                            output[key] = source[key];
                        }
                    }
                }
            }
            return output;
        };
    })();
}
exports.assign = Object.assign;
//# sourceMappingURL=assign.js.map