(text: ?string)
| 2 | |
| 3 | const newlineRegex: RegExp = /[\r\n]/; |
| 4 | function firstLine(text: ?string): string { |
| 5 | if (!text) { |
| 6 | return ''; |
| 7 | } |
| 8 | return text.split(newlineRegex, 1)[0]; |
| 9 | } |
| 10 | |
| 11 | export { newlineRegex, firstLine }; |
no outgoing calls
no test coverage detected