(buf: Buffer, start: number, end: number)
| 151 | } |
| 152 | |
| 153 | function countNewlines(buf: Buffer, start: number, end: number): number { |
| 154 | let n = 0 |
| 155 | for (let i = start; i < end; i++) if (buf[i] === NL) n++ |
| 156 | return n |
| 157 | } |
| 158 | |
| 159 | /** Decode buf[0..len) to utf8, normalizing CRLF only if CR is present. */ |
| 160 | function normalizeCRLF(buf: Buffer, len: number): string { |
no outgoing calls
no test coverage detected