-
-
Save GianlucaGuarini/6f7ce495c55cb67d509180473623bfe0 to your computer and use it in GitHub Desktop.
Use always `module.exports = Object.freeze({})`
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
const b = require('./b') | |
b.b = 'c' | |
module.exports = { | |
a: 'a' | |
} |
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
module.exports = { | |
b: 'b' | |
} |
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
const a = require('./a') | |
const b = require('./b') | |
console.log(b) // => watch out!! { b: 'c' } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment