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

Function activeArenas

app/core/utils.js:1501–1513  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1499]
1500
1501const activeArenas = function () {
1502 const daysActiveAfterEnd = { regular: 7, championship: 14 }
1503 return (() => {
1504 const result = []
1505 for (const a of Array.from(arenas)) {
1506 const currentDate = new Date()
1507 if (a.start <= currentDate && currentDate < a.end.getTime() + (daysActiveAfterEnd[a.type] * 86400 * 1000) && a.levelOriginal) {
1508 result.push(_.clone(a))
1509 }
1510 }
1511 return result
1512 })()
1513}
1514
1515const activeAndPastArenas = () => (() => {
1516 const result = []

Callers 1

seasonalLeague.jsFile · 0.90

Calls 1

cloneMethod · 0.45

Tested by

no test coverage detected