Skip to content

Instantly share code, notes, and snippets.

@andresgallo
Created February 19, 2013 01:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andresgallo/4982191 to your computer and use it in GitHub Desktop.
Save andresgallo/4982191 to your computer and use it in GitHub Desktop.
AUGMENTATION PATTERN
var CLASSNAME = function(){
var first = "firstvar",
second = "secondvar";
//Expose private vars
return {
first :first
};
})();
//EXTEND ORIGINAL CLASS
var CLASSNAME = function(self){
self.third = "third";
return self;
})(CLASSNAME || {});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment