Last active
February 15, 2017 10:26
-
-
Save bogdanpetru/e06b3884b7ef55dbfcf5f78763ecb2f9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
Object.defineProperty(exports, "__esModule", { | |
value: true | |
}); | |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | |
function assign() { | |
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | |
args[_key] = arguments[_key]; | |
} | |
if (typeof Object.assign === 'function') { | |
return Object.assign.apply(Object, args); | |
} else { | |
return args.reduce(acc, function (item, index) { | |
if (index === 0) { | |
return item; | |
} | |
return _extends({}, acc, item); | |
}); | |
} | |
} | |
exports.default = assign; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment