@laserware/arcade
    Preparing search index...

    Function sumBy

    • Sums the values of the specified field in the specified collection of objects.

      Parameters

      • collection: AnyDict[]

        Collection of objects containing a field with a number value.

      • field: string

        Field to get sum for.

      Returns number

      Sum of the specified field from the specified collection.

      TypeError if any of the values in the collection are not valid numbers.