Monday, 20 April 2020

[Questions] Writing all code inside of the methods.exports object

Hi - I have inherited some node code for a particular part of our website. The developer who wrote it left, and I am now learning node, in the hope to maintain, and improve the code.Question: I see that for each module that he has created, that he has written all of his code inside of the module.exports object - this isn't the way inwhich i learnt to use that object.Is he being efficient? or is it lazy coding? Also, what impacts could this have?Thanks in advance.example:module.exports = {​...all code for the module...~1500 lines of code - ~3000 lines of code;}

Submitted April 20, 2020 at 12:33PM by Prize_Bumblebee

No comments:

Post a Comment