Skip to content

Instantly share code, notes, and snippets.



Last active Aug 29, 2015
What would you like to do?
Configurable exports in Node.js
module.exports = function(configuration) {
var configuredInstance = createInstance(configuration);
return function(argOne, argTwo) {
return configuredInstance.doAnotherThing(argTwo);
var someModule = require("./some-module")(configuration);
someModule(argOne, argTwo);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.