roccomuso / netcat

:computer: Netcat client and server modules written in pure Javascript for Node.js.
MIT License
419 stars 43 forks source link

update index.js #3

Closed ORESoftware closed 7 years ago

ORESoftware commented 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 :)

roccomuso commented 7 years ago

:+1: Nice! definetly better.