Last change
on this file since 1ad8e64 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
323 bytes
|
Line | |
---|
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.