(rootDir: string, file: string)
| 76 | * Returns the closest parent directory that contains a file with the given name. |
| 77 | */ |
| 78 | export const nearestDirectoryContaining = (rootDir: string, file: string) => |
| 79 | nearestDirectoryWhere(rootDir, p => exists(path.join(p, file))); |
| 80 | |
| 81 | // todo: not super correct, and most node libraries don't handle this accurately |
| 82 | const knownLoopbacks = new Set<string>(['localhost', '127.0.0.1', '::1']); |
no test coverage detected