MCPcopy
hub / github.com/desktop/desktop / GitAuthor

Class GitAuthor

app/src/models/git-author.ts:1–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1export 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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected