mirror of
https://github.com/swc-project/swc.git
synced 2024-12-22 21:21:31 +03:00
18 lines
387 B
JavaScript
18 lines
387 B
JavaScript
function _defineProperty(obj, key, value) {
|
|
if (key in obj) {
|
|
Object.defineProperty(obj, key, {
|
|
value: value,
|
|
enumerable: true,
|
|
configurable: true,
|
|
writable: true
|
|
});
|
|
} else {
|
|
obj[key] = value;
|
|
}
|
|
return obj;
|
|
}
|
|
foo("", _defineProperty({
|
|
}, Symbol.unscopables, function(s) {
|
|
return s.length;
|
|
}));
|