(author)
| 1 | export function parseAuthor(author) { |
| 2 | const [, name, email, timestamp, offset] = author.match( |
| 3 | /^(.*) <(.*)> (.*) (.*)$/ |
| 4 | ) |
| 5 | return { |
| 6 | name, |
| 7 | email, |
| 8 | timestamp: Number(timestamp), |
| 9 | timezoneOffset: parseTimezoneOffset(offset), |
| 10 | } |
| 11 | } |
| 12 | |
| 13 | // The amount of effort that went into crafting these cases to handle |
| 14 | // -0 (just so we don't lose that information when parsing and reconstructing) |
no test coverage detected
searching dependent graphs…