http://ycavatars.blogspot.tw/2013/05/moduleexportsexports.html
結論就是: 寫一個自己的物件想給別人用 -> 用module.exports = {…};
用既有的module只是要擴充方法 -> 用exports.myFun = function(){…}
廣告
http://ycavatars.blogspot.tw/2013/05/moduleexportsexports.html
結論就是: 寫一個自己的物件想給別人用 -> 用module.exports = {…};
用既有的module只是要擴充方法 -> 用exports.myFun = function(){…}
Posted by john24318 on 2013/09/13
https://john24318.wordpress.com/2013/09/13/exports-vs-module-exports/