(authors: Author[])
| 211 | } |
| 212 | |
| 213 | function renderAuthors(authors: Author[]) { |
| 214 | if (authors.length > 1) { |
| 215 | return ( |
| 216 | authors |
| 217 | .slice(0, authors.length - 1) |
| 218 | .map(renderAuthor) |
| 219 | .join(", ") + |
| 220 | " and " + |
| 221 | renderAuthor(last(authors)!) |
| 222 | ); |
| 223 | } else { |
| 224 | return renderAuthor(authors[0]); |
| 225 | } |
| 226 | } |
| 227 | |
| 228 | function renderAuthor(author: Author) { |
| 229 | return `@${author.login}`; |
no test coverage detected