cujojs / meld

AOP for JS with before, around, on, afterReturning, afterThrowing, after advice, and pointcuts
Other
644 stars 65 forks source link

when callback, can you pass the function name back ? #46

Open onion555 opened 5 years ago

onion555 commented 5 years ago

meld.after(this.object, [ 'query, 'list' ], (result, functionName /can you pass this back to me ?/)=> { });

briancavalier commented 5 years ago

Hi @onion555. Good question. You can access the current method name within any advice function via the current joinpoint's method property, i.e. `meld.joinpoint().method. See also here and here.

Hope that helps!