Conditions | 3 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | // eslint-disable-next-line import/no-commonjs |
||
12 | function preventParentScopeModules() { |
||
13 | const nodeModulePaths = Module._nodeModulePaths; |
||
14 | |||
15 | Module._nodeModulePaths = function (from) { |
||
16 | const originalPath = nodeModulePaths.call(this, from); |
||
17 | const insideRootPaths = originalPath.filter(function (path) { |
||
18 | return path.match(ROOT_FOLDER); |
||
19 | }); |
||
20 | |||
21 | return insideRootPaths; |
||
22 | }; |
||
23 | } |
||
24 | |||
27 |