Are node modules run when they are required?
For example: You have a file foo.js that contains some code and some exports.
When I import the file by running the
Some examples..
'use strict'; var a = 2 * 4; //this is executed when require called console.log('required'); //so is this.. function doSomething() {}; //this is just parsed module.exports = doSomething; //this is placed on the exports, but still not executed..