Created
April 20, 2015 17:53
-
-
Save spacenick/d5f831af82948bc47aa8 to your computer and use it in GitHub Desktop.
private functions
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
/// Everything defined here is defined in the scope of that module | |
/// so it wont pollute anything | |
var privateVar = "test"; | |
var privateFn = function() { | |
// process stuff here | |
// we can use privateVar | |
} | |
module.exports = function(arg) { | |
var res = privateFn(arg); | |
// do stuff | |
return res; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment