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

Function sortAllCourses

app/core/utils.js:1093–1098  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1091}
1092
1093const sortAllCourses = courses => _.sortBy(courses, function (course) {
1094 // ._id can be from classroom.courses, otherwise it's probably .id
1095 let index = allOrderedCourseIDs.indexOf(course.id != null ? course.id : course._id)
1096 if (index === -1) { index = 9001 }
1097 return index
1098})
1099
1100const sortCourses = courses => _.sortBy(courses, function (course) {
1101 // ._id can be from classroom.courses, otherwise it's probably .id

Callers 1

sortedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected