mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-01 01:38:07 +08:00
DISABLE_THIRD_PARTY_CHECK=new npm module causes package-lock change We can get rid of a custom script and use ESLint for these rules. Additionally this means editors will highlight the issue in the editor. Change-Id: I552b52e7f07b4e7430b3f685dbc3b5fad36ffff2 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2052167 Reviewed-by: Paul Lewis <aerotwist@chromium.org> Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
26 lines
694 B
JavaScript
26 lines
694 B
JavaScript
import _has from './_has.js';
|
|
|
|
// Based on https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
|
|
function _objectAssign(target) {
|
|
if (target == null) {
|
|
throw new TypeError('Cannot convert undefined or null to object');
|
|
}
|
|
|
|
var output = Object(target);
|
|
var idx = 1;
|
|
var length = arguments.length;
|
|
while (idx < length) {
|
|
var source = arguments[idx];
|
|
if (source != null) {
|
|
for (var nextKey in source) {
|
|
if (_has(nextKey, source)) {
|
|
output[nextKey] = source[nextKey];
|
|
}
|
|
}
|
|
}
|
|
idx += 1;
|
|
}
|
|
return output;
|
|
}
|
|
|
|
export default typeof Object.assign === 'function' ? Object.assign : _objectAssign; |