Created
December 1, 2010 07:22
-
-
Save froots/723104 to your computer and use it in GitHub Desktop.
Example gist for testing import into web page
This file contains hidden or 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 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