zeed
    Preparing search index...

    Function arraySorted

    • Return a sorted copy of the provided iterable or array-like object.

      Type Parameters

      • T

        element type

      Parameters

      • arr: Iterable<T, any, any> | ArrayLike<T>

        iterable or array-like input

      • compareFn: ((a: T, b: T) => number) | undefined = cmp

        optional compare function (defaults to cmp)

      Returns T[]

      a new array sorted according to compareFn