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

Method prepaidTypeDescription

app/models/User.js:935–943  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

933 }
934
935 prepaidTypeDescription () {
936 const courseProducts = this.activeProducts('course')
937 if (!courseProducts.length) { return '' }
938 // NOTE: Full licenses implicitly include all courses
939 if (_.any(courseProducts, p => (p.productOptions?.includedCourseIDs == null))) { return utils.courseDescription() }
940 const union = (res, prepaid) => _.union(res, prepaid.productOptions?.includedCourseIDs != null ? prepaid.productOptions?.includedCourseIDs : [])
941 const includedCourseIDs = _.reduce(courseProducts, union, [])
942 return utils.courseDescription(includedCourseIDs)
943 }
944
945 prepaidIncludesCourse (course) {
946 const courseProducts = this.activeProducts('course')

Callers

nothing calls this directly

Calls 1

activeProductsMethod · 0.95

Tested by

no test coverage detected