kit
    Preparing search index...
    • Type Parameters

      • T extends object

      Parameters

      • data: T

        The object whose properties you want to sort

      • OptionalcompareFn: (
            a: [Extract<keyof T, string>, T[Extract<keyof T, string>]],
            b: [Extract<keyof T, string>, T[Extract<keyof T, string>]],
        ) => number

        Function used to determine the order of the elements. It is expected to return a negative value if the first argument is less than the second argument, zero if they're equal, and a positive value otherwise. If omitted, the elements are sorted in ascending, ASCII character order.

      Returns { [k: string]: any }

      a new object