mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08: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;
|
|
};
|