amis-rpc-design/node_modules/core-js/internals/define-global-property.js

14 lines
371 B
JavaScript
Raw Normal View History

2023-10-07 19:42:30 +08:00
'use strict';
var global = require('../internals/global');
// eslint-disable-next-line es/no-object-defineproperty -- safe
var defineProperty = Object.defineProperty;
module.exports = function (key, value) {
try {
defineProperty(global, key, { value: value, configurable: true, writable: true });
} catch (error) {
global[key] = value;
} return value;
};