Created
February 9, 2016 16:21
-
-
Save bendrucker/bb5cfc20dc8848cfccd7 to your computer and use it in GitHub Desktop.
Organizing JS modules using keywords and language behavior
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 dep = require('dep') | |
module.exports = { | |
myFn: myFn | |
} | |
function myFn (input) { | |
var myVar = {} | |
// ... | |
return myNestedFn() | |
function myNestedFn () { | |
return myVar.a * 2 + myOuterFn(input) | |
} | |
} | |
function myOuterFn (input) { | |
return input * 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I see this a lot in your repos.
Have a name for this pattern?
EDIT: nvm -> 'Organizing JS modules using keywords and language behavior'