byName function

int byName(
  1. Nameable a,
  2. Nameable b
)

Implementation

int byName(Nameable a, Nameable b) {
  var stringCompare = compareAsciiLowerCaseNatural(a.name, b.name);
  if (stringCompare == 0) {
    return a.hashCode.compareTo(b.hashCode);
  }
  return stringCompare;
}