Simple snippet to make Node's built in modules globally accessible

added by JavaScript Kicks
9/17/2018 7:48:12 AM

484 Views

I am very lazy and don't want to type the same fs = require('fs') in every little thing I'm doing and every temporary file that is just a means to an end and will never be used in production. I decided to share this little snippet that iterates Node's internal (built in) modules and globalizes only the valid ones.


0 comments