Files
react-native-devtools-frontend/node_modules/ramda/es/internal/_objectAssign.js
T
Jack Franklin 8b9aa2fca6 Prefer eslint-mocha for linting .only in tests
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>
2020-02-12 18:12:22 +00:00

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;