Compare two booelans, sorting false then true.
The empty values null and undefined sort last.
null
undefined
the first boolean to compare
the second boolean to compare
false before true
Sort booleans false-true.
import { compareBooleansAsc } from "@trashpanda001/helpers/comparators"compareBooleansAsc(false, true)// -1 .. false, truecompareBooleansAsc(true, false)// 1 ... false, true Copy
import { compareBooleansAsc } from "@trashpanda001/helpers/comparators"compareBooleansAsc(false, true)// -1 .. false, truecompareBooleansAsc(true, false)// 1 ... false, true
Compare two booelans, sorting false then true.
The empty values
null
andundefined
sort last.