(path)
| 3 | |
| 4 | // try loading this module |
| 5 | export function loadModule(path) { |
| 6 | if (strings.isBlank(path)) { |
| 7 | throw new Error('path is required') |
| 8 | } |
| 9 | if (filesystem.isNotFile(path)) { |
| 10 | throw new Error(`${path} is not a file`) |
| 11 | } |
| 12 | |
| 13 | require.resolve(path) |
| 14 | return require(path) |
| 15 | } |
no test coverage detected
searching dependent graphs…