This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/assign-symbols/index.js
2019-08-11 20:48:02 +02:00

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;
};