Open matteocontrini opened 7 years ago
Instead of
class Card() { constructor() {}, method() {}, _private() {} }
we should be doing
module.exports = function cardFactory() { // constructor code let private = () => {}; return { method: function method() {} }; };
Or better: use classes but export a function that creates a new instance of the class.
class Card() {} module.exports = function(options) { return new Card(options); });
Instead of
we should be doing