-
-
Save calvinmetcalf/57be20b8eda0ee8fe6de 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
exports.obj = {}; | |
var b = require('./b'); | |
exports.msg = 'yay'; | |
b.something(); |
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 a = require('./a'); | |
a.obj.val = 'asdf'; | |
exports.something = function() { | |
console.log(a.msg); | |
}; |
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
require('./a'); //prints yay |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment