main
Last change
on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
388 bytes
|
Rev | Line | |
---|
[79a0317] | 1 | 'use strict';
|
---|
| 2 | var globalThis = require('../internals/global-this');
|
---|
| 3 |
|
---|
| 4 | // eslint-disable-next-line es/no-object-defineproperty -- safe
|
---|
| 5 | var defineProperty = Object.defineProperty;
|
---|
| 6 |
|
---|
| 7 | module.exports = function (key, value) {
|
---|
| 8 | try {
|
---|
| 9 | defineProperty(globalThis, key, { value: value, configurable: true, writable: true });
|
---|
| 10 | } catch (error) {
|
---|
| 11 | globalThis[key] = value;
|
---|
| 12 | } return value;
|
---|
| 13 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.