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

Method getDependencies

app/models/LevelComponent.js:92–101  ·  view source on GitHub ↗
(allComponents)

Source from the content-addressed store, hash-verified

90 }
91
92 getDependencies (allComponents) {
93 const results = []
94 for (const dep of Array.from(this.get('dependencies') || [])) {
95 const comp = _.find(allComponents, c => (c.get('original') === dep.original) && (c.get('version').major === dep.majorVersion))
96 for (const result of Array.from(comp.getDependencies(allComponents).concat([comp]))) {
97 if (!Array.from(results).includes(result)) { results.push(result) }
98 }
99 }
100 return results
101 }
102 }
103 LevelComponent.initClass()
104 return LevelComponent

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected