UNPKG
@coremail/core-js
Version:
latest (3.20.3-fix-avoid-third-party-bind)
3.20.3-fix-avoid-third-party-bind
Standard library
github.com/zloirock/core-js
zloirock/core-js
@coremail/core-js
/
internals
/
try-node-require.js
9 lines
(7 loc)
•
257 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
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 */
} };