(packageName: string)
| 131 | * @returns {string} |
| 132 | */ |
| 133 | export const getNodeModulesPackagePath = (packageName: string): string => { |
| 134 | const checkPaths = [ |
| 135 | path.join(__dirname, '..', 'node_modules', packageName), |
| 136 | path.join(__dirname, '..', '..', 'node_modules', packageName), |
| 137 | path.join(__dirname, '..', '..', '..', 'node_modules', packageName), |
| 138 | path.join(__dirname, '..', '..', '..', '..', 'node_modules', packageName), |
| 139 | path.join(__dirname, '..', '..', '..', '..', '..', 'node_modules', packageName) |
| 140 | ] |
| 141 | for (const checkPath of checkPaths) { |
| 142 | if (fs.existsSync(checkPath)) { |
| 143 | return checkPath |
| 144 | } |
| 145 | } |
| 146 | return '' |
| 147 | } |
| 148 | |
| 149 | /** |
| 150 | * Construct graph and node dependencies score |
no outgoing calls
no test coverage detected