(line: string)
| 148 | let truncatedByBytes = false |
| 149 | |
| 150 | function tryPush(line: string): boolean { |
| 151 | if (truncateAtBytes !== undefined) { |
| 152 | const sep = selectedLines.length > 0 ? 1 : 0 |
| 153 | const nextBytes = selectedBytes + sep + Buffer.byteLength(line) |
| 154 | if (nextBytes > truncateAtBytes) { |
| 155 | truncatedByBytes = true |
| 156 | return false |
| 157 | } |
| 158 | selectedBytes = nextBytes |
| 159 | } |
| 160 | selectedLines.push(line) |
| 161 | return true |
| 162 | } |
| 163 | |
| 164 | while ((newlinePos = text.indexOf('\n', startPos)) !== -1) { |
| 165 | if (lineIndex >= offset && lineIndex < endLine && !truncatedByBytes) { |
no outgoing calls
no test coverage detected