get-value-from-value-or-array
v1.0.1
Published
To create configs and sort values from array
Downloads
1
Maintainers
Readme
USAGE
const getValueFrom = require('get-value-from-value-or-array')
let myConfig = {
totalUsers:[0,10,[1,2,3]]
}
let totalUsersToCreateNow = getValueFrom(myConfig.totalUsers)
//now we have 33% chance to get 0, and 33% to 10, and 11% to get 1, 11% get 2, 11% to get 3
console.log(totalUsersToCreateNow)
You can use that to create situations to get chances to result for games or fake bot usage