randBool.js 202 B

123456789101112
  1. var random = require('./random');
  2. /**
  3. * returns a random boolean value (true or false)
  4. */
  5. function randBool(){
  6. return random() >= 0.5;
  7. }
  8. module.exports = randBool;