我在Node.js模块中找到了以下合同:
module.exports = exports = nano = function database_module(cfg) {...}
我不知道什么之间的不同module.exports和exports为什么都被用在这里.
module.exports
exports
javascript commonjs node.js
我们可以在另一个JS文件中调用写在一个JS文件中的函数吗?任何人都可以帮我如何从另一个JS文件调用该函数?
javascript include
javascript ×2
commonjs ×1
include ×1
node.js ×1