Created
March 13, 2014 18:36
-
-
Save tbranyen/9534142 to your computer and use it in GitHub Desktop.
CommonJS permutations.
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
// Literal value given to the module. | |
module.exports = {}; | |
// Selective values being assigned. | |
exports.property = "value"; |
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
// "Absolute" modules may loaded from system or local `node_modules`. | |
require("globalModule"); | |
// "Relative" modules are always resolved relative to the module requesting. | |
require("./localModule"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment