PromoCursed/node_modules/core-js/internals/define-global-property.js
2024-08-20 23:25:37 +04:00

14 lines
388 B
JavaScript

'use strict';
var globalThis = require('../internals/global-this');
// eslint-disable-next-line es/no-object-defineproperty -- safe
var defineProperty = Object.defineProperty;
module.exports = function (key, value) {
try {
defineProperty(globalThis, key, { value: value, configurable: true, writable: true });
} catch (error) {
globalThis[key] = value;
} return value;
};