Created
August 11, 2016 14:06
-
-
Save aGuyNamedJonas/ff5b29368cf5dad6815ea6a8c77c18a0 to your computer and use it in GitHub Desktop.
Good pattern for node.js modules
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 stuff = require('stuff'); | |
var exp = { | |
someFunction: function(param1, param2) { | |
// Do Stuff | |
}, | |
someOtherFunction: function(param1, param2, param3) { | |
this.someFunction('this', 'that'); | |
} | |
}; | |
module.exports = exp; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment