-
-
Save gumayunov/376231 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
$.extend(obj, (function(){ | |
function private_function(){...} | |
function private_function2(){...} | |
return { | |
public_function: function() {...}, | |
public_function2: function() {...} | |
} | |
})()); | |
// ---- | |
$.extend(obj, (function(){ | |
var private_var = 1; | |
function private_function(){...} | |
function private_function2(){...} | |
function public_function() {...} | |
function public_function2() {...} | |
return { | |
func1: public_function, | |
func2: public_function2 | |
} | |
})()); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment