ubdate
This commit is contained in:
22
node_modules/es-abstract/helpers/assign.js
generated
vendored
Normal file
22
node_modules/es-abstract/helpers/assign.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var has = require('has');
|
||||
|
||||
var $assign = GetIntrinsic('%Object%').assign;
|
||||
|
||||
module.exports = function assign(target, source) {
|
||||
if ($assign) {
|
||||
return $assign(target, source);
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
for (var key in source) {
|
||||
if (has(source, key)) {
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
return target;
|
||||
};
|
||||
Reference in New Issue
Block a user