mirror of
https://github.com/actions/setup-python.git
synced 2024-11-09 09:13:33 -05:00
40 lines
981 B
JavaScript
40 lines
981 B
JavaScript
/*!
|
|
* assign-symbols <https://github.com/jonschlinkert/assign-symbols>
|
|
*
|
|
* Copyright (c) 2015, Jon Schlinkert.
|
|
* Licensed under the MIT License.
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
module.exports = function(receiver, objects) {
|
|
if (receiver === null || typeof receiver === 'undefined') {
|
|
throw new TypeError('expected first argument to be an object.');
|
|
}
|
|
|
|
if (typeof objects === 'undefined' || typeof Symbol === 'undefined') {
|
|
return receiver;
|
|
}
|
|
|
|
if (typeof Object.getOwnPropertySymbols !== 'function') {
|
|
return receiver;
|
|
}
|
|
|
|
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
|
var target = Object(receiver);
|
|
var len = arguments.length, i = 0;
|
|
|
|
while (++i < len) {
|
|
var provider = Object(arguments[i]);
|
|
var names = Object.getOwnPropertySymbols(provider);
|
|
|
|
for (var j = 0; j < names.length; j++) {
|
|
var key = names[j];
|
|
|
|
if (isEnumerable.call(provider, key)) {
|
|
target[key] = provider[key];
|
|
}
|
|
}
|
|
}
|
|
return target;
|
|
};
|