(dir: string)
| 176 | }; |
| 177 | |
| 178 | const listDirs = (dir: string): readonly string[] => |
| 179 | tryOrElse( |
| 180 | () => |
| 181 | fs |
| 182 | .readdirSync(dir, { withFileTypes: true }) |
| 183 | .filter((entry) => entry.isDirectory()) |
| 184 | .map((entry) => entry.name), |
| 185 | [], |
| 186 | ); |
| 187 | |
| 188 | const readText = (file: string): string | undefined => |
| 189 | tryOrElse(() => fs.readFileSync(file, "utf-8"), undefined); |
no test coverage detected