source: imaps-frontend/node_modules/core-js/internals/get-built-in-node-module.js

main
Last change on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 2 weeks ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 448 bytes
RevLine 
[79a0317]1'use strict';
2var globalThis = require('../internals/global-this');
3var IS_NODE = require('../internals/environment-is-node');
4
5module.exports = function (name) {
6 if (IS_NODE) {
7 try {
8 return globalThis.process.getBuiltinModule(name);
9 } catch (error) { /* empty */ }
10 try {
11 // eslint-disable-next-line no-new-func -- safe
12 return Function('return require("' + name + '")')();
13 } catch (error) { /* empty */ }
14 }
15};
Note: See TracBrowser for help on using the repository browser.