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