Memoize - you never need constructor/property based dependency injection in JavaScript
const A = require('./mod1')('A'); | |
module.exports = A; |
const AAgain = require('./mod1')('A'); | |
AAgain.setValue('AA'); | |
module.exports = AAgain; |
const B = require('./mod1')('B'); | |
B.setValue('BB'); | |
module.exports = B; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment