install-nix-action/node_modules/es-abstract/helpers/assign.js
Domen Kožar 70742d22d9
v6
2019-11-19 17:50:30 +01:00

21 lines
402 B
JavaScript

'use strict';
var GetIntrinsic = require('../GetIntrinsic');
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)) {
target[key] = source[key];
}
}
return target;
};