* Function to check if the path is a required module and return its name. * @param {string} str The path to check * @returns {undefined | string} required module name or undefined
(str)
| 38 | * @returns {undefined | string} required module name or undefined |
| 39 | */ |
| 40 | function getRequiredModuleName(str) { |
| 41 | const match = requiredModules.find(([, test]) => { |
| 42 | return test.test(str); |
| 43 | }); |
| 44 | return match ? match[0] : undefined; |
| 45 | } |
| 46 | |
| 47 | /** |
| 48 | * Function to check if a node has an argument that is a required module and |
no test coverage detected
searching dependent graphs…