* @param {string | URL} file * @returns {string | undefined}
(file)
| 6 | * @returns {string | undefined} |
| 7 | */ |
| 8 | function readFileFirstLine(file) { |
| 9 | const liner = new readlines(toPath(file)); |
| 10 | const firstLineBuffer = liner.next(); |
| 11 | |
| 12 | if (typeof liner.fd === "number") { |
| 13 | liner.close(); |
| 14 | } |
| 15 | |
| 16 | return firstLineBuffer?.toString("utf8"); |
| 17 | } |
| 18 | |
| 19 | /** |
| 20 | * @param {string | URL} file |
no test coverage detected
searching dependent graphs…