Skip to content

Instantly share code, notes, and snippets.

@gnarl
Created September 27, 2011 17:11
Show Gist options
  • Save gnarl/1245651 to your computer and use it in GitHub Desktop.
Save gnarl/1245651 to your computer and use it in GitHub Desktop.
Mixin public functions of an Object to current Object.
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