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

Function __guardMethod__

app/views/editor/level/LevelEditView.js:760–766  ·  view source on GitHub ↗
(obj, methodName, transform)

Source from the content-addressed store, hash-verified

758 return (typeof value !== 'undefined' && value !== null) ? transform(value) : undefined
759}
760function __guardMethod__ (obj, methodName, transform) {
761 if (typeof obj !== 'undefined' && obj !== null && typeof obj[methodName] === 'function') {
762 return transform(obj, methodName)
763 } else {
764 return undefined
765 }
766}
767
768function saveModel (model, attributes, options = {}) {
769 return new Promise((resolve, reject) => {

Callers 1

onPlayLevelMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected