More Boolean Methods!
Installation
;// Done!
Methods
Method | Description |
---|---|
.random() | Will give you a random boolean |
.not() | Will negate the boolean |
.stringify() | Will convert the boolean to a string |
.numberify() | Will convert the boolean to a number |
.arrayify() | Will convert the boolean to an array |
.true() | Will return true |
.false() | Will return false |
.and(boolean) | Will return the 'AND' value of the two booleans |
.or(boolean) | Will return the 'OR' value of the two booleans |
.equals(boolean) | Will return true if both booleans are equal |
.xor(boolean) | Will return the 'XOR' value of the two booleans |
Examples
true // expected output: falsefalse // expected output: truetrue // expected output: falsetrue // expected output: falsetrue // expected output: 'true'
Infos
This module was kinda made as a joke, but you're free to use it anyways!