@extremejs/utils - v1.0.0-beta.23
    Preparing search index...

    Function minByFn

    • It will iterate through each of the provided values array, by the provided iteratee function and add the resulting numbers returned by the said iteratee function to produce the minimum,

      Type Parameters

      • Value

      Parameters

      • values: Value[]

        The array to iterate over.

      • iteratee: (value: Value) => number

        The iteratee invoked per element.

      Returns number

      The minimum value.

      1.0.0

      minByFn([1, 2, 3], number => number); // => 1
      
      minByFn([{ a: 1 }, { a: 2 }, { a: 3 }], ({ a }) => a); // => 1