MCPcopy Create free account
hub / github.com/codecombat/codecombat / tournamentSortFn

Function tournamentSortFn

app/core/utils.js:1123–1131  ·  view source on GitHub ↗
(ta, tb)

Source from the content-addressed store, hash-verified

1121}
1122
1123const 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
1133const usStateCodes =
1134 // https://github.com/mdzhang/us-state-codes

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected