random-choice
Get a random item from an array with a weighted probablility
Install
$ npm install random-choice
Usage
const randomChoice = ; //Give relative wqeights for the items in your array;//=> 'apple' //Integer ratios work too;//=> 'apple'
License
MIT