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

Function __guardMethod__

app/views/core/AuthModal.js:401–407  ·  view source on GitHub ↗
(obj, methodName, transform)

Source from the content-addressed store, hash-verified

399}
400
401function __guardMethod__ (obj, methodName, transform) {
402 if (typeof obj !== 'undefined' && obj !== null && typeof obj[methodName] === 'function') {
403 return transform(obj, methodName)
404 } else {
405 return undefined
406 }
407}

Callers 1

errorMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected