8000 RxJS/examples/mario/polyfills.js at v3.1.0 · jakedahm/RxJS · GitHub
[go: up one dir, main page]

Skip to content

Latest commit

 

History

History
27 lines (27 loc) · 999 Bytes

polyfills.js

File metadata and controls

27 lines (27 loc) · 999 Bytes
(function () {
if (!Object.assign) {
Object.defineProperty(Object, "assign", {
enumerable: false,
configurable: true,
writable: true,
value: function(target, firstSource) {
"use strict";
if (target === undefined || target === null) {
throw new TypeError("Cannot convert first argument to object");
}
var to = Object(target);
for (var i = 1; i < arguments.length; i++) {
var nextSource = arguments[i];
if (nextSource === undefined || nextSource === null) continue;
var keysArray = Object.keys(Object(nextSource));
for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {
var nextKey = keysArray[nextIndex];
var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
if (desc !== undefined && desc.enumerable) { to[nextKey] = nextSource[nextKey]; }
}
}
return to;
}
});
}
}());
0