@trashpanda001/helpers
    Preparing search index...

    Function compareBooleansAsc

    • Compare two booelans, sorting false then true.

      The empty values null and undefined sort last.

      Parameters

      • target: Optional<boolean>

        the first boolean to compare

      • other: Optional<boolean>

        the second boolean to compare

      Returns -1 | 0 | 1

      false before true

      Sort booleans false-true.

      import { compareBooleansAsc } from "@trashpanda001/helpers/comparators"

      compareBooleansAsc(false, true)
      // -1 .. false, true
      compareBooleansAsc(true, false)
      // 1 ... false, true