• A Comparator that orders boolean values by their natural order, i.e. false < true.

    Example

    Sort an Array of boolean values

    const array = [true, false, true];
    array.sort(booleanComparator);
    console.log(array); // [false, true, true]

    Returns

    a Comparator for boolean values

    Parameters

    • valueA: boolean
    • valueB: boolean

    Returns number

Generated using TypeDoc