Show More
Commit Description:
fix wrong merge
Commit Description:
fix wrong merge
References:
File last commit:
Show/Diff file:
Action:
node_modules/es-abstract/helpers/assign.js
| 22 lines
| 451 B
| application/javascript
| JavascriptLexer
|
r789 | '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)) { | ||||
// eslint-disable-next-line no-param-reassign | ||||
target[key] = source[key]; | ||||
} | ||||
} | ||||
return target; | ||||
}; | ||||