1-based line the character at `index` sits on.
(source: string, index: number)
| 88 | |
| 89 | /** 1-based line the character at `index` sits on. */ |
| 90 | function lineAt(source: string, index: number): number { |
| 91 | let line = 1; |
| 92 | for (let at = 0; at < index && at < source.length; at++) { |
| 93 | if (source[at] === '\n') { |
| 94 | line += 1; |
| 95 | } |
| 96 | } |
| 97 | return line; |
| 98 | } |
| 99 | |
| 100 | /** Die Evidenz einer Text-Lesung: die schwaechste, die dieses Produkt ausstellt. */ |
| 101 | function statementCitation(filePath: string, line: number, providerId: string, generation: number): Evidence { |
no outgoing calls
no test coverage detected