amis-rpc-design/node_modules/core-js/internals/try-node-require.js
2023-10-07 19:42:30 +08:00

10 lines
271 B
JavaScript

'use strict';
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 */ }
};