Skip to content

Instantly share code, notes, and snippets.

@yemster
Created October 5, 2017 15:52
Show Gist options
  • Save yemster/d54a1eeb689658ed606c18f8e86168d4 to your computer and use it in GitHub Desktop.
Save yemster/d54a1eeb689658ed606c18f8e86168d4 to your computer and use it in GitHub Desktop.
Snippet / boilerplate or starting new modules / library closures. --// Parked here until I find a better home for it
MyModule = MyModule || {}
MyModule.Foo = (function() {
// declare private methods
var _myPrivateMethod = function() {
console.log('\t >>>>> I am a private method call <<<<<<')
}
// expose public methods
return {
myPublicMethod: function(someArgs) {
// call relevant private method here
_myPrivateMethod(someArgs)
}
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment