Consider I have class
function home {}{
this.door=function(){},
this.tiles=function(){}
}
I have to add some message after it's methods are called using this library called meld js (https://github.com/cujojs/meld/blob/master/docs/api.md#meldafter)
my try
var allMethods = new home();
Object.keys(allMethods).forEach(function(k){
aop.after(Object.prototype,key,function(){
console.log('Dont use me i am old')
});
})
is this a right approach ?