在源碼中有這樣一段:if (typeof exports !== 'undefined') { if (typeof module !== 'undefined' && module.exports) {
exports = module.exports = _;
}
exports._ = _; // 要么是exports._ = _,要么是module.exports = _} else {
root._ = _;
}我的疑問是exports和module.exports任意用一個就行了,這兩個不會有循環引用的問題么?
關于underscore源碼的一點小疑問
斯蒂芬大帝
2018-08-07 10:09:56