Function _sortBy

  • Sort array based on results of appling function to it's elements

    Resulting order is determined by comparring function application results with greater then and lesser then operators.

    Type Parameters

    • T

    Parameters

    • fn: ((x) => any)
        • (x): any
        • Parameters

          Returns any

    • arr: T[]

    Returns T[]