swc/bundler/tests/.cache/deno/a28ff8733f5ead137230cf0c8f86e809c228b794.ts
강동윤 bbaf619f63
fix(bundler): Fix bugs (#1437)
swc_bundler:
 - [x] Fix wrapped esms. (denoland/deno#9307)
 - [x] Make test secure.
2021-03-02 17:33:03 +09:00

30 lines
779 B
TypeScript

// Loaded from https://deno.land/x/ramda@v0.27.2/source/internal/_objectAssign.js
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;