export function alphaSort()

in lib/utils/sort.js [14:27]


export function alphaSort(key) {
  return (a, b) => {
    const strA = a[key].toUpperCase();
    const strB = b[key].toUpperCase();
    if (strA < strB) {
      return -1;
    }
    if (strA > strB) {
      return 1;
    }
    // names must be equal
    return 0;
  };
}