try-node-require.js 257 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 var IS_NODE = require('../internals/engine-is-node'); module.exports = function (name) { try { // eslint-disable-next-line no-new-func -- safe if (IS_NODE) return Function('return require("' + name + '")')(); } catch (error) { /* empty */ } };