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