See how a minor change to your commit message style can make a difference.
Tip
Take a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs
See how a minor change to your commit message style can make a difference.
Tip
Take a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs
function distributeSeats(percentages, totalSeats, threshold) { | |
const validParties = percentages.filter((percentage) => percentage >= threshold); | |
const totalValidPercentages = validParties.reduce((a, b) => a + b, 0); | |
const seatDistribution = []; | |
validParties.forEach((percentage) => { | |
const seats = Math.floor((percentage / totalValidPercentages) * totalSeats); | |
seatDistribution.push(seats); | |
}); |