I won't claim that I'm terribly well versed in Node, or even Javascript, but I've seen several modules of the form
module.exports = foo;
function foo() {
...
}
Now, I could see this working perhaps in this case, but I'm really confused when that module returns a function that is excuted.
module.exports = bar();
function bar() {
...
}
What is this witchcraft?