| 1 | export class GitAuthor { |
| 2 | public static parse(nameAddr: string): GitAuthor | null { |
| 3 | const m = nameAddr.match(/^(.*?)\s+<(.*?)>/) |
| 4 | return m === null ? null : new GitAuthor(m[1], m[2]) |
| 5 | } |
| 6 | |
| 7 | public constructor( |
| 8 | public readonly name: string, |
| 9 | public readonly email: string |
| 10 | ) {} |
| 11 | |
| 12 | public toString() { |
| 13 | return `${this.name} <${this.email}>` |
| 14 | } |
| 15 | } |
nothing calls this directly
no outgoing calls
no test coverage detected