-
-
Save joshwnj/867c4123d87d3f3cb0c8 to your computer and use it in GitHub Desktop.
circular dependency
This file contains hidden or 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 b = require('./b') | |
console.log('B', b); | |
module.exports = { | |
doThingA: function () { | |
console.log('thing A'); | |
b.doThingB(); | |
} | |
} |
This file contains hidden or 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') | |
module.exports = { | |
doThingB: function () { | |
console.log('thing B'); | |
} | |
} |
This file contains hidden or 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.doThingA(); | |
// output in both node and browserify is: | |
// | |
// thing A | |
// thing B |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment