UNPKG

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