Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example gist for testing import into web page
var myModule = (function(w) {
var internal = "I'm hidden",
privateMethod = function() {
return "Message is " + internal;
},
publicMethod = function() {
return privateMethod().replace('hidden', 'visible');
};
return {
publicMethod: publicMethod
};
})(window);
myModule.publicMethod();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.