iter-fns - v0.13.0
    Preparing search index...

    Function sortedOn

    • Sorts an array on keys after copying it, returning the copy.

      This will precompute the keys of all items up front, which may make it more efficient than using sorted with comparing, which will call the key function 2n log n times.

      This internally creates a copy of the input array twice, using 2n extra space, i.e. the Schwartzian transform.

      Type Parameters

      • T

        type of the item

      Parameters

      • xs: readonly T[]

        the array

      • ...onKeys: SortOnKey<T, any>[]

        the keys to sort by

      Returns T[]

    Index

    Methods

    Methods