@agonxgashi/luckyjs
v1.0.1
Published
A lightweight JavaScript library to generate a random boolean value
Downloads
5
Maintainers
Readme
LuckyJs
A lightweight JavaScript library to generate a random boolean value
Installation
You can install the library via npm
npm install @agonxgashi/luckyjs
Usage
const lucky = require('@agonxgashi/luckyjs');
const bool = lucky(); // Returns either true or false randomly
console.log(bool);
API
lucky(probability)
- Returns a random boolean value (true or false). Probability is optional and can be a numeric value from 0 to 100. If not provided. default is value is 50.