@pleisto/active-support
    Preparing search index...

    Function sum

    • Sum all numbers in an array. Optionally provide a function to convert objects in the array to number values.

      Type Parameters

      • T extends number

      Parameters

      • array: readonly T[]

      Returns number

    • Sum all numbers in an array. Optionally provide a function to convert objects in the array to number values.

      Type Parameters

      • T extends object

      Parameters

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

      Returns number