摘要:
1. module应该是require方法中,上下文中的对象2. exports对象应该是上下文中引用module.exports的新对象3. exports.a = xxx 会将修改更新到module.exports对象中4. exports = xxx 直接改变了 exports的指向,module.js的474行代码:module._compile(stripBOM(content), filename);module.js的437行代码:var wrapper = Module.wrap(content);再往下跟:进入node.js文件的879行:return NativeModul 阅读全文
posted @ 2013-11-24 14:16
Vince
阅读(3569)
评论(0)
推荐(0)

浙公网安备 33010602011771号