(line: string)
| 85 | } |
| 86 | |
| 87 | export function expandTabs(line: string): string { |
| 88 | let extraChars = 0; |
| 89 | return line.replaceAll(tabsRe, (match, offset) => { |
| 90 | const total = offset + extraChars; |
| 91 | const spacesNeeded = (total + 8) & 7; |
| 92 | extraChars += spacesNeeded - 1; |
| 93 | return ' '.substring(spacesNeeded); |
| 94 | }); |
| 95 | } |
| 96 | |
| 97 | function getRegexForTempdir(): RegExp { |
| 98 | const tmp = os.tmpdir(); |
nothing calls this directly
no test coverage detected