What is the purpose of Node.js module.exports and how do you use it?
I can't seem to find any information on this, but it appears to be a rather important part of Node.js as I often see it in source code.
According to the Node.js documentation:
A reference to the current
module. In particular
is the same as the exports object. See
src/node.js for more information.
But this doesn't really help.
What exactly does
module.exports do, and what would a simple example be?