@jossmac/lil-libs
    Preparing search index...

    Function isDescending

    • Checks whether an array is in descending order (allowing equal neighbouring values).

      • items: number[]

        Array of numbers to compare pairwise.

      true when each element is less than or equal to the previous; arrays of length 0 or 1 always pass.

      isDescending([3, 3, 2, 1]); // true
      isDescending([1, 2, 3]); // false
      isDescending([42]); // true (single-element arrays pass)