fix: set default value as 7 for contributorsPerLine (#139)

fix: set default value as `7` for `contributorsPerLine`

Co-authored-by: Maximilian Berkmann <maxieberkmann@gmail.com>
Co-authored-by: Angel Aviel Domaoan <13580338+tenshiAMD@users.noreply.github.com>
This commit is contained in:
Jake Bolam 2022-09-07 04:27:30 -04:00 committed by GitHub
parent 0b9706252c
commit e1fd794ef7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -44,6 +44,7 @@ function formatLine(contributors) {
}
function generateContributorsList(options, contributors) {
const contributorsPerLine = options.contributorsPerLine || 7
return _.flow(
_.sortBy(contributor => {
if (options.contributorsSortAlphabetically) {
@ -53,7 +54,7 @@ function generateContributorsList(options, contributors) {
_.map(function formatEveryContributor(contributor) {
return formatContributor(options, contributor)
}),
_.chunk(options.contributorsPerLine),
_.chunk(contributorsPerLine),
_.map(formatLine),
_.join('\n </tr>\n <tr>\n '),
newContent => {