securityos/node_modules/@swc/helpers/cjs/_object_spread.cjs

26 lines
764 B
JavaScript
Raw Normal View History

2024-09-06 15:32:35 +00:00
"use strict";
var _define_property = require("./_define_property.cjs");
exports._ = exports._object_spread = _object_spread;
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;
}