(str: string)
| 1 | export function countLeadingSpaces(str: string) { |
| 2 | let count = 0; |
| 3 | for (let char of str) { |
| 4 | if (char === " ") { |
| 5 | count++; |
| 6 | } else if (char === "\t") { |
| 7 | count += 2; |
| 8 | } else { |
| 9 | break; |
| 10 | } |
| 11 | } |
| 12 | return count; |
| 13 | } |
nothing calls this directly
no outgoing calls
no test coverage detected