main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
371 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 | var global = require('../internals/global');
|
---|
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(global, key, { value: value, configurable: true, writable: true });
|
---|
10 | } catch (error) {
|
---|
11 | global[key] = value;
|
---|
12 | } return value;
|
---|
13 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.