Skip to content

Instantly share code, notes, and snippets.

@aGuyNamedJonas
Created August 11, 2016 14:06
Show Gist options
  • Save aGuyNamedJonas/ff5b29368cf5dad6815ea6a8c77c18a0 to your computer and use it in GitHub Desktop.
Save aGuyNamedJonas/ff5b29368cf5dad6815ea6a8c77c18a0 to your computer and use it in GitHub Desktop.
Good pattern for node.js modules
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