main
Last change
on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
487 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 | var globalThis = require('../internals/global-this');
|
---|
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 globalThis[name];
|
---|
11 | var descriptor = getOwnPropertyDescriptor(globalThis, name);
|
---|
12 | return descriptor && descriptor.value;
|
---|
13 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.