Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
模块1.js
// here how can i overide the module2 someMethod()
模块2.js
exports.someMethod=function() {}
require('./module2').someMethod = function myOwnMethod () { // Not too hard was it? };