Last active
December 12, 2015 03:39
-
-
Save rblalock/4708860 to your computer and use it in GitHub Desktop.
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
function MyModule() {} | |
module.exports = function(_params) { | |
// Could even do things in here for pre-init | |
return new MyModule(_params); | |
} | |
// Implementation: | |
var module = require("mymodule")(); |
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
function MyModule() {} | |
exports.init = function(_params) { | |
return new MyModule(_params); | |
} | |
// Implementation: | |
var module = require("mymodule").init(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment