UNPKG

replay-table

Version:

Visualize sport seasons with interactive standings

12 lines (10 loc) 303 B
export default function (orderBy) { return (a,b) => { const tieBreaker = orderBy.filter(calc => b[calc].total !== a[calc].total)[0]; if (tieBreaker) { return b[tieBreaker].total - a[tieBreaker].total; } else { return 0; } } };