Created
September 27, 2011 17:11
-
-
Save gnarl/1245651 to your computer and use it in GitHub Desktop.
Mixin public functions of an Object to current Object.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mixinObjectFunctions = function(obj) { | |
for( var propName in obj) { | |
if(solContext.hasOwnProperty(propName)) { | |
if(typeof obj[propName] === 'function') { | |
that[propName] = obj[propName]; | |
console.log("that." + propName + " : " + typeof that[propName]); | |
} | |
} | |
} | |
}; | |
mixinObjectFunctions(solContext); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment