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.
18 lines
719 B
18 lines
719 B
1 month ago
|
'use strict';
|
||
|
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));
|
||
|
}
|
||
|
}
|
||
|
};
|