Is there an obvious way to use any sort of inheritance with the Revealing Module pattern?
For example, let’s say I have two modules:
var NS = NS || {};
NS.HelloModule = function(){
var sayHi = function(){
console.log("hi");
},
sayGoodbye = function(){
console.log("goodbye");
};
return{
sayHi: sayHi
};
}();
NS.AlternateHelloModule = function(){
// I'd like a function that will overwrite the hello function while keeping goodbye as-is.
}();
Is this even possible with JS with any type of module pattern? If not, s’all good. I’ve read that it can be done using prototypes but I’d need to rewrite more than it’s worth.