1 | ;
|
2 | var global = require('../internals/global');
|
3 | var DESCRIPTORS = require('../internals/descriptors');
|
4 |
|
5 | // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
6 | var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
7 |
|
8 | // Avoid NodeJS experimental warning
|
9 | module.exports = function (name) {
|
10 | if (!DESCRIPTORS) return global[name];
|
11 | var descriptor = getOwnPropertyDescriptor(global, name);
|
12 | return descriptor && descriptor.value;
|
13 | };
|