Created
October 5, 2017 15:52
-
-
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
This file contains 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
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