Last change
on this file since 8d391a1 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
323 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | var global = require('../internals/global');
|
---|
| 2 |
|
---|
| 3 | module.exports = function (key, value) {
|
---|
| 4 | try {
|
---|
| 5 | // eslint-disable-next-line es/no-object-defineproperty -- safe
|
---|
| 6 | Object.defineProperty(global, key, { value: value, configurable: true, writable: true });
|
---|
| 7 | } catch (error) {
|
---|
| 8 | global[key] = value;
|
---|
| 9 | } return value;
|
---|
| 10 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.