All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.internals.safe-get-built-in.js Maven / Gradle / Ivy

There is a newer version: 3.39.0
Show newest version
'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;
};




© 2015 - 2024 Weber Informatics LLC | Privacy Policy