@pleisto/active-support

    Function max

    • Max gets the greatest value from a list

      Parameters

      • array: readonly [number, number]

      Returns number

      max([ 2, 3, 5]) == 5
      max([{ num: 1 }, { num: 2 }], x => x.num) == { num: 2 }
    • Max gets the greatest value from a list

      Parameters

      • array: readonly number[]

      Returns null | number

      max([ 2, 3, 5]) == 5
      max([{ num: 1 }, { num: 2 }], x => x.num) == { num: 2 }
    • Max gets the greatest value from a list

      Type Parameters

      • T

      Parameters

      • array: readonly T[]
      • getter: (item: T) => number

      Returns null | T

      max([ 2, 3, 5]) == 5
      max([{ num: 1 }, { num: 2 }], x => x.num) == { num: 2 }
    MMNEPVFCICPMFPCPTTAAATR