1.0.6 • Published 4 years ago

probster v1.0.6

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

Probster🦞

Get Random Value with Probability settings

Usage

  1. Install npm package
npm install probster
  1. require from javascript source file
const Probster = require('probster');
  1. 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));
  1. Equal Probability?
const arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
console.log(Probster.get_equal_probability_result(arr));
1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago