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

Method set

app/models/LevelComponent.js:59–70  ·  view source on GitHub ↗
(key, val, options)

Source from the content-addressed store, hash-verified

57 }
58
59 set (key, val, options) {
60 let attrs
61 if (_.isObject(key)) {
62 [attrs, options] = Array.from([key, val])
63 } else {
64 (attrs = {})[key] = val
65 }
66 if ('code' in attrs && !('js' in attrs)) {
67 attrs.js = this.compile(attrs.code)
68 }
69 return super.set(attrs, options)
70 }
71
72 onLoaded () {
73 super.onLoaded()

Callers 2

makeNewLevelComponentMethod · 0.95
onLoadedMethod · 0.95

Calls 1

compileMethod · 0.95

Tested by

no test coverage detected