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

Function __guardMethod__

app/views/play/menu/OptionsView.js:116–122  ·  view source on GitHub ↗
(obj, methodName, transform)

Source from the content-addressed store, hash-verified

114})())
115
116function __guardMethod__ (obj, methodName, transform) {
117 if (typeof obj !== 'undefined' && obj !== null && typeof obj[methodName] === 'function') {
118 return transform(obj, methodName)
119 } else {
120 return undefined
121 }
122}

Callers 1

destroyMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected