You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
705 B
17 lines
705 B
2 years ago
|
var hasOwn = require('../internals/has-own-property');
|
||
|
var ownKeys = require('../internals/own-keys');
|
||
|
var getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');
|
||
|
var definePropertyModule = require('../internals/object-define-property');
|
||
|
|
||
|
module.exports = function (target, source, exceptions) {
|
||
|
var keys = ownKeys(source);
|
||
|
var defineProperty = definePropertyModule.f;
|
||
|
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
||
|
for (var i = 0; i < keys.length; i++) {
|
||
|
var key = keys[i];
|
||
|
if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
|
||
|
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
||
|
}
|
||
|
}
|
||
|
};
|