exports 和 module.exports 的详解
很多人都知道使用 require 来加载代码,使用 exports 和 module.exports 来导出代码。但很多新手估计会迷惑于 exports 和 module.exports 的区别,为了更好的理解 exports 和 module.exports 的关系,我们先有一个 JS 的例子说起。示例: demo.jsvar a = {name: 'Seven'};var b = a;co
原创
2017-04-16 19:52:23 ·
883 阅读 ·
0 评论