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

Function __guardMethod__

app/views/core/ModalView.js:140–146  ·  view source on GitHub ↗
(obj, methodName, transform)

Source from the content-addressed store, hash-verified

138})())
139
140function __guardMethod__ (obj, methodName, transform) {
141 if (typeof obj !== 'undefined' && obj !== null && typeof obj[methodName] === 'function') {
142 return transform(obj, methodName)
143 } else {
144 return undefined
145 }
146}
147function __guard__ (value, transform) {
148 return (typeof value !== 'undefined' && value !== null) ? transform(value) : undefined
149}

Callers 3

renderMethod · 0.70
hideMethod · 0.70
destroyMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected