MCPcopy Index your code
hub / github.com/codecombat/codecombat / union

Method union

app/models/User.js:910–910  ·  view source on GitHub ↗
(res, prepaid)

Source from the content-addressed store, hash-verified

908 if (!courseProducts.length) { return utils.courseNumericalStatus.NO_ACCESS }
909 if (_.some(courseProducts, p => (p.productOptions?.includedCourseIDs == null))) { return utils.courseNumericalStatus.FULL_ACCESS }
910 const union = (res, prepaid) => _.union(res, prepaid.productOptions?.includedCourseIDs != null ? prepaid.productOptions?.includedCourseIDs : [])
911 const courses = _.reduce(courseProducts, union, [])
912 const fun = (s, k) => s + utils.courseNumericalStatus[k]
913 return _.reduce(courses, fun, 0)

Callers 8

isEqualIgnoringSomeKeysFunction · 0.80
utils.jsFile · 0.80
exportStudentProgressFunction · 0.80
buildTreemaMethod · 0.80
buildSystemsTreemaMethod · 0.80
getRenderDataMethod · 0.80
denormalizeThangMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected