Skip to content

Instantly share code, notes, and snippets.

@robflaherty
Created July 29, 2011 15:38
Show Gist options
  • Select an option

  • Save robflaherty/1114060 to your computer and use it in GitHub Desktop.

Select an option

Save robflaherty/1114060 to your computer and use it in GitHub Desktop.
var app = (function(testMode) {
//Private methods
var method1 = function() {};
var method2 = function() {};
//Public methods
var method3 = function() {};
var method4 = function() {};
if (!testMode) {
return {
method3: method3,
method4: method4
};
} else {
return {
method1: method1,
method2: method2,
method3: method3,
method4: method4
};
}
})(testMode);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment