MCPcopy
hub / github.com/date-fns/date-fns / renderAuthors

Function renderAuthors

pkgs/core/scripts/release/buildChangelog.ts:213–226  ·  view source on GitHub ↗
(authors: Author[])

Source from the content-addressed store, hash-verified

211}
212
213function 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
228function renderAuthor(author: Author) {
229 return `@${author.login}`;

Callers 1

renderChangelogFunction · 0.85

Calls 1

renderAuthorFunction · 0.85

Tested by

no test coverage detected