I have simple class like this:
module.exports = class MyClass {
function middleware() {
console.log('call me before')
}
function a() {
}
function b() {
}
function c() {
}
}
So Idea is, when someone call function a, b, c I want call middleware before execute a, b, c. How can I do it?
So, I can put middleware() to each function, but I want some dynamic way how to do this.