12345678910111213 |
- 'use strict';
- var global = require('../internals/global');
- var DESCRIPTORS = require('../internals/descriptors');
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
- var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
- // Avoid NodeJS experimental warning
- module.exports = function (name) {
- if (!DESCRIPTORS) return global[name];
- var descriptor = getOwnPropertyDescriptor(global, name);
- return descriptor && descriptor.value;
- };
|