1.0.6 • Published 4 years ago
probster v1.0.6
Probster🦞
Get Random Value with Probability settings
Usage
- Install npm package
npm install probster
- require from javascript source file
const Probster = require('probster');
- Custom Probability?
const probs = [
Probster.Probability(10, 'Ten percent probability'),
Probster.Probability(20, 'Twenty percent probability'),
Probster.Probability(30, 'Thirty percent probability'),
Probster.Probability(40, 'Fourty percent probability'),
];
console.log(Probster.get_custom_probability_result(probs));
- Equal Probability?
const arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
console.log(Probster.get_equal_probability_result(arr));