Closed ORESoftware closed 7 years ago
I actually completely brainfarted for 6 months myself, and forgot that you can just use exports directly instead of reassigning module.exports...
90% of the time, I think it's actually nicer to just assign to module.exports instead of reassigning module.exports :)
for example, this:
exports.foo = 'bar'
is better than
module.exports = { foo: 'bar' }
if nothing else, 1 fewer JS object is created in memory :)
:+1: Nice! definetly better.
I actually completely brainfarted for 6 months myself, and forgot that you can just use exports directly instead of reassigning module.exports...
90% of the time, I think it's actually nicer to just assign to module.exports instead of reassigning module.exports :)
for example, this:
is better than
if nothing else, 1 fewer JS object is created in memory :)