浏览 NPM 存储库中的现有模块,我看到了使用以下模块的模块:
module.exports = (function(){
return {
// objects from the module
};
})();
以及使用的模块
module.exports = { //objects };
它们有什么性能差异吗?Node 中的模块组织是否有第三个选项/模式?
谢谢!
浏览 NPM 存储库中的现有模块,我看到了使用以下模块的模块:
module.exports = (function(){
return {
// objects from the module
};
})();
以及使用的模块
module.exports = { //objects };
它们有什么性能差异吗?Node 中的模块组织是否有第三个选项/模式?
谢谢!