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