(file: string)
| 443 | |
| 444 | /** A file's text; nothing for one extraction wouldn't take, or that can't be read. */ |
| 445 | const readText = (file: string): string => { |
| 446 | try { |
| 447 | const text = readSourceText(path.join(root, file)) ?? ''; |
| 448 | // It can have grown since the check. |
| 449 | return text.length > MAX_SOURCE_FILE_SIZE_BYTES ? '' : text; |
| 450 | } catch { |
| 451 | return ''; |
| 452 | } |
| 453 | }; |
| 454 | /** Each file is read once in a pass, whoever asks: on Windows an open costs more than what follows it. */ |
| 455 | const textOf = (file: string): string => { |
| 456 | let text = texts.get(file); |
no test coverage detected