mirror of
https://github.com/swc-project/swc.git
synced 2024-12-22 05:01:42 +03:00
3ca954b9f9
**Related issue:** - Closes https://github.com/swc-project/swc/issues/7144. - Closes https://github.com/swc-project/swc/issues/7118.
19 lines
702 B
JavaScript
19 lines
702 B
JavaScript
import _define_property from "./_define_property.mjs";
|
|
export default function _object_spread(target) {
|
|
for (var i = 1; i < arguments.length; i++) {
|
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
var ownKeys = Object.keys(source);
|
|
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
ownKeys = ownKeys.concat(
|
|
Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
})
|
|
);
|
|
}
|
|
ownKeys.forEach(function(key) {
|
|
_define_property(target, key, source[key]);
|
|
});
|
|
}
|
|
return target;
|
|
}
|