Generates a random boolean list where each value has a threshold chance of being true. Example: length=5, threshold=0.7 → might produce [true, true, false, true, true]
a length and a threshold for randomization of true values
booleans
Converts numbers to booleans using two thresholds with gradient randomization between them. Values below trueThreshold → always true, above falseThreshold → always false. Between thresholds → probability gradient (closer to false threshold = higher chance of false). Example: [0.1, 0.4, 0.6, 0.9] with thresholds [0.3, 0.7] → [true, gradient, gradient, false]
a length and a threshold for randomization of true values
booleans
Converts numbers to booleans based on a threshold (below threshold → true, above → false). Can be inverted to flip the logic. Example: [0.3, 0.7, 0.5] with threshold=0.6 → [true, false, true]
a length and a threshold for randomization of true values
booleans
Converts numbers to booleans using multiple range thresholds (gaps define true ranges). Values within any gap range → true, outside all gaps → false. Can be inverted. Example: [0.2, 0.5, 0.8] with gaps [[0.3, 0.6], [0.7, 0.9]] → [false, true, true]
a length and a threshold for randomization of true values
booleans
Applies NOT operator to flip a boolean value. Example: true → false, false → true
a true or false boolean
boolean
Applies NOT operator to flip all boolean values in a list. Example: [true, false, true] → [false, true, false]
a list of true or false booleans
booleans
Compares two values using various operators (==, !=, ===, !==, <, <=, >, >=). Example: 5 > 3 → true, 'hello' === 'world' → false
two values to be compared
Result of the comparison
Conditionally passes a value through if boolean is true, otherwise returns undefined. Example: value=42, boolean=true → 42, value=42, boolean=false → undefined
a value and a boolean value
value or undefined
Returns the first defined (non-undefined) value from two options (fallback pattern). Example: value1=42, value2=10 → 42, value1=undefined, value2=10 → 10
two values
value or undefined
Creates and returns a boolean value (pass-through for boolean input). Example: true → true, false → false