0

模块1.js

// here how can i overide the module2 someMethod()

模块2.js

exports.someMethod=function() {}
4

1 回答 1

0
require('./module2').someMethod = function myOwnMethod () {
  // Not too hard was it?
};
于 2013-09-13T10:01:14.180 回答