ezyVet Javascript Helper Library Documentation
    Preparing search index...

    Function objectCompareForSort

    • Returns a function that compares 2 values given a key|key path that exists in both JSON values and returns either 1, 0 or -1

      Type Parameters

      • T extends object

      Parameters

      • key: string

        A key path that should exist in both input values of the returned function

      Returns (a: T, b: T) => -1 | 0 | 1

      Comparison function