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

Method set

app/models/LevelSystem.js:23–34  ·  view source on GitHub ↗
(key, val, options)

Source from the content-addressed store, hash-verified

21 }
22
23 set (key, val, options) {
24 let attrs
25 if (_.isObject(key)) {
26 [attrs, options] = Array.from([key, val])
27 } else {
28 (attrs = {})[key] = val
29 }
30 if ('code' in attrs && !('js' in attrs)) {
31 attrs.js = this.compile(attrs.code)
32 }
33 return super.set(attrs, options)
34 }
35
36 onLoaded () {
37 super.onLoaded()

Callers 1

onLoadedMethod · 0.95

Calls 1

compileMethod · 0.95

Tested by

no test coverage detected