rand-probability

Define values and their probability of being returned


Keywords
Probability, Random
License
MIT
Install
npm install rand-probability@1.0.0

Documentation

rand-probability

Define values and their probability of being returned

Use:

var randProb = require('rand-probability');
var value = randProb.getRandom([0.3, 0.4, 0.2, 0.1], ['Value 1', 'Value 2', 'Value 3', 'Value 4']);
console.log(value);