Preparing search index...

    Function byName

    • Array-sort comparator ordering objects alphabetically by their name field.

      Type Parameters

      • T extends { name: string }

        Any object exposing a string name.

      Parameters

      • a: T

        First element.

      • b: T

        Second element.

      Returns number

      Negative if a.name sorts before b.name, positive if after, 0 if equal.