ngneat/falso

Percentages that add up to 100% together

PumpedSardines opened this issue · 1 comments

Description

A way to generate multiple percentages that together add up to 100%

For example, on GitHub you have a graph showing what percentage of your contributions to GitHub are issues, commits, PR and Code Review. These all add up to 100%.

Proposed solution

const [one,two,three,four] = falso.randPercentages({ amount: 4, fractions: 3 });
console.log(one + two + three + four); // Should output 1

Alternatives considered

No response

Do you want to create a pull request?

No

Has been merged