标签: node.js
module1.js
// here how can i overide the module2 someMethod()
module2.js
exports.someMethod=function() {}
答案 0 :(得分:0)
require('./module2').someMethod = function myOwnMethod () { // Not too hard was it? };