(modulePath, basedir, extensions)
| 2 | import resolve from 'resolve'; |
| 3 | |
| 4 | export function nodeResolvePath(modulePath, basedir, extensions) { |
| 5 | try { |
| 6 | return resolve.sync(modulePath, { basedir, extensions }); |
| 7 | } catch (e) { |
| 8 | return null; |
| 9 | } |
| 10 | } |
| 11 | |
| 12 | export function isRelativePath(nodePath) { |
| 13 | return nodePath.match(/^\.?\.\//); |
no outgoing calls
no test coverage detected