(ta, tb)
| 1121 | } |
| 1122 | |
| 1123 | const tournamentSortFn = function (ta, tb) { |
| 1124 | const stateOrder = { |
| 1125 | starting: 0, |
| 1126 | ended: 1, |
| 1127 | initializing: 2, |
| 1128 | disabled: 4, |
| 1129 | } |
| 1130 | return (stateOrder[ta.state] - stateOrder[tb.state]) || (new Date(ta.endDate) - new Date(tb.endDate)) |
| 1131 | } |
| 1132 | |
| 1133 | const usStateCodes = |
| 1134 | // https://github.com/mdzhang/us-state-codes |
nothing calls this directly
no outgoing calls
no test coverage detected