I've found the following contract in a Node.js module:
module.exports = exports = nano = function database_module(cfg) {...}
I wonder whats the different between module.exports
and exports
and why both are used here.
转载于:https://stackoverflow.com/questions/7137397/module-exports-vs-exports-in-node-js