3 ms·
exports.foo = function foo() { }; is indeed where you might use this. It doesn't let you call it as foo(), though. What it does is make exports.foo.toString()
by dspeyer 15y ago
exports.foo = function foo() { }; is indeed where you might use this. It doesn't let you call it as foo(), though. What it does is make exports.foo.toString() include "foo". This can be useful for debugging, and possibly other things.