mirror of
https://github.com/cachix/install-nix-action.git
synced 2024-11-26 02:18:09 +00:00
22 lines
402 B
JavaScript
22 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;
|
||
|
};
|