Conditions | 3 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | /* eslint-disable import/no-commonjs */ |
||
24 | function preventParentScopeModules() { |
||
25 | const nodeModulePaths = Module._nodeModulePaths; |
||
26 | |||
27 | Module._nodeModulePaths = function (from) { |
||
28 | const originalPath = nodeModulePaths.call(this, from); |
||
29 | const insideRootPaths = originalPath.filter(function (p) { |
||
30 | return isPathInside(p, ROOT_FOLDER); |
||
31 | }); |
||
32 | |||
33 | return insideRootPaths; |
||
34 | }; |
||
35 | } |
||
36 | |||
39 |