-
Notifications
You must be signed in to change notification settings - Fork 0
select
Subhajit Sahu edited this page Jul 19, 2022
·
14 revisions
Check if iᵗʰ boolean is true.
select(i, [a], [b], [c], [d], [e], [f], [g], [h])
// i: index
// a: 1st boolean
// b: 2nd boolean
// c: 3rd boolean
// d: 4th boolean
// e: 5th boolean
// f: 6th boolean
// g: 7th boolean
// h: 8th boolean
const xboolean = require('extra-boolean');
xboolean.select(0, true, false);
// → true ^
xboolean.select(1, true, false);
// → false ^
xboolean.select(1, true, true, false, false);
// → true ^
xboolean.select(2, true, true, false, false);
// → false ^