Last active
August 29, 2015 14:24
-
-
Save SergeiStruk/9da1ca2e22acb4c5edd0 to your computer and use it in GitHub Desktop.
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
var obj = (function() { | |
var func1 = function(options) { | |
... | |
}, | |
func2 = function(options) { | |
... | |
}, | |
func3 = function(options) { | |
... | |
func1(); | |
}; | |
func4 = function(options) { | |
... | |
func1(); | |
func2(); | |
}; | |
//This is a list of public functions, other ones (func1, func2) are private. | |
//You will have ability to invoke only func3 and func4 for obj. | |
return { | |
func3: func3, | |
func4: func4, | |
}; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment