(s: string)
| 42 | * Used for shebang detection in diff rendering. |
| 43 | */ |
| 44 | export function firstLineOf(s: string): string { |
| 45 | const nl = s.indexOf('\n') |
| 46 | return nl === -1 ? s : s.slice(0, nl) |
| 47 | } |
| 48 | |
| 49 | /** |
| 50 | * Counts occurrences of `char` in `str` using indexOf jumps instead of |
no outgoing calls
no test coverage detected