(modulePath)
| 18 | } |
| 19 | |
| 20 | export function toLocalPath(modulePath) { |
| 21 | let localPath = modulePath.replace(/\/index$/, ''); // remove trailing /index |
| 22 | if (!isRelativePath(localPath)) { |
| 23 | localPath = `./${localPath}`; // insert `./` to make it a relative path |
| 24 | } |
| 25 | return localPath; |
| 26 | } |
| 27 | |
| 28 | export function stripExtension(modulePath, stripExtensions) { |
| 29 | let name = path.basename(modulePath); |
no test coverage detected